Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apptension/django-restauth
🍔 Django REST User boilerplate
https://github.com/apptension/django-restauth
django django-rest-framework django-templates restful-api
Last synced: 3 days ago
JSON representation
🍔 Django REST User boilerplate
- Host: GitHub
- URL: https://github.com/apptension/django-restauth
- Owner: apptension
- Created: 2018-03-02T13:05:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T10:42:28.000Z (almost 2 years ago)
- Last Synced: 2024-04-24T10:03:22.103Z (7 months ago)
- Topics: django, django-rest-framework, django-templates, restful-api
- Language: Python
- Homepage:
- Size: 142 KB
- Stars: 19
- Watchers: 9
- Forks: 4
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🍔 django-restauth
[![Build Status](https://travis-ci.org/apptension/django-restauth.svg?branch=master)](https://travis-ci.org/apptension/django-restauth)
## Running
```
pip install pipenv
pipenv install
pipenv run python manage.py runserver
```## Usage
* Modify your settings
```python
# ..AUTH_USER_MODEL = 'restauth.User'
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
),
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
),
}JWT_AUTH = {
'JWT_ENCODE_HANDLER': 'restauth.jwt.encode_handler',
}HASHID_FIELD_SALT = ''
```* Generate `HASHID_FIELD_SALT`
`from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())`
* Modify `urls.py`
## Features
- [x] Register user with profile in single API call
- [x] Login endpoint to return JWT token
- [x] User account activation endpoint
- [x] User profile endpoint
- [x] HashID for User primary key
- [x] Password reset & change endpoints
- [x] Add Swagger for API documentation
- [x] Ability to set user notification implementation
- [x] Health check endpoint with DB migrations validation
- [x] Two separate hosts, api & admin using django-hosts