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

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 Credit Amount Status Display Order Actions
{% if product.images and product.images|length > 0 %}
{{ product.name }}
{% else %}
{% endif %}

{{ product.name }}

ID: {{ product.stripe_id }}

{{ product.description|default:"No description" }} {% if product.price %} {% with amount=product.price|floatformat:2 currency=product.currency|upper %} {% if product.currency|lower == 'usd' %}${% elif product.currency|lower == 'eur' %}€{% elif product.currency|lower == 'gbp' %}£{% else %}{{ currency }} {% endif %}{{ amount }} {% if product.interval != 'one-time' %} /{{ product.get_interval_display }} {% endif %} {% endwith %} {% else %} No price {% endif %} {% if product.credit_amount %} {{ product.credit_amount }} credits {% else %} No credits {% endif %} {% if product.active %} Active {% else %} Inactive {% endif %} {{ product.display_order|default:0 }}
{% endif %}
{% if stripe_enabled and stripe_available and not error %} {% endif %} {% endblock %}