to test django fast you can use
pip install django-extensions
add this to your django setting app
INSTALLED_APPS = (
...
'django_extensions',
)
python manage.py shell_plus --notebook
- class-based
- jwt_Authentication
- drf-yasg(swagger)
- user serializer
- model unit test
- API unit tests
this django app provide API for authenticated users to get create delete edit books and adminusers can create new user and auther
clone (https://gitlab.com/nmzistg/django_rest_challenge) repo
pip install -r requirements.txt
in some scared cases you need install djangorestframework-simplejwt
manually
beside of it some new PyJWT
versions are buggy just use recommanded version in requirment.text
djangorestframework-simplejwt==4.4.0
PyJWT==1.7.1
for migrations database in terminal run
python manage.py makemigrations
python manage.py migrate
go to project directory and run the server with
python manage.py runserver
for creating superuser
python manage.py creatsuperuser
and choose your username and pass
open your browsers by defal it runs on (http://127.0.0.1:8000)
http://127.0.0.1:8000/swagger/