You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.5 KiB
42 lines
1.5 KiB
{% extends 'base.html' %}
|
|
{% load static %}
|
|
|
|
{% block content %}
|
|
<h2>Profile</h2>
|
|
|
|
{% for field in form %}
|
|
{{ field.error }}
|
|
{% endfor %}
|
|
|
|
<div class="user_data">
|
|
<p>Username: {{ user.username }}</p>
|
|
<p>Email: {{ user.email }}</p>
|
|
<p>Phone: {{ profile.phone }}</p>
|
|
<p>Site: {{ profile.website }}</p>
|
|
<p>City: {{ profile.city }}</p>
|
|
<p>Parent: {{ profile.parent.username }}</p>
|
|
<!--<div class="discount_code">-->
|
|
<!--<p>Discount code: {{ discount.code }}</p>-->
|
|
<!--<form action="{% url 'discount:create' %}" method="post">{% csrf_token %}-->
|
|
<!--<input type="submit" name="discount" value="GetDC" />-->
|
|
<!--</form>-->
|
|
<!--</div>-->
|
|
<div class="user_profile_points">
|
|
<p>Баллы: {{ profile.user_points }}</p>
|
|
{% if points_error %}
|
|
<label class="error">{{ points_error }}</label>
|
|
{% endif %}
|
|
<form action="{% url 'profile:pick_up_points' %}">
|
|
{% if profile.user_points != 0 %}
|
|
<button type="submit">Запросить баллы</button>
|
|
{% else %}
|
|
<button type="submit" disabled>Запросить баллы</button>
|
|
{% endif %}
|
|
</form>
|
|
</div>
|
|
<form action="{% url 'profile:update_profile' %}">
|
|
<button type="submit">Редактировать профиль</button>
|
|
</form>
|
|
</div>
|
|
|
|
{% endblock %} |