Code Monkey home page Code Monkey logo

djangocms-navigation's Introduction

djangocms-navigation

Installation

Requirements

django CMS Navigation requires that you have a django CMS 4.0 (or higher) project already running and set up.

To install

Run:

pip install djangocms-navigation

Add djangocms_navigation to your project's INSTALLED_APPS.

Run:

python manage.py migrate djangocms_navigation

to perform the application's database migrations.

Running Tests

You can run all the tests by executing:

python -m venv venv source venv/bin/activate python setup.py test

# Alternatively you could run the test runner stand-alone pip install -r tests/requirements.txt python tests.settings.py

App Integration

To register model to use navigation app, app should provide class in cms_config.py which inherit CMSAppConfig class. It should have djangocms_navigation_enabled flag True which register to use djangocms_navigation and provide model mapping object, navigation_models.

Mapping object should provide Model class as key and list of model fields which will be used for autocomplete form fields. E.g. if you have a PageContent model and an Article model, when you are choosing the Content_Object to link a menu item to, you may want the "title" field for the PageContent model and the "slug" field for the Article model. Example of configuration defined below.

class CoreCMSAppConfig(CMSAppConfig):
    djangocms_navigation_enabled = True
    navigation_models = {
        Model: ["model_field", ],
    }

djangocms-navigation's People

Contributors

aiky30 avatar michaeljcollinsuk avatar chaosk avatar adam-murray avatar narenderrajub avatar vipulnarang95 avatar monikasulik avatar jonathan-s avatar bernardvdv avatar geoidesic avatar evangeloskp avatar joshyu avatar marktsavage avatar kinkerl avatar dependabot[bot] avatar

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.