Skip to main content
# Django AUTH

### install from pypi

pip install django-auth2

### local installing

git clone git@github.com:Nick1994209/django-auth2.git

python setup.pu install

else if need refactore code

pip install -e django-auth2


### in project.settings

INSTALLED_APPS = [
...
'django.contrib.auth',
'django_auth2',
]

### in project.urls

...
url(r'', include('django_auth2.urls')),
...


## Additional

### for User model (optional)

email = models.EmailField(unique=True, blank=False)
is_active = models.BooleanField()


#### if want send activation email for activate user

###### then set project.settings

DJANGO_AUTH2_SEND_ACTIVATION_EMAIL = True
# password reset days
PASSWORD_RESET_TIMEOUT_DAYS = 1

# for sedning email
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'my_mail@gmail.com'
EMAIL_HOST_PASSWORD = 'my_pass'
EMAIL_PORT = 587

in yor project.settings user.is_active = False


`you can use celery for send mails
if you virtualenv installed celery and project work with her;
mails be sent from celery
else if installed celery but not project now work with her;
mails message is not sent`
[first state with celery. django]: http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html

if not celery then mail will be sent (default django)


###### else

user.is_active = True (by default) and mail not sent

For send mail (example):

#### can use middleware

in settings

MIDDLEWARE = [
...
'django_auth2.middleware.LoginRequiredMiddleware',
]

DJANGO_AUTH2_LOGIN_EXCEPT_URLS = [
'/info/(.*)',
'/index/',
]

Metadata

Release files for django_auth2 0.1.1

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_auth2 0.1.1
File Size Uploaded Provenance Actions
django_auth2-0.1.1.tar.gz 11.7 kB Without provenance Details for django_auth2-0.1.1.tar.gz

Release files / django_auth2-0.1.1.tar.gz

Download URL django_auth2-0.1.1.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c8efbce43c86631b736484ec77b81aff4dc2cec2521907bb348c0f415d53a8a2
BLAKE2b-256 checksum
How to use checksums
517bc4209a82be9700d931c3684af4b0da68c28ffce305b03993ee5b0b7d5afa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django_auth2 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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