diff --git a/app/admin.py b/app/admin.py
index 9dfb62a..685934b 100644
--- a/app/admin.py
+++ b/app/admin.py
@@ -24,7 +24,7 @@ class UserAdminModel(ModelBaseView):
class LocationAdminModel(ModelBaseView):
column_searchable_list = ('name', 'address', 'website')
inline_models = None
- form_columns = ('name', 'address', 'website')
+ form_columns = ('name', 'address', 'website', 'telephone')
admin = Admin(app, name='Haldis', url='/admin', template_mode='bootstrap3')
diff --git a/app/migrations/versions/3243c3538fc_.py b/app/migrations/versions/3243c3538fc_.py
new file mode 100644
index 0000000..3d8f9c2
--- /dev/null
+++ b/app/migrations/versions/3243c3538fc_.py
@@ -0,0 +1,26 @@
+"""Add telephone number
+
+Revision ID: 3243c3538fc
+Revises: 2d696203e56
+Create Date: 2015-06-04 18:39:54.895177
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '3243c3538fc'
+down_revision = '2d696203e56'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+ ### commands auto generated by Alembic - please adjust! ###
+ op.add_column('location', sa.Column('telephone', sa.String(length=20), nullable=True))
+ ### end Alembic commands ###
+
+
+def downgrade():
+ ### commands auto generated by Alembic - please adjust! ###
+ op.drop_column('location', 'telephone')
+ ### end Alembic commands ###
diff --git a/app/models.py b/app/models.py
index 7ae015b..bc42d26 100644
--- a/app/models.py
+++ b/app/models.py
@@ -45,6 +45,7 @@ class Location(db.Model):
name = db.Column(db.String(120), nullable=False)
address = db.Column(db.String(254))
website = db.Column(db.String(120))
+ telephone = db.Column(db.String(20), nullable=True)
products = db.relationship('Product', backref='location', lazy='dynamic')
orders = db.relationship('Order', backref='location', lazy='dynamic')
diff --git a/app/templates/order.html b/app/templates/order.html
index c918635..52dbbf5 100644
--- a/app/templates/order.html
+++ b/app/templates/order.html
@@ -16,6 +16,9 @@
{% endif %}
location: {{ order.location.name }}
+ {% if order.location.telephone != None %}
+ telephone: {{ order.location.telephone }}
+ {% endif %}
status: {% if order.stoptime %}{{ order.stoptime|countdown }}{% else %}open{% endif %}
total price: {{ total_price|euro }}