{% extends "base.html" %} {% block title %}Part Catalogue - Admin{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{% set section = 'catalog' %} {% set bar_sub = 'Local mirror of the Rebrickable parts catalogue' %} {% set crumbs = [{'name': 'Part Catalogue'}] + ([{'name': active_category.name}] if active_category else []) %} {% include 'admin/labels/_nav.html' %}
{{ '{:,}'.format(stats.parts) }}
Parts in catalogue
{{ '{:,}'.format(stats.categories) }}
Rebrickable categories
{{ '{:,}'.format(stats.labelled) }}
Already labelled
{{ '{:,}'.format(stats.mapped) }}
Categories mapped
{% if stats.last_sync %} {% if stats.last_sync.status == 'running' %}Running… {% elif stats.last_sync.status == 'failed' %} Last run failed {% else %} Last updated {{ stats.last_sync.finished_at.strftime('%d %b %Y %H:%M') if stats.last_sync.finished_at else '' }} UTC {% endif %} {% else %}Never updated{% endif %}
{% if stats.last_sync and stats.last_sync.message %}{{ stats.last_sync.message }}{% endif %}
{% if stats.parts == 0 %}
The catalogue is empty. Press Update catalogue to pull Rebrickable's published part list (two gzipped CSV files, about 60,000 parts). It runs in the background and takes a minute or two. No API key is needed for this — a key only adds part photos when you turn a part into a label.
Catalogue data from Rebrickable.
{% endif %}
Categories All
{% for category in categories %} {% if category.drawer_category %}{% endif %} {{ category.name }} {{ category.item_count() }} {% else %}
No categories yet.
{% endfor %}
{% if active_category %}
Import mapping for "{{ active_category.name }}"
{% endif %}
{% if active_category %}{% endif %}
{{ '{:,}'.format(pagination.total) }} part{{ '' if pagination.total == 1 else 's' }} {% if active_category %}in {{ active_category.name }}{% endif %}
{% for item in items %} {% else %} {% endfor %}
Img Part no. Name Size Category
{{ item.part_num }} {{ item.name }} {{ item.dimensions or '' }} {{ item.catalog_category.name if item.catalog_category else '' }} {% if item.has_label %} Labelled {% else %} — {% endif %}
{% if stats.parts == 0 %} Nothing here yet — run Update catalogue above. {% else %} No parts match that search. {% endif %}
{% if pagination.pages > 1 %}
« Prev Page {{ pagination.page }} of {{ pagination.pages }} Next »
{% endif %}
Catalogue data from Rebrickable.
{% endblock %} {% block extra_js %} {% endblock %}