disable food detailed link if no price defined
This commit is contained in:
parent
baddfc2a62
commit
71d2818aa8
@ -147,10 +147,10 @@ TIME_FORMAT = "H:i"
|
||||
# https://docs.djangoproject.com/en/1.11/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, "static")
|
||||
# STATICFILES_DIRS = [
|
||||
# os.path.join(BASE_DIR, "static"),
|
||||
# ]
|
||||
# STATIC_ROOT = os.path.join(BASE_DIR, "static")
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, "static"),
|
||||
]
|
||||
|
||||
# Setup support for proxy headers
|
||||
USE_X_FORWARDED_HOST = True
|
||||
|
||||
@ -35,8 +35,17 @@
|
||||
{% for single_food in menu %}
|
||||
<li data-food="{{ single_food.id }}" data-rating="{{ single_food.rating }}" class="food-item">
|
||||
<div class="row">
|
||||
<div class="food-name col-8"><a href="{{ url('food-detail', args=[single_food.id]) }}"><p>{{ single_food.name }}</p></a></div>
|
||||
<div class="col-4"><span class="float-right">{{ single_food.price_student}}</span></div>
|
||||
<div class="food-name col-8">
|
||||
{% if single_food.price_student %}
|
||||
<a href="{{ url('food-detail', args=[single_food.id]) }}">
|
||||
<p>{{ single_food.name }}</p></a>
|
||||
{% else %}
|
||||
<p>{{ single_food.name }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if single_food.price_student %}
|
||||
<div class="col-4"><span class="float-right">{{ single_food.price_student }}</span></div>
|
||||
{% endif %}
|
||||
{# <div class="image-wrapper col-4"><img src="" class="img-rounded img" alt="" width="1024"
|
||||
height="800"><i class="img-placeholder fa fa-cutlery text-right"></i></div> #}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user