Django backend containing APIs to authenticate a user through CRUD operations on the 'Account' database. Also supports password hashing and JWT tokens.
You can test this system using Postman, or the user interface implemented through HTML files in the 'templates' folder to visualize the APIs' responses
Requires Python 3
Clone directory to your computer and open your terminal in this directory.
Run pip install -r requirements.txt to install requirements
In the project directory run the following in order:
python manage.py makemigrations
python manage.py migrate
(Not necessary: If you want to delete the data already in the database, you can run "python manage.py flush")
python manage.py runserver 8000 (to run on localhost port 8000)
Send requests to the following APIs:
/api-registercreate user/api-loginlogin user Must be authenticated (i.e. registered or loggedin):/logoutlogout user by deleting saved token/api-updateUpdate user data with id taken from session token variable/api-deleteDelete user with with id taken from session token variable FOR DEVS ONLY:/api-getuser/idreturns user with specific id/api-getallreturns all users
Account model attributes:
{'user_id', 'username', 'email', 'password'}