Simple starter built with Python / Django Rest / SQLite3 and JWT Auth. The authentication flow is based on json web tokens. Forked from Django API Server. For more information please access the project documentation.
Features:
- Simple, intuitive codebase - built for beginners (can be extended with ease)
- Django / Django REST / SQLite3 - a simple, easy to use backend
- Authentication with JWT (JWT login, JWT logout)
- Testing, Docker
- Forked and extended from Django API Server with more features
api/transactions/create
- create transactionapi/transactions/edit/id
- edit transactionapi/transactions/delete/id
- delete transactionapi/transactions/get/id
- get specific transactionapi/transactions/get
- get all transactions
Can be used with other UI projects for a complete fullstack experience
- React Berry Dashboard - open-source sample
- React Datta Dashboard - open-source sample
- React Datta Dashboard PRO - commercial fullstack product
Support:
- Github (issues tracker), Email: support @ appseed.us
- Discord: LIVE Support (registered AppSeed Users)
- Django==3.2.5
- djangorestframework==3.12.4
- PyJWT==2.1.0
- django-cors-headers==3.7.0
Clone the sources
$ git clone https://github.com/app-generator/api-server-django-sample.git
$ cd api-server-django-sample
Create a virtual environment
$ virtualenv -p python3 venv
$ source venv/bin/activate
Install dependencies using pip
$ pip install -r requirements.txt
Start the API server
$ python manage.py migrate
$ python manage.py runserver
The API server will start using the default port 8000
.
Docker execution
Get the code
$ git clone https://github.com/app-generator/api-server-django.git
$ cd api-server-django
Start the app in Docker
$ docker-compose up -d --build
Visit http://localhost:5000
in your browser. The API server will be running.
For a fast set up, use this POSTMAN file: api_sample
Register -
api/users/signup
POST api/users/signup
Content-Type: application/json
{
"username":"test",
"password":"pass",
"email":"[email protected]"
}
Login -
api/users/login
POST /api/users/login
Content-Type: application/json
{
"password":"pass",
"email":"[email protected]"
}
Logout -
api/users/logout
POST api/users/logout
Content-Type: application/json
authorization: JWT_TOKEN (returned by Login request)
{
"token":"JWT_TOKEN"
}
Django API Server Sample - Provided by AppSeed App Generator