Skip to main content

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.

Release files for django-email-accounts 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-email-accounts 0.7.0
File Size Uploaded
django-email-accounts-0.7.0.tar.gz 21.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-email-accounts 0.7.0
File Interpreter ABI Platform
django_email_accounts-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 49.4 kB

Release files / django-email-accounts-0.7.0.tar.gz

Download URL django-email-accounts-0.7.0.tar.gz
Size 21.9 kB
Tags Source
SHA-256 checksum
How to use checksums
36d34a252fd4652219833fa0a2fe478e7d3fd38cba72d658737421a2f79287b9
BLAKE2b-256 checksum
How to use checksums
9f00375ed3985a32520e976d5a86129ff09cec48109eaca849d8b658305af19c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / django_email_accounts-0.7.0-py3-none-any.whl

Download URL django_email_accounts-0.7.0-py3-none-any.whl
Size 27.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfee98551d2cef00e19238000c9c2830816ae491f251f4d80f14c242c00a888f
BLAKE2b-256 checksum
How to use checksums
866601e6cc9def2abe8357360ad8dee6488703014e5990460d7174d54a32543f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

1 release file

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page