Giter Site home page Giter Site logo

djangocms-custommenu's Introduction

django CMS custommenu

django CMS custommenu is a set of plugins for django CMS that allow you to publish menu in the same way as it can be done via menu template tags hard coded in the template.

Requirements

  • Python 2.7, 3.3 or higher
  • Django 1.8 or higher

Installation

For a manual install:

  • run pip install djangocms-custommenu
  • add djangocms_custommenu to your INSTALLED_APPS
  • run python manage.py migrate djangocms_custommenu

Configuration

You are encouraged to adapt and override provided templates to your project's requirements and optionally provide additional template choices by adding a DJANGOCMS_CUSTOMMENU_TEMPLATES or DJANGOCMS_CUSTOMMENU_AUTOMENU_TEMPLATES settings:

DJANGOCMS_CUSTOMMENU_TEMPLATES = [
    ('feature', _('Featured Version')),
]

You'll need to create the appropriate folders and files inside templates/djangocms_custommenu/ otherwise you will get a template does not exist error.

djangocms-custommenu's People

Contributors

darbula avatar qdotme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

djangocms-custommenu's Issues

Error when migrate

When i tried to migrate my database, the followed error has appeared:

Traceback (most recent call last):
File "manage.py", line 21, in
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/home/mazzolli/.virtualenvs/ticonnecte/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
utility.execute()
File "/home/mazzolli/.virtualenvs/ticonnecte/lib/python3.6/site-packages/django/core/management/init.py", line 357, in execute
django.setup()
File "/home/mazzolli/.virtualenvs/ticonnecte/lib/python3.6/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/mazzolli/.virtualenvs/ticonnecte/lib/python3.6/site-packages/django/apps/registry.py", line 112, in populate
app_config.import_models()
File "/home/mazzolli/.virtualenvs/ticonnecte/lib/python3.6/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/home/mazzolli/.virtualenvs/ticonnecte/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in call_with_frames_removed
File "/home/mazzolli/.virtualenvs/ticonnecte/lib/python3.6/site-packages/djangocms_custommenu/models.py", line 21, in
class CustomMenu(CMSPlugin):
File "/home/mazzolli/.virtualenvs/ticonnecte/lib/python3.6/site-packages/djangocms_custommenu/models.py", line 48, in CustomMenu
help_text=
("Menu tree starts from this page. "
TypeError: init() missing 1 required positional argument: 'on_delete'

Multisite issue.

This happened using more than one SITE_ID.

instance.root_page.get_reverse_id
was resulting in None, it seems it was trying to refer to a page in SITE_ID =1.

Decided to replace:

root_page = models.ForeignKey
root_page = PageField 

working as expected now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.