a todolist api with django rest framework
Backend of: todo app
- install python3 from here
- pip install -r requirements.txt
- python manage.py migrate
- python manage.py createsuperuser(insert user name and password)
- python manage.py runserver
Allowed Methods : GET
Access Level : Authorized users
return array of objects of all todos in the database related to the authorized user.
you can get a specific todo object with passing the pk to the end of the path.
allowed methods : POST
Access Level : Authorized users
fields : 'required': {'title'}, 'optional': {"description", "image", "is_active", "priority", "send_email"}
POST : The data should include fields available if user authorized.
allowed methods : PUT
Access Level : Authorized users
fields : 'required': 'optional': {"title", description", "image", "is_active", "priority", "send_email"}
POST : The data should include fields available if user authorized.
allowed methods : DELETE
Access Level : Authorized users
DELETE : there is no data to send. you should put the key of products that are in user cart you want to delete in the url instead of {key}
allowed methods : POST
Access Level : Public
fields : 'required': {'username', 'password'}
POST : the data you post should include 'username' and 'password' fields if the user was authorized the access token and the refresh token will return as json.more information about JWT
allowed methods : POST
Access Level : Public
fields : 'required': {'refresh'}
POST : the data you post should include 'refresh' and the value of it should be user refresh token that is sent when user login.
allowed methods : POST
Access Level : Public
fields : 'required': {'username', 'password1', 'password2', 'email', 'first_name', 'last_name'}
POST : should include the 'fields' keys and proper value. errors and exceptions handled , should have a proper place to show them in frontend.
allowed methods : PUT
Access Level : Authorized users
fields : 'required': {'old_password', 'password1', 'password2'}
PUT : should include 'fields' keys with proper values. errors and exceptions handled , should have a proper place to show them in frontend.
allowed methods : PUT
Access Level : Authorized users
fields : 'optional': {'username', 'first_name', 'last_name', 'email'}
PUT : should include the authorized user access token. the uniqueness of email and username handled.
allowed methods : POST
Access Level : Authorized users
fields : 'required': {'refresh_token'}
POST : should include the authorized user access token. post user refresh token with 'refresh_token' key to expire the access and refresh token of the given user.
allowed methods : PUT
Access Level : Authorized users
fields : 'required': {'image'}
PUT : should include the authorized user access token