]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blob - sommitrealweird/blog/admin.py
Changes to make it work with django 1.11 and python3
[sommitrealweird.git] / sommitrealweird / blog / admin.py
1 from blog.models import BlogEntry, BlogSection
2 from django.contrib import admin
3
4 class BlogEntryAdmin(admin.ModelAdmin):
5     prepopulated_fields = { "slug": ("title",) }
6
7 admin.site.register(BlogEntry, BlogEntryAdmin)
8
9 class BlogSectionAdmin(admin.ModelAdmin):
10     prepopulated_fields = { "slug": ("title",) }
11
12 admin.site.register(BlogSection, BlogSectionAdmin)
13