generated from Code-Institute-Org/gitpod-full-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close #18 Create update_recipe function for authenticated users
- Loading branch information
1 parent
35b23fe
commit a33cae5
Showing
10 changed files
with
137 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2.16 on 2022-11-26 14:06 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('recipes', '0004_alter_recipe_like_recipe'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='recipe', | ||
name='status', | ||
field=models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=1), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{% extends 'base.html' %} | ||
{% block title %} Kitchen Tales | Update Recipe {{ recipe.title }}{% endblock %} | ||
|
||
|
||
|
||
|
||
|
||
{% block content %} | ||
|
||
<div class="container"> | ||
<h1 class="page-title">Add Recipe</h1> | ||
<hr> | ||
<br> | ||
<div class="row justify-content-center "> | ||
{% load cloudinary %} | ||
<div class="col-11 col-md-8 col-lg-6 mt-3"> | ||
<!-- Add Recipe Form --> | ||
<form method="post" action="{% url 'update_recipe' recipe.id %}" class="add-recipe mb-5" enctype="multipart/form-data"> | ||
{{ form }} | ||
{% csrf_token %} | ||
<a class="btn btn-signup" href="{% url 'update_recipe' recipe.id %}" >Cancel</a> | ||
<input type="submit" class="btn btn-signup" value="Update Recipe" /> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
{% endblock content %} |