GithubHelp home page GithubHelp logo

labd / django-oscar-wagtail Goto Github PK

View Code? Open in Web Editor NEW
98.0 20.0 32.0 58 KB

Wagtail integration for Oscar Commerce (or Oscar Commerce integration for Wagtail?)

License: MIT License

Makefile 0.92% Python 89.55% HTML 4.61% JavaScript 4.92%
wagtail e-commerce django django-oscar

django-oscar-wagtail's Introduction

Django Oscar Wagtail

image

image

image

image

This project integrates the Wagtail CMS with Django Oscar for eCommerce. It adds the following features:

  • each Oscar category page can now be managed by the Wagtail CMS
  • it is possible to add product lists to wagtail pages

Installation

Presuming you have installed Django-Oscar and Wagtail into your Django project.

First install django-oscar-wagtail via PIP:

pip install django-oscar-wagtail

And add oscar_wagtail to your settings as follows:

INSTALLED_APPS = [
    # ... your other apps
    'oscar_wagtail',
]

Add the URLs to urls.py:

import oscar_wagtail.urls

urlpatterns += [
    url(r'^api/oscar_wagtail/', include(oscar_wagtail.urls)),
]

Fork the catalogue app as described in the oscar documentation. Then instead of using the AbstractCategory from Oscar use the one from this project as follows:

from oscar_wagtail.abstract_models import AbstractCategory


class Category(AbstractCategory):
    pass

from oscar.apps.catalogue.models import *

If you want to have a CMS button in the Oscar dashboard, add the following to your settings:

OSCAR_DASHBOARD_NAVIGATION.insert(1, {
    'label': 'CMS',
    'icon': 'icon-th-list',
    'url_name': 'wagtailadmin_home',
    'access_fn': lambda user, *args: user.has_perm('wagtailadmin.access_admin')
})

django-oscar-wagtail's People

Contributors

mvantellingen avatar pimvernooij avatar pjstevns avatar samitnuk avatar vdboor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-oscar-wagtail's Issues

Can't use with django 2.2

I am using
django 2.2
django-oscar 2.0.4

I can't use wagtail<2.6 since I am using django 2.2( django2.2 support is with wagtail 2.6 ).
And django-oscar-wagtail require wagtail <2.4.
Can you give me some ideas to use wagtail with django-oscar.

Can't create new category from the Oscar Dashboard

After installing oscar-wagtail I can't add Categories from the Oscar dashboard interface, but I can add them from the Wagtail admin. Is this the intended behaviour?

After trying to add a category in the dashboard I get this error message:

Exception Type: ValidationError
Exception Value: {'path': [u'Page with this Path already exists.'], 'slug': [u'This field cannot be blank.'], 'title': [u'This field cannot be blank.']}

Can't fork with latest pip version

django-oscar==1.6.6
django-oscar-wagtail==0.2.0
wagtail==2.3

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/my/project/directory/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/my/project/directory/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 357, in execute
    django.setup()
  File "/my/project/directory/venv/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/my/project/directory/venv/lib/python3.6/site-packages/django/apps/registry.py", line 112, in populate
    app_config.import_models()
  File "/my/project/directory/venv/lib/python3.6/site-packages/django/apps/config.py", line 198, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/my/project/directory/venv/lib/python3.6/site-packages/oscar_wagtail/models.py", line 5, in <module>
    from wagtail.wagtailadmin.edit_handlers import (FieldPanel, InlinePanel,)
ModuleNotFoundError: No module named 'wagtail.wagtailadmin'

Request for documentation

Trying to understand better how to properly install the package and integrate Oscar with Wagtail but seemingly missing something. Any chance you could post more detailed instructions?
Also, what are the version requirements for Wagtail and Oscar?

Many thanks,

Migrate problem

wenn i use django-oscar-wagtail to migrate my exists oscar project i get this error.
i first run makemigrations command, and then migrate i get this error
django.db.utils.OperationalError: (1091, "Can't DROP 'depth'; check that column/key exists")

can you tell me how to fix it, thx

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.