added servings to url import

This commit is contained in:
vabene1111
2021-01-21 19:39:06 +01:00
parent 6690c3b206
commit c41c319d25
4 changed files with 16 additions and 136 deletions

View File

@@ -60,6 +60,11 @@
<label for="id_waiting_time">{% trans 'Waiting time ca.' %}</label>
<input id="id_waiting_time" class="form-control" v-model="recipe_data.cookTime">
</div>
<div class="form-group">
<label for="id_servings">{% trans 'Servings' %}</label>
<input id="id_servings" class="form-control" v-model="recipe_data.servings">
</div>
</div>
</div>
@@ -304,6 +309,7 @@
this.error = undefined
this.loading = true
this.$http.post("{% url 'api_recipe_from_url' %}", {'url': this.remote_url}, {emulateJSON: true}).then((response) => {
console.log(response.data)
this.recipe_data = response.data;
this.loading = false
}).catch((err) => {