No project description provided
Project description
Django Magic Admin
This is a plugin to facilitate django-admin login through magic links.
Requirements
- Django 4.X or higher
- An E-mail service provider such as SMTP, Sendgrid or others configured on settings.py
Installation
pip install django-django_magicadminon your system- Add the following URL and include it in your main
urls.py
path("", include("django_magicadmin.urls")),
- Add the app to your INSTALLED_APPS
INSTALLED_APPS = [
"django_magicadmin",
...
]
- If you want custom settings about Sender address, Domain, etc, use the following fields and add them to your settings.py:
MAGICADMIN_DEFAULT_EXPIRATION = 10800 # default
MAGICADMIN_DEFAULT_MAGIC_LINK_SUBJECT = "Here is your magic link to login!" # default
MAGICADMIN_CURRENT_WEBSITE = localhost
MAGICADMIN_DEFAULT_SENDER_EMAIL = magiclink@localhost
Pro tips:
Here are some tips that will enable a better experience for you
Pro tip #1:
If you want to develop using the magic link functionality, I recommend you the Django Terminal E-mail Backend, which enables you to see all of the messages sent through the system.
Just add this one-liner to your settings.py:
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
Pro tip #2:
To override with custom e-mail templates, override the files: emails/magiclogin.html and emails/magiclogin.txt
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 Distribution
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_magicadmin-0.1.0.tar.gz.
File metadata
- Download URL: django_magicadmin-0.1.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.15 CPython/3.10.6 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
149599ec4feece1a3fbc06c8d09bcaa8d594788791fc1ca21937932cf396746e
|
|
| MD5 |
ff9c9d9d2360847183c59310b673f5de
|
|
| BLAKE2b-256 |
d974880c31759a2bdaf05ecb2d340bab1de2f7379641ad7de1d4fced6a09da85
|
File details
Details for the file django_magicadmin-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_magicadmin-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.15 CPython/3.10.6 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c586bf176d77edf8ed6d99b07c5e90de49dc796acc5154b3b672bcfe9142fd0e
|
|
| MD5 |
f786a042754f1b4afa39f06f613532da
|
|
| BLAKE2b-256 |
045787e9fd4eae33847c31b9d07f6437329657f355dbff1341ba8ae57f3d62fa
|