Shashishekhar Hasabnis Shashishekhar Hasabnis - 1 year ago 90
Python Question

Reverse for 'shop_cart' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

I am trying out Django Mezzanine. I have installed it with pip. After successful installation I added the Cartridge package via pip install -U cartridge. I have also included it in my Installed_Apps. I am able to see the package and able to tweak with it in admin panel. But when I try to go onto home page it is giving me the following error:-

Reverse for 'shop_cart' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

Inside the debugger I am shown the following error at line 4 highlighed:-

1 {% extends "base.html" %}
2 {% load i18n %}


4 {% block meta_title %}{% trans "Home" %}{% endblock %}

5 {% block title %}{% trans "Home" %}{% endblock %}

7 {% block breadcrumb_menu %}
8 <li class="active">{% trans "Home" %}</li>
9 {% endblock %}
11 {% block main %}
12 {% blocktrans %}
13 <h2>Congratulations!</h2>
14 <p>

Also to mention that I have not edited any urls or any files.

Answer Source

You need to read the manual which tells you that after you install cartidge with pip, you have to create a new project with the correct template in order to include all the specific settings for cartridge, which include the URLs:

Once installed, the command mezzanine-project can be used to create a new Mezzanine project, with Cartridge installed, in similar fashion to

$ mezzanine-project -a cartridge project_name
$ cd project_name
$ python createdb --noinput
$ python runserver

For now, you can try adding these two lines to your, and it should get rid of the immediate problem, but you should really follow the instructions and create a project with the right template:

url("^shop/", include("")),
url("^account/orders/$", order_history, name="shop_order_history"),
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download