django-project/recipes/templates/recipe.html
Benjamin acbcf3f606 fixup! Add forms for adding recipes and versions
Basic form for adding a version. Still needs:

* Check of slug uniqueness
* Choose between author user or author name
* slug auto-creation
* ingredients

TODO:

* Add recipe
2023-02-17 16:41:22 +01:00

14 lines
374 B
HTML

{% extends "base_main.html" %}
{% block title %}{{ recipe.title }}{% endblock %}
{% block main %}
<h1>{{ recipe.title }}</h1>
{% if perms.recipes.add_recipe %}
<p><a href="{% url 'add-version' recipe.slug %}">Add version</a></p>
{% endif %}
<ul>
{% for v in versions %}
<li><a href="{{ v.get_absolute_url }}">{{ v.label }}</a></li>
{% endfor %}
</ul>
{% endblock %}