mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-04-03 23:00:34 +00:00
Additional documentation
This commit is contained in:
parent
3bfac69a9a
commit
e5a140eeb2
2 changed files with 21 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ Our goal is to make this API work:
|
|||
# myapp/admin2.py
|
||||
|
||||
# Import the Admin2 base class
|
||||
from admin2.sites import Admin2
|
||||
from admin2.models import Admin2
|
||||
|
||||
# Import your custom models
|
||||
from blog.models import Post
|
||||
|
|
|
|||
|
|
@ -5,6 +5,26 @@ Welcome to django-admin2's documentation!
|
|||
``django.contrib.admin``. Come and help us, have a look at the
|
||||
:doc:`contributing` page and see our `GitHub`_ page.
|
||||
|
||||
Basic API
|
||||
==============
|
||||
|
||||
Our goal is to make this API work:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# myapp/admin2.py
|
||||
|
||||
# Import the Admin2 base class
|
||||
from djadmin2.models import Admin2
|
||||
|
||||
# Import your custom models
|
||||
from blog.models import Post
|
||||
|
||||
# Instantiate the Admin2 class
|
||||
# Then attach the admin2 object to your model
|
||||
Post.admin2 = Admin2()
|
||||
|
||||
|
||||
.. _GitHub: https://github.com/pydanny/django-admin2
|
||||
|
||||
Content
|
||||
|
|
|
|||
Loading…
Reference in a new issue