My favorites | Sign in
Project Home Downloads Issues Source
Search
for
Installation_2_2  
Updated Oct 1, 2010 by klemens.mantzos

Installation

Before Installing Grappelli, please take a look at the known Django Issues.

  1. Download Grappelli
  2. Install Grappelli anywhere on your python-path.
    svn checkout http://django-grappelli.googlecode.com/svn/trunk/grappelli/ grappelli
  3. Add Grappelli to your INSTALLED APPS
  4. Open your projects settings-file (settings.py) and add Grappelli to your INSTALLED APPS before django.contrib.admin.
    INSTALLED_APPS = (
        ...
        'grappelli',
        
        # if you use admin_tools
        'admin_tools.theming',
        'admin_tools.menu',
        'admin_tools.dashboard',
        
        'django.contrib.admin',
        ...
    )
  5. Add context-processors
  6. Open your projects settings-file. For Grappelli, you need the request context processor. The authentication context processor is needed for the admin-interface anyway. The grappelli.context_processors.admin_template_path is required to check if you use admin_tools or not (and render the necessary templates).
    TEMPLATE_CONTEXT_PROCESSORS = (
        "django.core.context_processors.auth",
        "django.core.context_processors.request",
        ...
        "grappelli.context_processors.admin_template_path",
    )
  7. Change urls.py
  8. Add Grappelli to your url-definitions.
    (r'^grappelli/', include('grappelli.urls')),
  9. Change grappelli/settings.py
  10. Take a look at the available grappelli-settings and change them (if needed).
  11. Copy/Symlink media
  12. Copy the folder /media/ to your admin media-directory. Alternatively, you might want to use a symlink.
    cp -R /path/to/grappelli/media /path/to/your/admin/media
    Note: If possible, avoid using /django/contrib/admin/media/ as your media directory (since it will break future django-updates).
    If your ADMIN_MEDIA_PREFIX is /media/admin/ (for example), you need a directory "admin" within your media-directory. Inside of /admin/, you need all Grappelli media files.
  13. admin_tools (BETA)
  14. if you use admin_tools please check the documentation and make sure your admin_tools setup works without grappelli (if it doesn't work with grappelli). we are currently at the beginning of skinning admin_tools. so there are some features of admin_tools not supported yet, if you use it with grappelli. For further information check grappelli+admin_tools setup

Note: If you use Djangos integrated development server, start it with

python manage.py runserver mydomain.com:8000 --adminmedia=/path/to/your/admin/media/
Powered by Google Project Hosting