Skip to main content
Django Plugshop
===============

A set of useless abstract models

Requirements
============

1. [django](https://github.com/django/django/) >= 1.4, <=1.5
2. [django-mptt](https://github.com/django-mptt/django-mptt/)

Installation
============

* Add the `plugshop` directory to your Python path.

* Add `plugshop` to your `INSTALLED_APPS`

* Add the following middleware to your project's settings.py file:

`plugshop.middleware.CartMiddleware`

* Add the request context processor:

TEMPLATE_CONTEXT_PROCESSORS = (
# ...
'django.core.context_processors.request',
# ...
)

* Add URL-patterns:

urlpatterns = patterns('',
url(r'^shop/', include('plugshop.urls')),
)

* Override default models. Example:

PLUGSHOP_MODELS = {
'PRODUCT': 'myshop.Product',
'CATEGORY': 'myshop.Category',
'ORDER': 'myshop.Order',
}

* Run `python manage.py syncdb`

* Profit!

Configuration
=============

Models:

PLUGSHOP_MODELS = {
'PRODUCT': 'plugshop.Product',
'CATEGORY': 'plugshop.Category',
'ORDER': 'plugshop.Order',
'ORDER_PRODUCTS': 'plugshop.OrderProducts',
}

Forms:

PLUGSHOP_FORMS = {
'ORDER': 'plugshop.forms.OrderForm',
}

Config:

PLUGSHOP_CONFIG = {
'REQUEST_NAMESPACE': 'cart',
'SESSION_NAMESPACE': 'cart',
'URL_PREFIX': 'shop/',
}

Other options:

PLUGSHOP_OPTIONS = {
# Possible values of the status of the order. Default values:
'STATUS_CHOICES': (
(1, _('Created')),
(2, _('Confirmed')),
(3, _('Denied')),
(4, _('Shipped')),
(5, _('Completed')),
),
}

Cart
====

#views.py
def my_view(request):
cart = request.cart

Or

#settings.py
PLUGSHOP_CONFIG = {
...
'REQUEST_NAMESPACE': 'my_cart_namespace',
...
}

#views.py
def my_view(request):
cart = request.my_cart_namespace

Metadata

Release files for django-plugshop 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-plugshop 0.4.1
File Size Uploaded Provenance Actions
django-plugshop-0.4.1.tar.gz 15.7 kB Without provenance Details for django-plugshop-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-plugshop 0.4.1
File Interpreter ABI Platform Actions
django_plugshop-0.4.1-py2.7.egg Legacy Egg format - - Details for django_plugshop-0.4.1-py2.7.egg

Total release size: 61.3 kB

Release files / django-plugshop-0.4.1.tar.gz

Download URL django-plugshop-0.4.1.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4d7a09e026877cbb8df0b702e027d8327da60025e405dcbaa9e0a7147715a72c
BLAKE2b-256 checksum
How to use checksums
67dca292c33cdb3f825f5bf922844be28e29f6172a5bb1a048774c0f19ff8343
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_plugshop-0.4.1-py2.7.egg

Download URL django_plugshop-0.4.1-py2.7.egg
Size 45.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
8120f35e5d40eba8544864a028c9d4c6351b3bca5fc451b8a4812bb2a3438644
BLAKE2b-256 checksum
How to use checksums
ad2d1f15aa711914022b4d061bb2f59732fbf347f3156d22931ea1b398194d12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-plugshop 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page