GithubHelp home page GithubHelp logo

rodolfotorres02 / django-oscar-promotions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from django-oscar/django-oscar-promotions

0.0 0.0 0.0 82 KB

Python 74.79% CSS 1.28% HTML 23.80% Makefile 0.13%

django-oscar-promotions's Introduction

Django Oscar Promotions

Django Oscar Promotions is an app for Dashboard-editable promotional content in Oscar. It was formerly a part of Oscar core, but has now been separated into a standalone app.

Installation

Install the package with pip install django-oscar-promotions.

Add the following entries to INSTALLED_APPS:

INSTALLED_APPS = [
    ...,
    'oscar_promotions.apps.PromotionsConfig',
    'oscar_promotions.dashboard.apps.PromotionsDashboardConfig',
]

And the following URL patterns to your project's URL configuration:

urlpatterns = [
    ...,
    path("", apps.get_app_config("oscar_promotions").urls),
    path("dashboard/promotions/", apps.get_app_config("oscar_promotions_dashboard").urls),
]

You can, if you prefer, include the dashboard URLs inside the URL configuration of your forked dashboard app.

If you want the dashboard views to be accessible from the dashboard menu, add them to OSCAR_DASHBOARD_NAVIGATION. The snippet below will add two menu items to the Content menu.

OSCAR_DASHBOARD_NAVIGATION[5]['children'] += [
    {
        'label': 'Content blocks',
        'url_name': 'oscar_promotions_dashboard:promotion-list',
    },
    {
        'label': 'Content blocks by page',
        'url_name': 'oscar_promotions_dashboard:promotion-list-by-page',
    },
]

Add the promotions context processor to your TEMPLATES setting:

TEMPLATES = {
    'context_processors': [
        ...
        'oscar_promotions.context_processors.promotions',
    ]
}

django-oscar-promotions's People

Contributors

solarissmoke avatar dependabot-preview[bot] avatar sacabuche avatar dfirst 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.