Opened 4 years ago

Last modified 4 years ago

#23433 new Cleanup/optimization

Django installs /usr/bin/django-admin and /usr/bin/

Reported by: Arfrever Owned by: nobody
Component: Packaging Version: master
Severity: Normal Keywords:
Cc: Arfrever.FTA@… Triage Stage: Someday/Maybe
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Django (since 1.7) installs /usr/bin/django-admin and /usr/bin/
Both of them execute
/usr/bin/ does it directly, while /usr/bin/django-admin does it through pkg_resources module of Setuptools.


from django.core import management

if __name__ == "__main__":


# EASY-INSTALL-ENTRY-SCRIPT: 'Django==1.7','console_scripts','django-admin'
__requires__ = 'Django==1.7'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
        load_entry_point('Django==1.7', 'console_scripts', 'django-admin')()


django-admin =

Installation of /usr/bin/ is caused by scripts=['django/bin/'] in
Installation of /usr/bin/django-admin is caused by entry_points={'console_scripts': ['django-admin =',]} in

I think that it would suffice to install only one of these scripts.

Change History (4)

comment:1 Changed 4 years ago by Aymeric Augustin

Triage Stage: UnreviewedSomeday/Maybe
Version: 1.7master

We've introduced django-admin because commands don't usually have "language extensions".

We're keeping for backwards-compatibility.

There's little benefit to remove and it would be very disruptive.

Maybe we'll do to at some point, but not soon.

comment:2 Changed 4 years ago by Aymeric Augustin

We should wait until support for Django 1.6 ends to remove

Otherwise, it will become complicated to write version-independent test scripts (think tox.ini).

comment:3 Changed 4 years ago by Collin Anderson

If we do remove it, we should officially deprecate it first, right?

comment:4 Changed 4 years ago by Aymeric Augustin

Yes, the fast track would be to deprecate it in Django 1.8 and remove it in Django 2.0.

However, there's almost no downside to keeping it for a few more years, and it will avoid making many tutorials obsolete (for example).

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