Posted By

Affix on 01/14/11


Tagged

django


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Sereniel


admin.py


 / Published in: Python
 

URL: http://affix.me

  1. from django.contrib import admin
  2. from blog.blogsys.models import *
  3.  
  4. class category_admin(admin.ModelAdmin):
  5. pass
  6.  
  7. class post_admin(admin.ModelAdmin):
  8. fieldsets = (
  9. ("Basic Information",
  10. {
  11. 'fields': ('entry_title', 'entry_category')
  12. }),
  13. (None,
  14. {
  15. 'fields': ('entry_content')
  16. }),
  17. )
  18.  
  19.  
  20. class comment_admin(admin.ModelAdmin):
  21. pass
  22.  
  23. admin.site.register(Category, category_admin)
  24. admin.site.register(Post, post_admin)
  25. admin.site.register(Comment, comment_admin)

Report this snippet  

You need to login to post a comment.