{ "info": { "author": "Scott Sharkey", "author_email": "ssharkey@lanshark.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "=========================\r\nls-django-shop-categories\r\n=========================\r\n\r\nA extendable category app using django-mptt for django-shop.\r\n\r\n.. image:: https://travis-ci.org/lanshark/ls-django-shop-categories.png?branch=develop\r\n :target: https://travis-ci.org/lanshark/ls-django-shop-categories\r\n\r\n\r\nInstallation\r\n------------\r\n\r\nFor the current stable version:\r\n\r\n::\r\n\r\n pip install ls-django-shop-categories\r\n\r\nFor the development version:\r\n\r\n::\r\n\r\n pip install -e git+git://github.com/lanshark/ls-django-shop-categories.git#egg=ls-django-shop-categories\r\n\r\nRunning tests:\r\n\r\n::\r\n\r\n git clone git://github.com/lanshark/ls-django-shop-categories.git\r\n cd ls-django-shop-categories\r\n virtualenv test_env\r\n source ./test_env/bin/activate\r\n pip install -r requirements.txt\r\n python develop.py test\r\n\r\n\r\nConfiguration\r\n-------------\r\n\r\nAdd ``shop_categories`` and ``treeadmin`` to ``settings.INSTALLED_APPS``.\r\n\r\nSet ``SHOP_PRODUCT_MODEL`` to ``shop_categories.models.defaults.product.default.CategoryProduct``.\r\n\r\nIn your urls.py add this **before** your shop patterns:\r\n\r\n::\r\n\r\n urlpatterns += patterns('',\r\n url(r'^catalog/', include('shop_categories.urls')),\r\n )\r\n\r\nThen run:\r\n\r\n::\r\n\r\n manage.py migrate\r\n\r\n\r\nExtending the Category model\r\n----------------------------\r\n\r\nIn your own app make a models dir with __init__.py and a category.py dir, like so:\r\n\r\n::\r\n\r\n app/models/__init__.py\r\n app/models/category.py\r\n\r\nNote: Do not import the model from category.py in __init__.py, the model should NOT be in a \"real\" models module as this will cause the overridden Category model to be defined twice.\r\n\r\nIn category.py:\r\n\r\n::\r\n\r\n from django.db import models\r\n from shop_categories.models.defaults.category.base import ProductCategoryBase\r\n\r\n class Category(ProductCategoryBase):\r\n\r\n image = models.ImageField(upload_to='categoryimages/', null=True, blank=True)\r\n\r\n class Meta:\r\n abstract = False\r\n app_label = 'app'\r\n\r\nSet ``SHOP_CATEGORIES_CATEGORY_MODEL`` to ``('app.models.category.Category, 'app')``\r\n\r\nRegister your custom category model in admin.py:\r\n\r\n::\r\n\r\n from shop_categories.models import Category\r\n from shop_categories.admin import ProductCategoryAdmin\r\n\r\n admin.site.register(Category, ProductCategoryAdmin)\r\n\r\n\r\nThen, assuming your Product model is not already synced, run:\r\n\r\n::\r\n\r\n manage.py migrate\r\n\r\n\r\nExtending the Product model\r\n----------------------------\r\n\r\nWhen extending Product models in your shop make sure they subclass from ``shop_categories.models.defaults.product.base.CategoryProductBase`` to add the Category Foreignkey and M2M fields.\r\n\r\n\r\nExample implementation\r\n----------------------\r\nAn example of a django-shop with ls-django-shop-categories can be found here: https://github.com/lanshark/ls-django-shop-example\r\n\n\n1.0.4\n\nUpdated dependencies\n\n1.0.3\n\nUpdated default Boolean fields\n\n1.0.2\n\nUpdated dependencies for ls-django-treeadmin\n\n1.0.1\n\nForked, Renamed, Updated By Scott Sharkey\nAdded compatibility with Django 1.7+, and eventually Python 3\n\n1.0\n\nLast release by original author", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/lanshark/ls-django-shop-categories/tarball/1.0.4", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/lanshark/ls-django-shop-categories/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "ls-django-shop-categories", "package_url": "https://pypi.org/project/ls-django-shop-categories/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ls-django-shop-categories/", "project_urls": { "Download": "https://github.com/lanshark/ls-django-shop-categories/tarball/1.0.4", "Homepage": "http://github.com/lanshark/ls-django-shop-categories/" }, "release_url": "https://pypi.org/project/ls-django-shop-categories/1.0.4/", "requires_dist": null, "requires_python": null, "summary": "A extendable category app using django-mptt for django-shop", "version": "1.0.4" }, "last_serial": 1370005, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "08f5b3a2320e65cea5d97962e3078644", "sha256": "2135f0fd32faf6ca68e059ab9000ead21334cf9394f27eca2753e9dfe6e66c8c" }, "downloads": -1, "filename": "ls-django-shop-categories-1.0.1.tar.gz", "has_sig": false, "md5_digest": "08f5b3a2320e65cea5d97962e3078644", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7702, "upload_time": "2014-12-02T04:48:58", "url": "https://files.pythonhosted.org/packages/d1/a5/c2c267e4c928476b8a54bb58c034ff72f7d74bc0971ab926174cf611ab0e/ls-django-shop-categories-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "56937d42f45cdcd259609e803bce2e18", "sha256": "d99847c688d71471e8c86bb910ff912fcf3451b13a477e7ff39a4f645808f004" }, "downloads": -1, "filename": "ls-django-shop-categories-1.0.2.tar.gz", "has_sig": false, "md5_digest": "56937d42f45cdcd259609e803bce2e18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7720, "upload_time": "2014-12-02T06:11:42", "url": "https://files.pythonhosted.org/packages/a7/24/cd34b1eca53427b30069583b545c503d7447d2aa5b24bea36be67f1c908a/ls-django-shop-categories-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "1146e1c5c0deafe20f2218f0f9b93737", "sha256": "9b11de3f9ae9067e873e516f0be1312d7ba3b25ab60a1f1ec4a48ff1e1c118ae" }, "downloads": -1, "filename": "ls-django-shop-categories-1.0.3.tar.gz", "has_sig": false, "md5_digest": "1146e1c5c0deafe20f2218f0f9b93737", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7739, "upload_time": "2014-12-14T05:03:05", "url": "https://files.pythonhosted.org/packages/8f/41/b932ed94936d3a0431b11056c0adc403b7d8fa3dd2d7c1306eb795ccada2/ls-django-shop-categories-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "8822556c445a9c18ca173896d08d017d", "sha256": "03570ca9aeecdb27283c5b87f64bbfc952c6cf7d68f75f68edc2cefee8536767" }, "downloads": -1, "filename": "ls-django-shop-categories-1.0.4.tar.gz", "has_sig": false, "md5_digest": "8822556c445a9c18ca173896d08d017d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7752, "upload_time": "2015-01-04T13:25:49", "url": "https://files.pythonhosted.org/packages/e7/71/fd3003add0505fff90543450fb7bdd0cbae0102bdf4f610508f22aa4b239/ls-django-shop-categories-1.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8822556c445a9c18ca173896d08d017d", "sha256": "03570ca9aeecdb27283c5b87f64bbfc952c6cf7d68f75f68edc2cefee8536767" }, "downloads": -1, "filename": "ls-django-shop-categories-1.0.4.tar.gz", "has_sig": false, "md5_digest": "8822556c445a9c18ca173896d08d017d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7752, "upload_time": "2015-01-04T13:25:49", "url": "https://files.pythonhosted.org/packages/e7/71/fd3003add0505fff90543450fb7bdd0cbae0102bdf4f610508f22aa4b239/ls-django-shop-categories-1.0.4.tar.gz" } ] }