#24857: Add __main__ entry point as an alias for django-admin
-------------------------------------+-------------------------------------
     Reporter:  tricoder42           |                    Owner:
                                     |  tricoder42
         Type:  New feature          |                   Status:  assigned
    Component:  Core (Management     |                  Version:  master
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  1
  Needs tests:  1                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by tricoder42):

 I've started working on it. I want to make `django/bin/django-admin.py` an
 alias for `django/__main__.py` so we don't have to duplicate code (just
 two lines though) but the best what I've got so far is:


 {{{
 # django/bin/django-admin.py
 #!/usr/bin/env python
 from runpy import run_module

 if __name__ == "__main__":
     run_module('django')
 }}}

 Not sure if it's worth it. I'll rather write some tests…

--
Ticket URL: <https://code.djangoproject.com/ticket/24857#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.17d8cca4c72e9518aba7b0a8a26af1d4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to