Skip to content

Commit 86c5009

Browse files
committed
3b. Blog App: Django Admin
1 parent 6fdccb8 commit 86c5009

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

rp-portfolio/blog/admin.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1-
# from django.contrib import admin
1+
from django.contrib import admin
2+
from blog.models import Post, Category
23

3-
# Register your models here.
4+
5+
class PostAdmin(admin.ModelAdmin):
6+
pass
7+
8+
9+
class CategoryAdmin(admin.ModelAdmin):
10+
pass
11+
12+
13+
admin.site.register(Post, PostAdmin)
14+
admin.site.register(Category, CategoryAdmin)

0 commit comments

Comments
 (0)