django admin 时间线

  1. Install in your virtual environment

Latest stable version from PyPI:

pip install django-admin-timeline

Latest stable version from BitBucket:

pip install https://bitbucket.org/barseghyanartur/django-admin-timeline/get/stable.tar.gz

Latest stable version from GitHub:

pip install https://github.com/barseghyanartur/django-admin-timeline/archive/stable.tar.gz
  1. Add admin_timeline to your INSTALLED_APPS in the global settings.py.
INSTALLED_APPS = (
    # ...
    'admin_timeline',
   # ...
)
  1. Collect the static files by running (see the Troubleshooting section in case of problems):
./manage.py collectstatic
  1. Override app settings in your global settings module (see the apps.admin_timeline.defaults for the list of settings). As for now, most important of those is NUMBER_OF_ENTRIES_PER_PAGE - number of entries displayed per page (for both non-AJAX and AJAX requests).
  2. Add the following lines to the global urls module:
# Admin timeline URLs. Should be placed BEFORE the Django admin URLs.
(r'^admin/timeline/', include('admin_timeline.urls')),
url(r'^admin/', include(admin.site.urls)),

 

posted @ 2017-10-31 10:01  hyu9999  Views(420)  Comments(0)    收藏  举报