Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#27196 closed New feature (wontfix)

Allow django admin to be logged into freely on localhost

Reported by: Lynn Cyrin Owned by: nobody
Component: contrib.admin Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I just started a new django application, and fairly early on it required me to create a superuser with a username and password to proceed. I don't expect to be required to create this for an application that I never intend on push to a live server. I feel that django setup would be much better with a setting that allows logging into the admin console freely when debug mode is on / the request comes from localhost.

Change History (3)

comment:1 by Aymeric Augustin, 8 years ago

This can be achieved with a middleware. See https://github.com/aaugustin/lcl/blob/master/lcl/middleware.py for an example. I'm not convinced this needs to live into Django.

comment:2 by Tim Graham, 8 years ago

Component: Uncategorizedcontrib.admin
Resolution: wontfix
Status: newclosed
Type: UncategorizedNew feature

Agreed. It's not clear what user would be used for an automatic login either.

comment:3 by Ori Avtalion, 8 years ago

Only checking for localhost would be dangerous. Production configurations that use nginx+gunicorn (for example) see all requests as ones originating in localhost.

Note: See TracTickets for help on using tickets.
Back to Top