On Sunday, January 2, 2011, James Hancock <jlhanc...@gmail.com> wrote: > Django-dev, > > I know this is probably just lasy, but can we have startapp check if admin is > installed and if it is, add an admin.py file? > > If it isn't safe to assume then I understand not doing it, but it seems that > if you have the admin installed and you create a new app you normally use > admin.py somehow. > > What do you think? > > I thought I would post here because it probably has some far reaching effects > somewhere that I would have never thought of. It always seems to. :)
In this case, it's just a matter of something that nobody has put the effort into writing the code. The idea has been proposed (at least informally) in the past. It hasn't been a very high priority because creating a new admin.py file isn't *that* hard, so implementing this particular feature has taken second place to more substantial changes. The only implementation detail that has been discussed in the past (that I'm aware of) is that admin.py shouldn't be created unless admin is actually installed, but you've already covered that. The other suggestion I have would be to implement the feature as a general facility that any app could hook into, rather than a special case for contrib.admin. A signal emitted by the startapp command would be one option here. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.