In this tutorial, you will build a public feed app using Django. The app will allow users to post a message that is visible by everyone who comes to the app. You will also learn how to use  Auth0 for authentication in your Django application.

For this tutorial, I’ll assume you have experience with Django and its standard patterns. For this reason, I won’t go in depth about things like setting up a Django app, for example.

In addition to the public-facing part of the app, you will add some moderation utilities to allow mods to both block users and hide posts from the feed. You will use  Auth0 to handle the authentication, and you will add the authorization handling within the app to distinguish between the actions that non-users, users, and moderators can take. You will use the default Django admin to allow admin users to promote regular users to be a moderator by adding them to a particular group.

Django authentication demo application - public feed

Django authentication demo application - reports page

You can find the final code in this GitHub repository.

Requirements

This app will use:

But any Python version greater than 3.6 should work (because of  f-strings), and any version over Django 2 should work. If you want to work with an older version of Python, anything over three should work as long you use something other than f-strings for string interpolation.

#django #python #authentication

Using Authentication in Django - Tutorial for Beginners and Advanced
9.05 GEEK