Source

"""Admin interface for the sphinxdoc app."""fromdjango.contribimportadminfromsphinxdoc.modelsimportProject,DocumentclassProjectAdmin(admin.ModelAdmin):"""Admin interface for :class:`~sphinxdoc.models.Project`."""list_display=('name','path',)prepopulated_fields={'slug':('name',)}classDocumentAdmin(admin.ModelAdmin):"""Admin interface for :class:`~sphinxdoc.models.Document`. Normally, you shouldn't need this, since you create new documents via the management command. """list_display=('path','title','project',)list_filter=('project',)admin.site.register(Project,ProjectAdmin)admin.site.register(Document,DocumentAdmin)