1
0
mirror of https://github.com/django/django.git synced 2024-12-23 09:36:06 +00:00
django/tests/admin_utils/admin.py
Claude Paroz cf7894be88 Fixed #21113 -- Made LogEntry.change_message language independent
Thanks Tim Graham for the review.
2016-01-08 20:34:59 +01:00

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)