Created by Stephen McDonald
Cartridge is a shopping cart application built using the Django framework. It is BSD licensed, and designed to provide a clean and simple base for developing e-commerce websites. It purposely does not include every conceivable feature of an e-commerce website; instead, Cartridge focuses on providing core features common to most e-commerce websites.
This specific focus stems from the idea that every e-commerce website is different, is tailored to the particular business and products at hand, and should therefore be as easy to customize as possible. Cartridge achieves this goal with a code-base that is as simple as possible and implements only the core features of an e-commerce website.
Cartridge is designed as a plugin for the Mezzanine content management platform, and therefore requires Mezzanine to be installed. The integration of the two applications should occur automatically by following the installation instructions below.
The easiest method is to install directly from PyPI using pip by running the command below, which will also install the required dependencies mentioned above:
$ pip install -U cartridge
Otherwise, you can download Cartridge and install it directly from source:
$ python setup.py install
Once installed, the command mezzanine-project can be used to create a new Mezzanine project, with Cartridge installed, in similar fashion to django-admin.py:
$ mezzanine-project -a cartridge project_name $ cd project_name $ python manage.py createdb --noinput $ python manage.py runserver
Here we specify the -a switch for the mezzanine-project command, which tells it to use an alternative package (cartridge) for the project template to use. Both Mezzanine and Cartridge contain a project template package containing the settings.py and urls.py modules for an initial project. If you’d like to add Cartridge to an existing Mezzanine or Django project, you’ll need to manually configure these yourself. See the FAQ section of the Mezzanine documentation for more information.
The createdb is a shortcut for using Django’s syncdb command and setting the initial migration state for South. You can alternatively use syncdb and migrate if preferred. South is automatically added to INSTALLED_APPS if the USE_SOUTH setting is set to True.
You should then be able to browse to http://127.0.0.1:8000/admin/ and log in using the default account (username: admin, password: default). If you’d like to specify a different username and password during set up, simply exclude the --noinput option included above when running createdb.
Cartridge is an open source project managed using both the Git and Mercurial version control systems. These repositories are hosted on both GitHub and Bitbucket respectively, so contributing is as easy as forking the project on either of these sites and committing back your enhancements.
Please note the following guidelines for contributing:
If you want to do development with Cartridge, here’s a quick way to set up a development environment and run the Cartridge unit tests, using virtualenvwrapper to set up a virtualenv:
$ mkvirtualenv cartridge $ workon cartridge $ pip install -e git://github.com/stephenmcd/mezzanine.git#egg=mezzanine $ pip install pep8 pyflakes $ git clone https://github.com/stephenmcd/cartridge $ cd cartridge $ python setup.py develop $ cp cartridge/project_template/local_settings.py.template cartridge/project_template/local_settings.py $ ./cartridge/project_template/manage.py test shop
Cartridge makes full use of translation strings, which allow Cartridge to be translated into multiple languages using Django’s internationalization methodology. Translations are managed on the Transiflex website but can also be submitted via GitHub or Bitbucket. Consult the documentation for Django’s internationalization methodology for more information on creating translations and using them.
If you would like to make a donation to continue development of Cartridge, you can do so via the Mezzanine Project website.
To report a security issue, please send an email privately to email@example.com. This gives us a chance to fix the issue and create an official release prior to the issue being made public.
For general questions or comments, please join the mezzanine-users mailing list. To report a bug or other type of issue, please use the GitHub issue tracker. And feel free to drop by the #mezzanine IRC channel on Freenode, for a chat.