cleanup vue debug settings
This commit is contained in:
13
cookbook/templates/include/vue_base.html
Normal file
13
cookbook/templates/include/vue_base.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{% load static %}
|
||||||
|
{% load custom_tags %}
|
||||||
|
|
||||||
|
{% is_debug as DEBUG %}
|
||||||
|
{% if DEBUG %}
|
||||||
|
<script src="{% static 'js/vue.js' %}"></script>
|
||||||
|
{% else %}
|
||||||
|
<script src="{% static 'js/vue.min.js' %}"></script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<script src="{% static 'js/vue-resource.js' %}"></script>
|
||||||
|
|
||||||
|
<script src="{% static 'js/js.cookie.min.js' %}"></script>
|
@ -6,13 +6,8 @@
|
|||||||
|
|
||||||
{% block extra_head %}
|
{% block extra_head %}
|
||||||
|
|
||||||
{% if DEBUG %}
|
{% include 'include/vue_base.html' %}
|
||||||
<script src="{% static 'js/vue.js' %}"></script>
|
|
||||||
{% else %}
|
|
||||||
<script src="{% static 'js/vue.min.js' %}"></script>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<script src="{% static 'js/vue-resource.js' %}"></script>
|
|
||||||
<script src="{% static 'js/moment-with-locales.min.js' %}"></script>
|
<script src="{% static 'js/moment-with-locales.min.js' %}"></script>
|
||||||
|
|
||||||
<script src="{% static 'js/Sortable.min.js' %}"></script>
|
<script src="{% static 'js/Sortable.min.js' %}"></script>
|
||||||
|
10
cookbook/templates/url_import.html
Normal file
10
cookbook/templates/url_import.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>$Title$</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
$END$
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -8,6 +8,7 @@ from django.urls import reverse, NoReverseMatch
|
|||||||
from cookbook.helper.mdx_attributes import MarkdownFormatExtension
|
from cookbook.helper.mdx_attributes import MarkdownFormatExtension
|
||||||
from cookbook.helper.mdx_urlize import UrlizeExtension
|
from cookbook.helper.mdx_urlize import UrlizeExtension
|
||||||
from cookbook.models import get_model_name, CookLog
|
from cookbook.models import get_model_name, CookLog
|
||||||
|
from recipes import settings
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
||||||
@ -66,3 +67,8 @@ def recipe_last(recipe, user):
|
|||||||
return last.created_at
|
return last.created_at
|
||||||
else:
|
else:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
||||||
|
@register.simple_tag
|
||||||
|
def is_debug():
|
||||||
|
return settings.DEBUG
|
||||||
|
@ -148,7 +148,7 @@ def get_days_from_week(start, end):
|
|||||||
|
|
||||||
@group_required('user')
|
@group_required('user')
|
||||||
def meal_plan(request):
|
def meal_plan(request):
|
||||||
return render(request, 'meal_plan.html', {'DEBUG': settings.DEBUG})
|
return render(request, 'meal_plan.html', {})
|
||||||
|
|
||||||
|
|
||||||
@group_required('user')
|
@group_required('user')
|
||||||
|
Reference in New Issue
Block a user