Opened 7 years ago

Closed 3 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 7 years ago by mtredinnick

  • milestone set to post-1.0
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Someday/Maybe

comment:2 Changed 7 years ago by julianb

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 7 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:4 Changed 4 years ago by lukeplant

  • Severity set to Normal
  • Type set to New feature

comment:5 Changed 4 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:6 Changed 4 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:7 Changed 3 years ago by aaugustin

  • Resolution set to wontfix
  • Status changed from new to closed

You can now use a custom app templates for this.

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