{% extends "base.html" %} {% load static %} {% block title %}Product Management - Admin Dashboard{% endblock %} {% block content %}

Product Management

Manage your Stripe products

Stripe Product Management

View and manage your products synced with Stripe

{% if not stripe_enabled %}

Stripe integration is not enabled. To enable Stripe, set STRIPE_ENABLED=true in your environment.

{% elif not stripe_available %}

Stripe API is not available. Make sure you have installed the Stripe package with: pip install stripe

{% elif missing_api_keys %}

Stripe API keys are missing. Configure STRIPE_PUBLIC_KEY, STRIPE_SECRET_KEY, and STRIPE_WEBHOOK_SECRET in your environment.

{% elif error %}

Error loading products: {{ error }}

{% elif products|length == 0 %}

No products found in your Stripe account. Create products in the Stripe dashboard or using the Stripe API.

{% else %}
{% for product in products %} {% endfor %}
Product Description Price Status Actions
{% if product.images and product.images|length > 0 %}
{{ product.name }}
{% else %}
{% endif %}

{{ product.name }}

ID: {{ product.id }}

{{ product.description|default:"No description" }} {% if product.prices.data %} {% with price=product.prices.data.0 %} {% if price.unit_amount_decimal %} {% with amount=price.unit_amount_decimal|floatformat:2 currency=price.currency|upper %} {% if price.currency == 'usd' %}${% elif price.currency == 'eur' %}€{% elif price.currency == 'gbp' %}£{% else %}{{ currency }} {% endif %}{{ amount }} {% if price.recurring %} /{% if price.recurring.interval_count > 1 %}{{ price.recurring.interval_count }} {% endif %}{{ price.recurring.interval }}{% if price.recurring.interval_count > 1 %}s{% endif %} {% endif %} {% endwith %} {% elif price.unit_amount %} {% with amount=price.unit_amount|floatformat:2 currency=price.currency|upper %} {% if price.currency == 'usd' %}${% elif price.currency == 'eur' %}€{% elif price.currency == 'gbp' %}£{% else %}{{ currency }} {% endif %}{{ amount }} {% if price.recurring %} /{% if price.recurring.interval_count > 1 %}{{ price.recurring.interval_count }} {% endif %}{{ price.recurring.interval }}{% if price.recurring.interval_count > 1 %}s{% endif %} {% endif %} {% endwith %} {% else %} Invalid price {% endif %} {% endwith %} {% else %} No price {% endif %} {% if product.active %} Active {% else %} Inactive {% endif %}
{% endif %}
{% if stripe_enabled and stripe_available and not error %} {% endif %} {% endblock %}