Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% extends 'users/profile/categories/category_base.html' %}
- {% load static %}
- {% block head %}
- <link rel="stylesheet" href="{% static 'css/styleCategory.css' %}">
- <link rel="stylesheet" href="{% static 'css/globalStyle.css' %}">
- <title>Редактирование</title>
- {% endblock %}
- {% block content %}
- <main>
- <h1>Создание/редактирование категории</h1>
- <form method="post" enctype="multipart/form-data">
- {% csrf_token %}
- <input type="hidden"
- name="csrfmiddlewaretoken"
- value="NtjTkiPCAGE6SNmjHBr8XUI0qxr5GVaNIlJKeitTto8dYLBw0knPNraHPkW2ZtmD">
- <p>
- <label for="id_category_name">Category name:</label>
- <input type="text"
- name="category_name"
- value="{{ form.category_name.value }}"
- maxlength="100"
- id="id_category_name">
- </p>
- <p>
- <label for="id_key">Key:</label>
- <select name="key" id="id_key">
- <option value="" selected>---------</option>
- {% for key in keys %}
- {% if key == form.key.value %}
- <option value="{{ key }}" selected>{{ key }}</option>
- {% else %}
- <option value="{{ key }}">{{ key }}</option>
- {% endif %}
- {% endfor %}
- </select>
- </p>
- <p>
- <label for="id_color">Color:</label>
- <input type="color"
- name="color"
- value="{{ form.color.value }}"
- maxlength="7"
- required=""
- id="id_color">
- </p>
- <button type="submit">Сохранить</button>
- </form>
- </main>
- {% endblock %}
- {% block footer %}
- {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment