Django project created for practice.
Create a virtual environment (MAC/Linux):
python3 -m venv DjangoAssignment
Activate the virtual environment:
source DjangoAssignment/bin/activate
Install requirements:
pip install -r requirements.txt
Navigate to LoginSystem directory : cd LoginSystem
Start server:
python manage.py runserver
Log in with:
Username: kushalghimire
Pasword: 123456
Available end points can be viewed via postman. Import Django Project.postman_collection.json
file located inside Postman directory. Set enviornment variable api_url
to local url; defaults to http://localhost:8000
Set environment variable auth_token
as the value returned when logged in as superuser in the end point {{api_url}}/api/token/
- Loginify Home:
- Method:
GET
- Endpoint:
{{api_url}}/login/home
- Description: A simple test endpoint that returns a welcome message.
- Method:
Available endpoints as Rest APIs:
Authentication: All endpoints, except for /api/token/
, require Token Authentication. You must include an Authorization
header with the value Token <your_auth_token>
. Only works for user with atleast staff priviliges.
-
Obtain Auth Token
-
List All Users
-
Create New User
-
Get User Details by Email
-
Update User Details
-
Delete User
{{api_url}}/signup
:
Accepts username, email and password. Email must be unique. Cannot be accessed via postman due to CSRF block.
{{api_url}}/login
:
Accepts email and password to login.