Guessable entry points

106 views
Skip to first unread message

Ryan Hiebert

unread,
Apr 30, 2015, 1:15:46 PM4/30/15
to django-d...@googlegroups.com
https://github.com/django/django/pull/4588

I this PR I suggest to add a `django` entry point that is identical to `django-admin`, and a `__main__.py` that also is a mirror of `django-admin`.

There’s also related discussion at https://github.com/django/django/pull/3861

There’s precedent for using these as the primary methods of use all over the place. Flask, in particular, uses both the `flask` command as well as `python -m flask`. Celery also uses the `celery` command as well as `python -m celery`.


I see value in adding these endpoints that are more easily guessable. However, there’s a cost too, the cost of having more than one way to do it. We already have `django-admin` and `django-admin.py`, would adding these obvious entry points give too many options?

Ryan

Aymeric Augustin

unread,
May 1, 2015, 5:58:38 AM5/1/15
to django-d...@googlegroups.com
`python -m django` as a alias for `django-admin` sounds good.

-- 
Aymeric.



--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/90DC7B87-35F5-4B77-93EA-7734DA31EA86%40ryanhiebert.com.
For more options, visit https://groups.google.com/d/optout.

Michael Manfre

unread,
May 1, 2015, 8:33:36 AM5/1/15
to django-d...@googlegroups.com
I like the alias.


For more options, visit https://groups.google.com/d/optout.



--
GPG Fingerprint: 74DE D158 BAD0 EDF8

Enrique Paredes

unread,
May 1, 2015, 9:51:50 AM5/1/15
to django-d...@googlegroups.com, django-d...@googlegroups.com
So along this line of thought,  `django-admin` is a good command name? 

To me the admin, in the django world is a clear distint concept to what this command does.

Besides to be used to it, seems more natural to call it `django`. 

Cheers,
E.



Florian Apolloner

unread,
May 1, 2015, 9:56:06 AM5/1/15
to django-d...@googlegroups.com


On Friday, May 1, 2015 at 3:51:50 PM UTC+2, Enrique Paredes wrote:
So along this line of thought,  `django-admin` is a good command name? 

Does not really matter imo, that is what we have now and we should not change this without a really good reason.

Cheers,
Florian

Aymeric Augustin

unread,
May 1, 2015, 10:03:25 AM5/1/15
to django-d...@googlegroups.com
On 1 mai 2015, at 15:51, Enrique Paredes <mad.z...@gmail.com> wrote:

> So along this line of thought, `django-admin` is a good command name?

Well, it’s a reasonably unambiguous way to refer to the django-admin command, which is good for the docs.

“django” is more ambiguous: it can refer to the framework itself (although incorrectly capitalized) or to the top-level Python package.

--
Aymeric.




Marc Tamlyn

unread,
May 1, 2015, 10:25:59 AM5/1/15
to django-d...@googlegroups.com
Yes to python -m django
No to django as another alias for django-admin. After all, someone who is just "guessing" will probably type dj<tab> and get django-admin[.py] anyway.

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
Reply all
Reply to author
Forward
0 new messages