<commit_before>{% extends "base.html" %}
{% load mezzanine_tags shop_tags i18n %}

{% block meta_title %}{% trans "Your cart" %}{% endblock %}
{% block title %}{% trans "Your cart" %}{% endblock %}

{% block breadcrumb_menu %}
<ul>
    <li><a href="{% url home %}">{% trans "Home" %}</a> &gt;</li>
    <li>{% trans "Your cart" %}</li>
</ul><br />
{% endblock %}

{% block main %}
{% if request.cart.has_items %}
<form method="post">
{% csrf_token %}
{% for error in cart_formset.errors %}
{% if error.values.0 %}{{ error.values.0 }}{% endif %}
{% endfor %}
{{ cart_formset.management_form }}
<table id="items" border="0" cellpadding="5" cellspacing="0">
	<tr>
		<th class="description" colspan="2">{% trans "Item" %}</th>
		<th>{% trans "Unit Price" %}</th>
		<th>{% trans "Qty" %}</th>
		<th>{% trans "Price" %}</th>
		<th>{% trans "Remove?" %}</th>
	</tr>
    {% for form in cart_formset %}
    {% with form.instance as item %}
    {{ form.id }}
	<tr class="{% cycle 'row1' 'row2' %}">
		<td class="image">
			{% if item.image %}
			<a href="{{ item.get_absolute_url }}"><img alt="{{ item.description }}"
				src="{{ MEDIA_URL }}{% thumbnail item.image 30 30 %}" /></a>
			{% endif %}
		</td>
		<td class="description">
		    <a href="{{ item.get_absolute_url }}">{{ item.description }}</a>
        </td>
		<td>{{ item.unit_price|currency }}</td>
		<td class="quantity">{{ form.quantity }}</td>
		<td>{{ item.total_price|currency }}</td>
		<td class="delete">{{ form.DELETE }}</td>
	</tr>
	{% endwith %}
	{% endfor %}<commit_msg>Fixed formset iteration for Django <= 1.2<commit_after>{% extends "base.html" %}
{% load mezzanine_tags shop_tags i18n %}

{% block meta_title %}{% trans "Your cart" %}{% endblock %}
{% block title %}{% trans "Your cart" %}{% endblock %}

{% block breadcrumb_menu %}
<ul>
    <li><a href="{% url home %}">{% trans "Home" %}</a> &gt;</li>
    <li>{% trans "Your cart" %}</li>
</ul><br />
{% endblock %}

{% block main %}
{% if request.cart.has_items %}
<form method="post">
{% csrf_token %}
{% for error in cart_formset.errors %}
{% if error.values.0 %}{{ error.values.0 }}{% endif %}
{% endfor %}
{{ cart_formset.management_form }}
<table id="items" border="0" cellpadding="5" cellspacing="0">
	<tr>
		<th class="description" colspan="2">{% trans "Item" %}</th>
		<th>{% trans "Unit Price" %}</th>
		<th>{% trans "Qty" %}</th>
		<th>{% trans "Price" %}</th>
		<th>{% trans "Remove?" %}</th>
	</tr>
    {% for form in cart_formset.forms %}
    {% with form.instance as item %}
    {{ form.id }}
	<tr class="{% cycle 'row1' 'row2' %}">
		<td class="image">
			{% if item.image %}
			<a href="{{ item.get_absolute_url }}"><img alt="{{ item.description }}"
				src="{{ MEDIA_URL }}{% thumbnail item.image 30 30 %}" /></a>
			{% endif %}
		</td>
		<td class="description">
		    <a href="{{ item.get_absolute_url }}">{{ item.description }}</a>
        </td>
		<td>{{ item.unit_price|currency }}</td>
		<td class="quantity">{{ form.quantity }}</td>
		<td>{{ item.total_price|currency }}</td>
		<td class="delete">{{ form.DELETE }}</td>
	</tr>
	{% endwith %}
	{% endfor %}
{'fraction_non_alphanumeric': 0.2525839793281654, 'fraction_numerical': 0.009689922480620155, 'mean_word_length': 3.8466353677621283, 'pattern_counts': {'":': 0, '<': 88, '<?xml version=': 0, '>': 87, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3616021', 'n_tokens_mistral': 1298, 'n_tokens_neox': 1137, 'n_words': 289}