Skip to main content

Django Access Point is a package designed to simplify the creation of APIs for user and role management in SaaS projects. It streamlines user authentication, authorization, and role-based access control, enabling developers to build robust and scalable applications with ease.

Project description

Django Access Point

Django Access Point is a package designed to simplify the creation of APIs for user and role management in SaaS projects. It streamlines user authentication, authorization, and role-based access control, enabling developers to build robust and scalable applications with ease.

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_point to your project's INSTALLED_APPS:
INSTALLED_APPS = [
    ...
    'rest_framework',
    '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 testApp

This command will create a Django app named testApp 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 testApp to your project's INSTALLED_APPS:
INSTALLED_APPS = [
    ...
    'rest_framework',
    'django_access_point',
    'testApp'
]

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 testApp/models.py.

AUTH_USER_MODEL = 'testApp.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 testApp/models.py.

TENANT_MODEL = 'testApp.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 testApp
  • Apply Migrations
python3 manage.py migrate

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_access_point-0.0.6-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file django_access_point-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for django_access_point-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ee3a6ca831873a4472aed28afc6d5bca3f5ecf47d4b4b0b989eb822fbe25dc03
MD5 6f1eaebce2dbfee3e42ec09ae6f5325c
BLAKE2b-256 f55fc56a0f490eacee21b2dc6de5e14e1176f414d655060a13881a2269a1f6df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page