django-superuser
At some point in development you wish you were just automatically logged into the django admin as a super user. This middleware lets you do just that. As you probably understand this also poses a security risk. To minimize the chances of this middleware automatically logging someone in as a super user in a production environment you will need to take some extra steps when installing.
Installation
First you need enter the middleware in your setting file, it needs to be at
some line after the
django.contrib.auth.middleware.AuthenticationMiddleware::
MIDDLEWARE = (
...
'django.contrib.auth.middleware.AuthenticationMiddleware',
'superuser.middleware.SuperUserMiddleware',
...
)
You also need to have your IP listed in INTERNAL_IPS, for example::
INTERNAL_IPS = ('127.0.0.1',)
Lastly you need to make sure DEBUG = True in your settings file for the middleware to work.
Notes
Note that the login page (usually /admin/login/) does not log you in
automatically as a super user, this is so that you can login as a different
user if you like. If you want to be logged in as a super user, just navigate
to any other admin view, for example /admin/.
Django version < 1.10
If you are using Django version < 1.10 you need to use the old style middleware
classes and you need install django-supervisor version < 0.2.0. Please set up
middleware like this instead after the line:
django.contrib.auth.middleware.AuthenticationMiddleware::
MIDDLEWARE_CLASSES = (
...
'django.contrib.auth.middleware.AuthenticationMiddleware',
'superuser.middleware.SuperUserMiddleware',
...
)
Metadata
Release files for django-superuser 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-superuser-0.2.3.tar.gz | 3.1 kB | Without provenance | Details |
Release files / django-superuser-0.2.3.tar.gz
| Download URL | django-superuser-0.2.3.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fdafcc14807bbdc887175c558e342e57ec09e1987c655839ee028f3dd3dab54
|
|
BLAKE2b-256 checksum How to use checksums |
738fe38901d3c1b7ec929cb5601154b5d7815f2e46f24eb2aadc0e5dbf9879db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.9.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2
|
Security for django-superuser 0.2.3
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.