Untitled
unknown
html
a year ago
1.9 kB
7
Indexable
Never
<!DOCTYPE html> {% extends 'base.html' %} {% block title %}Новый пост{% endblock %} {% block content %} <div class="row justify-content-center"> <div class="col-md-8 p-5"> <div class="card"> <div class="card-header"> Новый пост </div> <div class="card-body"> <form method="post"> {% csrf_token %} <div class="form-group row my-3 p-3"> <label for="id_text"> Текст поста <span class="required text-danger" >*</span> </label> <textarea name="text" cols="40" rows="10" class="form-control" required id="id_text"> </textarea> <small id="id_text-help" class="form-text text-muted"> Текст нового поста </small> </div> <div class="form-group row my-3 p-3"> <label for="id_group"> Группа </label> <select name="group" class="form-control" id="id_group"> <option value="" selected>---------</option> {% for group in groups %} <option value="{{ group.slug }}">{{ group.title }}</option> {% endfor %} </select> <small id="id_group-help" class="form-text text-muted"> Группа, к которой будет относиться пост </small> </div> <div class="d-flex justify-content-end"> <button type="submit" class="btn btn-primary"> Сохранить </button> </div> </form> </div> <!-- card --> </div> <!-- card --> </div> <!-- col --> </div> <!-- row --> {% endblock %}