Skip to main content

A Django app for user management with email-based authentication.

Project description

Django Email Accounts

Django Email Accounts is a Django app for user management with email-based authentication. It provides a customizable User model and registration view for handling user registration and authentication using email and password.

Installation

Install the package using pip:

pip install django-email-accounts

Usage

  1. Add 'email_accounts' to the INSTALLED_APPS list in your Django project's settings.py file:
INSTALLED_APPS = [
   ...
   'email_accounts',
   ...
]
  1. Change the default authentication user model by adding this line of code in your Django project's settings.py file:
AUTH_USER_MODEL = 'email_accounts.User'
  1. Update your project's urls.py file to include the email-accounts URLs:
from django.urls import path, include

urlpatterns = [
    ...
    path('accounts/', include('email_accounts.urls')),
    ...
]

Note : If you want to use the restfull api instead, then here is a propre update for urls.py:

from django.urls import path, include
from rest_framework.routers import DefaultRouter

from email_accounts.views import UserViewSet

router = DefaultRouter()
router.register('users', UserViewSet)

urlpatterns = [
    ...
    path('api/', include(router.urls)),
    path('api/accounts/', include('email_accounts.api_urls')),
    ...
]
  1. Run migrations to create the necessary database tables:
python manage.py makemigrations email_accounts
python manage.py migrate
  1. You can now use the email-accounts functionality in your Django project.

Note : If you want custom authentication templates, then, in your templates folder, create a email_accounts subdirectory in templates directory and create all authentication templates on it like this.

├── templates
│   └── email_accounts
│       ├── login.html
│       ├── register.html
│       └── password
│           ├── change
│           ├── ├── 1.html
│           ├── └── 2.html
│           └── reset
│               ├── 1.html
│               ├── 2.html
│               ├── 3.html
│               └── 4.html

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository.

To contribute to the project, follow these steps:

  1. Fork the repository on GitHub.
  2. Clone your forked repository to your local machine.
  3. Create a new branch for your feature or bug fix.
  4. Make the necessary changes and commit them.
  5. Push the changes to your forked repository.
  6. Submit a pull request to the main repository.

Please ensure that your code adheres to the project's coding conventions and includes appropriate tests. Also, provide a clear description of the changes you have made in the pull request.

Thank you for your contributions!

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.

Project details


Download files

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

Source Distribution

django-email-accounts-0.6.0.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

django_email_accounts-0.6.0-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file django-email-accounts-0.6.0.tar.gz.

File metadata

  • Download URL: django-email-accounts-0.6.0.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for django-email-accounts-0.6.0.tar.gz
Algorithm Hash digest
SHA256 2b21277594f8220c17e2b58b08b117fd5fae0efdab59408a398448b3a5e14bc9
MD5 5964b2c4d2d50bc6ee32df1650ece8ec
BLAKE2b-256 13aa06ea36b18d29d38fdb1def97b7ffee652d1f903f93a5c6c2e6a67a4f4fd2

See more details on using hashes here.

File details

Details for the file django_email_accounts-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_email_accounts-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f92da0d4f07896489260e6aa5671576c7e44348beb199eb4f4e011be0fd2b36
MD5 7cfdc8a268637a2233812f756ff94a60
BLAKE2b-256 4093f2727f196deb325a7bfcb0f05308804ad6949c46c3ac0298298f62ce9a70

See more details on using hashes here.

Supported by

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