mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-16 22:20:24 +00:00
Update django.contrib.admin reference file to provide reference for this pull request
This commit is contained in:
parent
bb3d4712b9
commit
a5cb74fb63
1 changed files with 10 additions and 1 deletions
|
|
@ -1,5 +1,14 @@
|
|||
from django.contrib import admin
|
||||
|
||||
from .models import Post, Comment
|
||||
|
||||
admin.site.register(Post)
|
||||
|
||||
class CommentInline(admin.TabularInline):
|
||||
model = Comment
|
||||
|
||||
|
||||
class PostAdmin(admin.ModelAdmin):
|
||||
inlines = [CommentInline, ]
|
||||
|
||||
admin.site.register(Post, PostAdmin)
|
||||
admin.site.register(Comment)
|
||||
|
|
|
|||
Loading…
Reference in a new issue