setting up subscrption management for creators
parent
856490cf50
commit
3da8c9951d
@ -0,0 +1,49 @@
|
||||
{% extends 'includes/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>Platform Subscriptions</h2>
|
||||
<ul>
|
||||
{% for s in platform_subs %}
|
||||
<li>
|
||||
Platform Subscription ID: {{ s.id }} <br>
|
||||
Created: {{ s.create_date }} <br>
|
||||
TX ID: {{ s.tx.tx_id }} <br>
|
||||
Paid: {{ s.tx.atomic_xmr | from_atomic }} XMR <br>
|
||||
Term Length: {{ s.term_hours }} hours ({{ s.hours_until_content_hidden }} hours) <br>
|
||||
Hide Content: {{ s.hours_until_content_hidden }} hours <br>
|
||||
Archive Content: {{ s.hours_until_content_archived }} hours <br>
|
||||
Active Subscription: <strong>{{ s.is_active }}</strong> <br>
|
||||
<br>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h2>Content Subscriptions</h2>
|
||||
{% if not content_subs %}
|
||||
<p>No subscriptions to your content yet.</p>
|
||||
{% include 'includes/form.html' %}
|
||||
{% else %}
|
||||
<ul>
|
||||
{% for s in content_subs %}
|
||||
<li>
|
||||
Content Subscription ID: {{ s.id }} <br>
|
||||
Created: {{ s.create_date }} <br>
|
||||
Price: {{ s.atomic_xmr | from_atomic }} XMR <br>
|
||||
Term Length: {{ s.number_hours }} hours <br>
|
||||
Active Subscriptions: {{ s.get_active_subscriptions().count() }} <br>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<h2>Subscribers</h2>
|
||||
{% if not subscribers %}
|
||||
<p>No subscribers yet.</p>
|
||||
{% else %}
|
||||
{% for subscriber in subscribers %}
|
||||
{{ subscriber }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
@ -0,0 +1,11 @@
|
||||
<hr>
|
||||
|
||||
{% if config.DEBUG and current_user.is_authenticated %}
|
||||
<h2>Debug</h2>
|
||||
<p>
|
||||
Authenticated: {{ current_user.is_authenticated }} <br>
|
||||
Username: {{ current_user.handle }} <br>
|
||||
Email: {{ current_user.email }} <br>
|
||||
Wallet Address: {{ current_user.wallet_address }} <br>
|
||||
</p>
|
||||
{% endif %}
|
@ -0,0 +1,18 @@
|
||||
<form method="POST" action="">
|
||||
{% for f in form %}
|
||||
{% if f.name == 'csrf_token' %}
|
||||
{{ f }}
|
||||
{% else %}
|
||||
<div class="form-group">
|
||||
{{ f.label }}
|
||||
{{ f }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<ul>
|
||||
{% for field, errors in form.errors.items() %}
|
||||
<li>{{ form[field].label }}: {{ ', '.join(errors) }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<input type="submit" value="Confirm" class="btn btn-link btn-outline btn-xl">
|
||||
</form>
|
Loading…
Reference in New Issue