17 lines
No EOL
489 B
HTML
Executable file
17 lines
No EOL
489 B
HTML
Executable file
{% extends 'layout.html' %}
|
|
|
|
{% block content %}
|
|
<div class="container">
|
|
<h2>Créer un Post</h2>
|
|
<form action="" method="post" enctype="multipart/form-data">
|
|
{% csrf_token %}
|
|
{{ post_form.as_p }}
|
|
{% if type == 'news' %}
|
|
<label for="image">Image</label>
|
|
<input type="file" name="image" id="image">
|
|
{% endif %}
|
|
<br>
|
|
<button type="submit" class="btn btn-primary">Créer</button>
|
|
</form>
|
|
</div>
|
|
{% endblock %} |