Skip to content
This repository has been archived by the owner on Aug 9, 2019. It is now read-only.

dinoperovic/django-shop-catalog

Repository files navigation

django-shop-catalog

image

image

Catalog app for django SHOP.

This project is ment for version 0.2.x of djangoSHOP. If you use djangoSHOP version 0.9.x and above, there's a new project djangoshop-shopit.

Find starting templates in django-shop-catalog-templates repo.

Requirements

django>=1.6,<1.8
django-cms>=3.0.1
django-shop>=0.2.0
django-filer>=0.9.5
django-mptt>=0.6.0
django-parler>=1.4
measurement>=1.7.2
django-currencies>=0.3.2

Installation

Install with pip:

pip install django-shop-catalog

Install from github using pip:

pip install -e git://github.com/dinoperovic/django-shop-catalog.git@master#egg=django-shop-catalog

Getting Started

Setup django-cms, django-shop, django-filer, django-parler and django-currencies.

Your INSTALLED_APPS should look something like this:

INSTALLED_APPS = [
    'djangocms_admin_style',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',
    'cms',
    'mptt',
    'menus',
    'south',
    'sekizai',
    'djangocms_text_ckeditor',
    'filer',
    'easy_thumbnails',
    'currencies',
    'parler',
    'shop',
    'catalog',

    # Optional catalog apps.
    'catalog.orders',
    'catalog.addresses',
    'catalog.reviews',
]

Add to your settings.py:

SHOP_PRODUCT_MODEL = 'catalog.models.Product'
SHOP_CART_MODIFIERS = (
    'catalog.cart_modifiers.CatalogCartModifier',
)

# If you're using 'catalog.orders' app.
SHOP_ORDER_MODEL = 'catalog.orders.models.Order'

# If you're using 'catalog.addresses' app.
SHOP_ADDRESS_MODEL = 'catalog.addresses.models.Address'

Add to your patterns in urls.py:

urlpatterns = i18n_patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^currencies/', include('currencies.urls')),

    # Include catalog shop_urls before django-shop urls.
    url(r'^shop/', include('catalog.shop_urls')),
    url(r'^shop/', include('shop.urls')),

    # You can include catalog urls here or use django-cms app hook.
    url(r'^catalog/', include('catalog.urls')),
    url(r'^', include('cms.urls')),
)

Run:

python manage.py migrate

Install django-shop-catalog-templates to get started quickly.

Notes

If your're using catalog.addresses app, you can run this command to have all countries and regions pulled from geonames.org.

python manage.py initcountries