{% extends "admin/base_site.html" %} {% load i18n %} {% block title %}Import Items from CSV{% endblock %} {% block content %}

Import Items from CSV

{% if preview_rows %}

Previewing first {{ preview_rows|length }} of {{ total_rows }} row(s). Confirm to import all {{ total_rows }} row(s).

{% for key in preview_rows.0.keys %} {% endfor %} {% for row in preview_rows %} {% for val in row.values %} {% endfor %} {% endfor %}
{{ key }}
{{ val }}
{% csrf_token %}   Cancel
{% else %}

Upload a CSV file to bulk-import inventory items.
Required column: name
Optional columns: asset_tag, item_type, status, category, manufacturer, model_number, serial_number, quantity, unit, purchase_date (YYYY-MM-DD), warranty_expiry (YYYY-MM-DD), purchase_price, location, client, notes

category, location, and client are matched by name (case-insensitive). Unmatched values are skipped.

{% csrf_token %}
{{ form.as_p }}
  Cancel
{% endif %} {% endblock %}