How to replace Django management command in 1.7

53 views
Skip to first unread message

Rafał Pitoń

unread,
Jun 21, 2014, 5:35:05 PM6/21/14
to django...@googlegroups.com
Hello,

In my app I am using custom user model with my own createsuperuser command.

However after updating my dev to Django 1.7 I've realized that behaviour of commands discoverer was changed from "last one wins", to "first_one_wins" so first command discovered is preffered instead.

I've fixed this temporarily by moving my app above contrib.auth in INSTALLED_APPS, but this seems hacky to me.

Is there other way to override management commands?

Russell Keith-Magee

unread,
Jun 22, 2014, 7:43:25 PM6/22/14
to Django Users
No - there isn't; INSTALLED_APPS order is the only control you have over this process.

The change in management command order was necessary to make behaviour consistent with other parts of the system (e.g., template loaders).

Yours,
Russ Magee %-)

Rafał Pitoń

unread,
Jun 23, 2014, 9:14:47 AM6/23/14
to django...@googlegroups.com
Allright, thanks for answer.
Reply all
Reply to author
Forward
0 new messages