Django review app
Project description
django-inventory
Django-inventory is a Django app to perform full Ecommerce inventory functionality. You get to add product specific to a category, attribute, type and brand.
For better understanding of the project, kindly check out django-htmx and mptt documentation.
Detailed documentation is in the "docs" directory.
Quick start
-
Add "inventory" to your INSTALLED_APPS setting like this
INSTALLED_APPS = [ ... 'inventory', 'django_htmx', 'mptt', ]
AND
MIDDLEWARE = [ ... 'django_htmx.middleware.HtmxMiddleware', ]
-
Include the inventory context processor to you templates option settings like this:
TEMPLATES = [{ ... 'OPTIONS': { 'context_processors': { ... 'inventory.context_processors.inventory', } } }]
to access the global context of "attributes" and "values".
-
Include the inventory URLconf in your project urls.py like this
path('', include("inventory.urls", namespace="inventory")),
OR
path('inventory/', include("inventory.urls", namespace="inventory")),
-
Run
python manage.py migrate
to create the inventory models. -
Start the development server and visit http://127.0.0.1:8000/admin/ to create an inventory and for better understanding of the models structure (you'll need the Admin app enabled).
-
Visit http://127.0.0.1:8000/inventory/ to participate in the inventory.
Optional Settings
-
INVENTORY_HOME_HTML Default to "inventory/home.html" which serves as your homepage. You can override this template by adding
INVENTORY_HOME_HTML = "your desired home html"
to your settings file.
The home view comes with "products" and "featured" context data which can be manipulated as desired.
-
INVENTORY_SHOP_HTML Default to "inventory/category.html" which serves as your shop page. You can override this template by adding
INVENTORY_SHOP_HTML = "your desired shop html"
to your settings file.
The shop view comes with "brands", "categories", "attributes" and "products" context which serves as a paginator also with and additional "url" context to issue a get request in the pagination section.
-
INVENTORY_SHOP_SUBHTML This template encloses the products forloop section. Default to "inventory/partials/shop-element.html" which serves as your shop page. You can override this template by adding
INVENTORY_SHOP_SUBHTML = "your desired shop element html"
to your settings file.
implement this into your shop template by adding
<div id="shop-element"> {% include "inventory/partials/shop-element.html" %} </div>
to your desired section/segment of your shop template.
-
INVENTORY_PRODUCT_HTML Default to "inventory/single-product.html" which serves as your product detail page. You can override this template by adding
INVENTORY_PRODUCT_HTML = "your desired product detail html"
to your settings file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-product-review-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1009e8634d05594cd6297404dc2e18aaf38dfbc01856eb4f8f0c6eefa80d8f18 |
|
MD5 | 3ce038d34ba340ef88f3d59bf43944fc |
|
BLAKE2b-256 | f9f63a11b8e7c641f46859dc444cf0ab51cbfeb3c89d0e840a876dff683e908e |
Hashes for django_product_review-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4bbc3bde03b643044cd6610f59827b8ba17c23e08a3367a0ae3241f12d39c35 |
|
MD5 | e3d2f31e22ebf86d2906f18e41e5b3a0 |
|
BLAKE2b-256 | 9a966d8901207ccadf4071ba0b608f6a2341d5a4210f2d06f6aced3dd387c854 |