Skip to main content

A simple to use product categories module for django SHOP

Project description

This companion applicatoin to django SHOP provides an example of how shop implementors could implement a simple category system.

It is perfectly usable as a simple category system.

In basic setup, you can select products on category admin page. If you want to set categories in product admin page, subclass ProductWithCategoryForm, set Meta option model to your product model, and set this form as your product form:

from shop_simplecategories.admin import ProductWithCategoryForm

class ProductForm(ProductWithCategoryForm):
    class Meta(object):
        model = Product

class ProductAdmin(admin.ModelAdmin):
    form = ProductForm

For your convenience we have added a templatetag show_root_categories that outputs all root categories for you:

{% load shop_simplecategories_tags %}

<ul>{% show_root_categories %}</ul>

If you want to manipulate the output of that template tag, just override the template shop_simplecategories/show_root_categories.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-shop-simplecategories-0.0.5.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file django-shop-simplecategories-0.0.5.tar.gz.

File metadata

File hashes

Hashes for django-shop-simplecategories-0.0.5.tar.gz
Algorithm Hash digest
SHA256 ae92a7a9394f4ee1de945c6a20c06ff05bc34921c851901f1ae2c380e0778e02
MD5 e596570ea3a699386a4123c86049693f
BLAKE2b-256 789c87d04beeffafc5727953b4b8fda48049a0096439f551709b2ea42e744738

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page