Opened 8 years ago

Closed 4 years ago

#8173 closed New feature (wontfix)

manage.py startapp should create admin.py file

Reported by: julian24 Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Someday/Maybe
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It would be very useful if manage.py and django-admin.py create the file admin.py. It should contain something like this:

from django.contrib import admin
from <app_name>.models import *

# Register your models here

Maybe it's possible to do this with a condition that checks whether 'django.contrib.admin' is in the INSTALLED_APPS of the project.

Change History (7)

comment:1 Changed 8 years ago by Malcolm Tredinnick

milestone: post-1.0
Triage Stage: UnreviewedSomeday/Maybe

comment:2 Changed 8 years ago by Julian Bez

admin is not in INSTALLED_APPS by default, so admin.py would not get created. And since it's in contrib, creating admin.py all the time does not make sense IMO.

comment:3 Changed 8 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:4 Changed 6 years ago by Luke Plant

Severity: Normal
Type: New feature

comment:5 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:7 Changed 4 years ago by Aymeric Augustin

Resolution: wontfix
Status: newclosed

You can now use a custom app templates for this.

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