Second updates
This commit is contained in:
42
templates/events/example.html
Normal file
42
templates/events/example.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
|
||||
<div class="container mt-4">
|
||||
|
||||
<h3 class="mb-4">
|
||||
{% if object %}Edit{% else %}Add{% endif %} Event
|
||||
</h3>
|
||||
|
||||
<form method="post" novalidate>
|
||||
{% csrf_token %}
|
||||
|
||||
{% for field in form %}
|
||||
<div class="mb-3">
|
||||
<label for="{{ field.id_for_label }}" class="form-label">
|
||||
{{ field.label }}
|
||||
</label>
|
||||
|
||||
{{ field.as_widget|add_class:"form-control" }}
|
||||
|
||||
{% if field.help_text %}
|
||||
<div class="form-text">{{ field.help_text }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if field.errors %}
|
||||
<div class="text-danger small">
|
||||
{{ field.errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<button class="btn btn-primary">Save</button>
|
||||
<a class="btn btn-secondary" href="{% url 'events:event_list' %}">
|
||||
Cancel
|
||||
</a>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user