django-admin2/example/blog/admin2.py

11 lines
256 B
Python
Raw Normal View History

2013-05-18 10:57:01 +00:00
# Import the Admin2 base class
from djadmin2.models import Admin2
# Import your custom models
2013-05-18 11:12:12 +00:00
from .models import Post, Comment
2013-05-18 10:57:01 +00:00
# Instantiate the Admin2 class
# Then attach the admin2 object to your model
Post.admin2 = Admin2()
Comment.admin2 = Admin2()