Django Access Point is a package designed to streamline the creation of APIs for user and role management in SaaS projects. It simplifies user authentication, authorization, and role-based access control, enabling developers to build robust and scalable applications with ease. Additionally, this package supports custom fields, allowing users to manage their own specific fields for enhanced flexibility and customization.
Project description
Django Access Point
Django Access Point is a package designed to streamline the creation of APIs for user and role management in SaaS projects. It simplifies user authentication, authorization, and role-based access control, enabling developers to build robust and scalable applications with ease. Additionally, this package supports custom fields, allowing users to manage their own specific fields for enhanced flexibility and customization.
Steps to Integrate Django Access Point
1. Add Package Name To Project Settings
- Open your Django project's settings.py file.
- Add the package name
django_access_pointto your project's INSTALLED_APPS:
INSTALLED_APPS = [
...
'rest_framework',
'django_filters',
'django_access_point'
]
2. Create Django App Using Django Access Point Package Django Access Point provides a command that automatically generates a Django app complete with user management, role management, and authentication-related files. This allows you to focus on writing code for your business logic rather than spending time on creating APIs for authentication, user, and role management.
- To create your app, make sure you’re in the same directory as manage.py and run the following command:
python manage.py createapp userApp
This command will create a Django app named userApp with APIs for authentication, user, and role management.
3. Add Django App Name To Project Settings
- Open your Django project's settings.py file.
- Add the newly created app name
userAppto your project's INSTALLED_APPS:
INSTALLED_APPS = [
...
'rest_framework',
'django_filters',
'django_access_point',
'userApp'
]
4. Add AUTH_USER_MODEL to Project Settings
Ensure that you define or update the AUTH_USER_MODEL to point to the model inheriting from UserBase. You can access the model in the path userApp/models.py.
AUTH_USER_MODEL = 'userApp.TenantUser'
TenantUser model, provided by extending the Django Access Point package, offers basic fields that manage user management and authentication. You can add your own fields on top of the TenantUser model and extend its functionality.
5. Add TENANT_MODEL to Project Settings
Ensure that you define TENANT_MODEL to point to the model inheriting from TenantBase. You can access the model in the path userApp/models.py.
TENANT_MODEL = 'userApp.Tenant'
Tenant model, provided by extending the Django Access Point package, offers basic fields that manage tenant management. You can add your own fields on top of the Tenant model and extend its functionality.
6. Migrate Models to Database To migrate the newly created app models to the database, use Django's default makemigrations and migrate commands. Follow these steps:
- Create Migrations:
python3 manage.py makemigrations userApp
- Apply Migrations
python3 manage.py migrate
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.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_access_point-0.0.8-py3-none-any.whl.
File metadata
- Download URL: django_access_point-0.0.8-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ee5bc4e8b399e0cfff242cb0b897ceefb8eb2ee3c5fdb695f30fe32e5070553
|
|
| MD5 |
7258a89df86a7f9a2169239249aa61b7
|
|
| BLAKE2b-256 |
73536f4ac4c7da45e1b4f39e43a7c6ed639ecf5201ccfeaf03cf608710cd3da6
|