Skip to main content
Help us improve Python packaging – donate today!

mezzanine-grappelli makes Mezzanine ♥ Grappelli

Project Description

Mezzanine-Grappelli makes Mezzanine ♥ Grappelli.

For compatibility reasons, Mezzanine uses forks of Grappelli and Filebrowser, known as grappelli-safe and filebrowser-safe.

You want the awesomeness of Mezzanine with the sweetness of the latest Grappelli version? This application does exactly that: it allows you to use the full power of the latest vanilla versions of both Grappelli and Filebrowser in your Mezzanine projects.

https://github.com/sephii/mezzanine-grappelli/raw/master/docs/images/login.png https://github.com/sephii/mezzanine-grappelli/raw/master/docs/images/filebrowser.png

Installation

First, install mezzanine-grappelli with pip (this will automatically install Grappelli and Filebrowser as well):

pip install mezzanine-grappelli

In your settings.py file, adapt the value of PACKAGE_NAME_FILEBROWSER and PACKAGE_NAME_GRAPPELLI:

PACKAGE_NAME_FILEBROWSER = "filebrowser"
PACKAGE_NAME_GRAPPELLI = "grappelli"

Still in your settings.py file, add mezzanine_grappelli, grappelli and filebrowser to your INSTALLED_APPS (make sure they appear before any mezzanine app):

INSTALLED_APPS = (
    "mezzanine_grappelli",
    PACKAGE_NAME_GRAPPELLI,
    PACKAGE_NAME_FILEBROWSER,
    ...
)

Add Grappelli URLs to your urls.py file:

urlpatterns += patterns("",
    ...
    ("^grappelli/", include("grappelli.urls")),
    ...
)

You’re done!

Rough edges

The project still being in its early days, it has a few rough edges you should be aware of.

TabularDynamicInlineAdmin doesn’t work

Use classic Django TabularInline instead.

Filebrowser error: “Error finding Upload-Folder (site.storage.location + site.directory). Maybe it does not exist?”

That’s because Filebrowser doesn’t automatically create the uploads directory, so just create the MEDIA_ROOT + 'uploads/' directory

FileField doesn’t work

When using FileField fields you need to put the format in lowercase (ie. “image” instead of “Image”) otherwise you’ll get a Filebrowser exception. That’s especially true for already defined Mezzanine models (such as the BlogPost model). To fix the issue for already-defined Mezzanine models, you can add the following to your settings file:

FILEBROWSER_SELECT_FORMATS = {
    'File': ['Folder', 'Image', 'Document', 'Video', 'Audio'],
    'Document': ['Document'],
    'Media': ['Video', 'Audio'],
    'Image': ['Image'],
    'image': ['Image'],
}

TODO

  • Make TabularDynamicInlineAdmin work or at least fall back to a usable solution

Bugs, contributing

If you find bugs, you’re very welcome to report them using the Github issue tracker.

Release history Release notifications

This version
History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
mezzanine-grappelli-0.1.0.tar.gz (11.8 kB) Copy SHA256 hash SHA256 Source None Feb 6, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page