Please enable JavaScript.
Coggle requires JavaScript to display documents.
user account managerment, get_object_or_404 to find user find manager…
user account managerment
create user registration endpoints.
login with token based authentication in DRF
djoser
clean up jwt app from settings
from urls
create Super Admin API Endpoint:
restrict access to this endpoint to super admins only, use the "is admin user" permission class from DRF.
remove user from a group
use super admin API endpoint
to handle post and delete request
request.query_params.get(method)
if method="delete":
remove user from group
Test with tokens
test endpoints
superuser access to super admin endpoint
regular user token can't access super admin endpoint
get_object_or_404 to find user
find manager group
add user to the manager group
return success message
add a user to a group
authentication
authorization
add from validators to form data
token and session authentication use DRF form
use Djoser and authtoken package for default routes
use Django admin panel to create new users and tokens
views.py
serializers.py
settings.py
admin.py