Skip to content

informa/django-oscar-fancypages

 
 

Repository files navigation

Fancy CMS-style page editing for Oscar

https://travis-ci.org/tangentlabs/django-oscar-fancypages.png https://coveralls.io/repos/tangentlabs/django-oscar-fancypages/badge.png?branch=master

Warning

I just commited a bug fix that will break for existing projects using django-oscar-fancypages as I had to regenerate the initial migration. Since this is an import issue and not an actual model change, I didn't see a way around this via migrations. Sorry for any inconvenience.

Keep in mind that this is still under development and breaking changes like the one above are not unlikely. Use with care and hold off on that production build until the first proper release.

django-oscar and provides it's features as a content enhancement system to Oscar. The fancy pages integrate with the category structure of Oscar by wrapping around the ProductCategory model, plugging them into the category tree of Oscar. As a result, the existing category structure is available as fancy pages after installing django-oscar-fancypages (OFP) and creating a fancypage creates a ProductCategory that can be used to display products.

For more details on fancy pages refer to django-fancypages

Installation

Before installing OFP and use it with your project, make sure that you have setup django-oscar properly. If you haven't done so, please check the Oscar documentation for installation instructions. Come back here after you have successfully set up your Oscar sandbox and follow these steps:

  1. Install django-oscar-fancypages from the github repo using pip. Currently there's no PyPI release available. To install run the following command:

    $ pip install git+https://github.com/tangentlabs/django-oscar-fancypages/tarball/master
    
  2. Add all required third-party apps and the OFP apps to your INSTALLED_APPS. There are convenience functions available to make it easier:

    import oscar_fancypages as ofp
    INSTALLED_APPS = (
        ...
    ) + ofp.get_required_apps() + ofp.get_oscar_fancypages_apps()
    
  3. For all the static files and templates that are required from django-fancypages, you have to add a couple of extra lines to make sure that these files can be overwritten locally by putting the search locations in the right order. Again, there's a convenience function available:

    TEMPLATE_DIRS = [
        ...
    ] + ofp.get_oscar_fancypages_paths('templates')
    
    ...
    
    STATICFILES_DIRS = [
        ...
    ] + ofp.get_oscar_fancypages_paths('static')
    
  4. Next, you have to add the editor middleware that let's you access the editor panel on pages with a fancypage container:

    MIDDLEWARE_CLASSES = (
        ...
        'fancypages.middleware.EditorMiddleware',
    )
    
  5. Finally, it makes sense to add all the default settings for OFP to your settings.py to prevent errors caused by missing settings, e.g. the twitter package does not allow unset API keys and tokens. Use the following at the end of your settings.py before overriding any of the settings:

    from oscar_fancypages.defaults import *
    

License

django-oscar-fancypages is released under the permissive New BSD license.

About

Django Oscar CMS module

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.0%
  • Shell 2.9%
  • Ruby 0.1%