{% extends "admin/base_site.html" %} {% block content %}

Import Products from Excel

Step 1: Download the template, fill it in, then upload below.

⬇ Download Template
{% if errors %}
⚠️ Import could not proceed:
{% endif %} {% if not preview %}
Step 2: Upload your filled Excel file.

{% csrf_token %} {{ form.as_p }}
{% endif %} {% if preview %}

✅ Valid Rows ({{ preview|length }})

{% csrf_token %} {% for row in preview %} {% endfor %}
Name Buying Selling Discount Stock Category Lipa Mdogo
{{ row.name }} {{ row.buying_price }} {{ row.selling_price }} {{ row.discount }} {{ row.stock }} {{ row.category }} {{ row.lipa_mdogo }}
Cancel
{% endif %} {% if skipped %}

⚠️ Skipped Rows ({{ skipped|length }})

{% for row in skipped %} {% endfor %}
Name Reason
{{ row.name }} {{ row.reason }}
{% endif %} {% if success_count %}
✅ Successfully imported {{ success_count }} product(s).

Back to Products
{% endif %} {% endblock %}