mirror of
https://github.com/django/django.git
synced 2024-12-23 17:46:27 +00:00
cf7894be88
Thanks Tim Graham for the review.
19 lines
357 B
Python
19 lines
357 B
Python
from django.contrib import admin
|
|
|
|
from .models import Article, ArticleProxy, Site
|
|
|
|
|
|
class ArticleInline(admin.TabularInline):
|
|
model = Article
|
|
fields = ['title']
|
|
|
|
|
|
class SiteAdmin(admin.ModelAdmin):
|
|
inlines = [ArticleInline]
|
|
|
|
|
|
site = admin.AdminSite(name='admin')
|
|
site.register(Article)
|
|
site.register(ArticleProxy)
|
|
site.register(Site, SiteAdmin)
|