Users is a Django app for performing CRUD operation on user models
Project description
Users
Users is a Django app for creating, reading, updating and deleting users models.
Get started
Install the package:
pip install django-users
After installation:
- In
settings.py
, addusers
app toINSTALLED_APPS
. - Users app can be used as a web app that uses HTML templates and/or as an API back-end:
- If you want to use HTML templates, then include
users.urls
in your project levelurls.py
. - Include
users.routers
to use the API endpoints. - Or include the both.
- If you want to use HTML templates, then include
Set up the templates
Users app does not contain HTML templates to give the developer the options of customization.
To set up the templates:
- In
settings.py
, set theDIRS
=[BASE_DIR / 'templates']
. - Create
templates
folder in your project folder. - Create a folder named with the name of the app that contains
AUTH_USER_MODEL
(the default isauth
). - Create the templates (
user_list.html
,user_detail.html
,user_form.html
,user_confirm_delete.html
)
Note: If you named your user model different than User
, you may need to name your templates according to the name of the model
Example: Let's say that the name of your app is blog
and you extended the default user model and you named the new user model BlogUser
then the folder that you will create in the templates folder is blog
and you will need to rename the templates, for example user_list.html
will be bloguser_list.html
.
I hope that you find this useful.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.