prettified food detailpage
This commit is contained in:
parent
927d66527f
commit
2bdedf3d3b
@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.6 on 2017-10-25 21:40
|
||||
# Generated by Django 1.11.2 on 2017-10-25 23:47
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
@ -45,9 +45,9 @@ class Migration(migrations.Migration):
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('name', models.CharField(max_length=60, unique=True)),
|
||||
('price_student', models.CharField(max_length=10)),
|
||||
('price_employee', models.CharField(max_length=10)),
|
||||
('price_guest', models.CharField(max_length=10)),
|
||||
('price_student', models.CharField(blank=True, max_length=10, null=True)),
|
||||
('price_employee', models.CharField(blank=True, max_length=10, null=True)),
|
||||
('price_guest', models.CharField(blank=True, max_length=10, null=True)),
|
||||
('image', models.ImageField(blank=True, upload_to='food/%Y/%m/')),
|
||||
('rating', models.FloatField(default=0)),
|
||||
('first_star', models.SmallIntegerField(default=0)),
|
||||
@ -55,7 +55,7 @@ class Migration(migrations.Migration):
|
||||
('third_star', models.SmallIntegerField(default=0)),
|
||||
('fourth_star', models.SmallIntegerField(default=0)),
|
||||
('fifth_star', models.SmallIntegerField(default=0)),
|
||||
('allergens', models.ManyToManyField(to='food.Allergene')),
|
||||
('allergens', models.ManyToManyField(blank=True, to='food.Allergene')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.6 on 2017-10-25 22:33
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('food', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='singlefood',
|
||||
name='allergens',
|
||||
field=models.ManyToManyField(blank=True, null=True, to='food.Allergene'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='singlefood',
|
||||
name='price_employee',
|
||||
field=models.CharField(blank=True, max_length=10, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='singlefood',
|
||||
name='price_guest',
|
||||
field=models.CharField(blank=True, max_length=10, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='singlefood',
|
||||
name='price_student',
|
||||
field=models.CharField(blank=True, max_length=10, null=True),
|
||||
),
|
||||
]
|
||||
@ -1,20 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.6 on 2017-10-25 22:40
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('food', '0002_auto_20171026_0033'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='singlefood',
|
||||
name='allergens',
|
||||
field=models.ManyToManyField(blank=True, to='food.Allergene'),
|
||||
),
|
||||
]
|
||||
Binary file not shown.
Binary file not shown.
@ -5,14 +5,9 @@
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div id="title" class="col-12">{{ food.name }}</div>
|
||||
<div id="price-student" class="4">Student: {{ food.price_student }}</div>
|
||||
<div id="price-employee" class="4">Employee: {{ food.price_employee }}</div>
|
||||
<div id="price-guest" class="4">Guest: {{ food.price_guest }}</div>
|
||||
<div id="rating" class="col-4">{{ food.rating }}</div>
|
||||
</div>
|
||||
<div id="alergens" class="row">
|
||||
<div class="row p-3 border border-dark rounded bg-light text-dark">
|
||||
<div id="title" class="col-12"><h4>{{ food.name }}</h4></div>
|
||||
<div class="col-8 mt-2">
|
||||
<div class="col-12"><h5>Allergene</h5></div>
|
||||
<ul>
|
||||
{% for alergen in food.allergens.all() %}
|
||||
@ -21,6 +16,16 @@
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col-4 mt-2">
|
||||
<div id="prices" class="">
|
||||
<div><strong>Preise</strong></div>
|
||||
<div class="student">Student: {{ food.price_student }}</div>
|
||||
<div class="price-employee">Employee: {{ food.price_employee }}</div>
|
||||
<div class="price-guest">Guest: {{ food.price_guest }}</div>
|
||||
</div>
|
||||
<div id="rating" class="mt-3"><strong>Rating:</strong> {{ food.rating }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user