diff --git a/Bulovatsky_Max/workshop2/source/main.py b/Bulovatsky_Max/workshop2/source/main.py new file mode 100644 index 0000000..41c8def --- /dev/null +++ b/Bulovatsky_Max/workshop2/source/main.py @@ -0,0 +1,57 @@ +from flask import Flask, render_template, request, redirect, url_for + +app = Flask(__name__) + + +@app.route('/api/', methods=['GET']) +def apiget(action): + + if action == "meal": + return render_template("meal.html", meal=meal_example) + + elif action == "menu": + return render_template("menu.html", menu=menu_example) + + elif action == "all": + return render_template("all.html", meal=meal_example, menu=menu_example) + + else: + return render_template("404.html", action_value=action) + + +@app.route('/api', methods=['POST']) +def apipost(): + + + # + # send name="action" and value="meal_update" to POST + + if request.form["action"] == "meal_update": + + meal_example["name"] = request.form["name"] + meal_example["price"] = request.form["price"] + + elif request.form["action"] == "menu_update": + + menu_example["name"] = request.form["name"] + menu_example["content"] = request.form["content"] + + + + return redirect(url_for('apiget', action="all")) + + + +if __name__ == '__main__': + + meal_example = { + "name":"Ice-cream", + "price": 9.99 + } + + menu_example = { + "name": "Lite summer kit", + "content": ["MilkShake", "Ice-cream", "French fries"] + } + + app.run() \ No newline at end of file diff --git a/Bulovatsky_Max/workshop2/source/templates/404.html b/Bulovatsky_Max/workshop2/source/templates/404.html new file mode 100644 index 0000000..6316f09 --- /dev/null +++ b/Bulovatsky_Max/workshop2/source/templates/404.html @@ -0,0 +1,16 @@ + + + + + 404 page + + +

Not correct action value: {{action_value}}

+ + + + \ No newline at end of file diff --git a/Bulovatsky_Max/workshop2/source/templates/all.html b/Bulovatsky_Max/workshop2/source/templates/all.html new file mode 100644 index 0000000..c076c07 --- /dev/null +++ b/Bulovatsky_Max/workshop2/source/templates/all.html @@ -0,0 +1,36 @@ + + + + + all + + + + +

meal

+ + + + + + + + + +
nameprice
{{meal.get('name')}}{{meal.get('price')}}
+ +

menu

+ + + + + + + + + +
namecontent
{{menu.get('name')}}{{menu.get('content')}}
+ + + + \ No newline at end of file diff --git a/Bulovatsky_Max/workshop2/source/templates/meal.html b/Bulovatsky_Max/workshop2/source/templates/meal.html new file mode 100644 index 0000000..3686375 --- /dev/null +++ b/Bulovatsky_Max/workshop2/source/templates/meal.html @@ -0,0 +1,19 @@ + + + + + Meal + + + + +
+

Name

+

Price

+
+ + + + + + \ No newline at end of file diff --git a/Bulovatsky_Max/workshop2/source/templates/menu.html b/Bulovatsky_Max/workshop2/source/templates/menu.html new file mode 100644 index 0000000..2e192f7 --- /dev/null +++ b/Bulovatsky_Max/workshop2/source/templates/menu.html @@ -0,0 +1,20 @@ + + + + + all + + + + + +
+

Name

+

What does it include?

+
+ + + + + + \ No newline at end of file diff --git a/Bulovatsky_Max/workshop4/source/Procfile b/Bulovatsky_Max/workshop4/source/Procfile new file mode 100644 index 0000000..7ab08cb --- /dev/null +++ b/Bulovatsky_Max/workshop4/source/Procfile @@ -0,0 +1 @@ +web: gunicorn main:app --log-file - \ No newline at end of file diff --git a/Bulovatsky_Max/workshop4/source/forms.py b/Bulovatsky_Max/workshop4/source/forms.py new file mode 100644 index 0000000..e32de1b --- /dev/null +++ b/Bulovatsky_Max/workshop4/source/forms.py @@ -0,0 +1,13 @@ +from flask_wtf import FlaskForm +from wtforms import SelectField, StringField, SubmitField, IntegerField, DecimalField, TextAreaField + + +class MealForm(FlaskForm): + name = StringField("Название: ") + price = DecimalField("Цена (за порцию): ") + taste = SelectField("Вкус: ", choices=[("1", "Сладкое"), ("2", "Соленое"), ("3", "Кислое"), ("4", "Другое")]) + risk_name = SelectField("Противопоказания: ", choices=[("1", "Цитрусовые"), ("2", "Молочные продукты"), + ("3", "Рыба"), ("4", "Другое")]) + + submit = SubmitField("Готово") + diff --git a/Bulovatsky_Max/workshop4/source/main.py b/Bulovatsky_Max/workshop4/source/main.py new file mode 100644 index 0000000..500a34d --- /dev/null +++ b/Bulovatsky_Max/workshop4/source/main.py @@ -0,0 +1,113 @@ +from flask import Flask, request, jsonify, redirect, url_for, render_template +from sqlalchemy.orm import sessionmaker +import cx_Oracle +from sqlalchemy import create_engine +from tables_db import Meal, Meal, MenuMeal, Risk, MealRisk +from forms import * +from flask_sqlalchemy import SQLAlchemy + +app = Flask(__name__) + + +oracle_connection_string = 'oracle+cx_oracle://{username}:{password}@{host}:{port}/{database}' +engine = create_engine( + oracle_connection_string.format( + + username="SYS as sysdba", + password="dbpass", + sid="XE", + host="laptop", + port="1521", + database="workshopDB" + + ) + , echo=True +) + + + +meal_example = { + "name": "Ice-cream", + "price": 9.99 +} + +menu_example = { + "name": "Lite summer kit", + "content": ["MilkShake", "Ice-cream", "French fries"] +} + +db = SQLAlchemy(app) + +@app.route("/", methods=['GET', 'POST']) +def hello(): + return render_template('index.html') + + +@app.route('/meal', methods=['GET', 'POST']) +def meal(): + meal_form = MealForm(request.form) + + if request.method == 'POST': + + meal_id = request.form['meal_id'] + name = request.form['name'] + price = request.form['price'] + taste = request.form['taste'] + risk_name = request.form['risk_name'] + + try: + meal = Meal(meal_id, name, price, taste, risk_name) + db.session.add(meal) + db.session.commit() + + return "Dish added {}".format(meal.meal_id) + + except Exception as e: + return str(e) + + return render_template('meal.html', form=meal_form) + + + + +@app.route('/api/', methods=['GET']) +def apiget(action): + + if action == "menu": + return render_template("menu.html", menu=menu_example) + + elif action == "all": + return render_template("all.html", meal=meal_example, menu=menu_example) + + else: + return render_template("404.html", action_value=action) + + +@app.route('/api', methods=['POST']) +def apipost(): + + + # + # send name="action" and value="meal_update" to POST + + if request.form["action"] == "meal_update": + + meal_example["name"] = request.form["name"] + meal_example["price"] = request.form["price"] + + elif request.form["action"] == "menu_update": + + menu_example["name"] = request.form["name"] + menu_example["content"] = request.form["content"] + + return redirect(url_for('apiget', action="all")) + + + +if __name__ == '__main__': + app.run() + + + + + diff --git a/Bulovatsky_Max/workshop4/source/requirements.txt b/Bulovatsky_Max/workshop4/source/requirements.txt new file mode 100644 index 0000000..389c73a --- /dev/null +++ b/Bulovatsky_Max/workshop4/source/requirements.txt @@ -0,0 +1,11 @@ +certifi==2020.4.5.1 +click==7.1.2 +Flask==1.1.2 +Flask-WTF==0.14.3 +itsdangerous==1.1.0 +Jinja2==2.11.2 +MarkupSafe==1.1.1 +Werkzeug==1.0.1 +wincertstore==0.2 +WTForms==2.3.1 +gunicorn==20.0.4 diff --git a/Bulovatsky_Max/workshop4/source/tables_db.py b/Bulovatsky_Max/workshop4/source/tables_db.py new file mode 100644 index 0000000..ab02e80 --- /dev/null +++ b/Bulovatsky_Max/workshop4/source/tables_db.py @@ -0,0 +1,103 @@ +from sqlalchemy import create_engine, Sequence, Column, Integer, String, Float, ForeignKey + +from sqlalchemy.ext.declarative import declarative_base + + + +oracle_connection_string = 'oracle+cx_oracle://{username}:{password}@{host}:{port}/{database}' +engine = create_engine( + oracle_connection_string.format( + + username="SYS as sysdba", + password="dbpass", + sid="XE", + host="laptop", + port="1521", + database="workshopDB" + + ) + , echo=True +) + + +Base = declarative_base() + +class Menu(Base): + __tablename__ = 'menu' + + id = Column(Integer, Sequence('id_seq'), primary_key=True) + name = Column(String(15), nullable=False) + price = Column(Float, nullable=False) + + def __init__(self, id, name, price): + self.id = id + self.name = name + self.price = price + + + +class Risk(Base): + __tablename__ = 'risk' + + name = Column(String(25), primary_key=True) + description = Column(String(100), nullable=False) + + def __init__(self, name, description): + self.name = name + self.description = description + + + + +class Meal(Base): + __tablename__ = 'meal' + + meal_id = Column(Integer, Sequence('id_seq'), primary_key=True) + name = Column(String(15), nullable=False) + price = Column(Float, nullable=False) + taste = Column(String(15), nullable=False) # key word to be searched + risk_name = Column(String(25), ForeignKey('risk.name')) # any risks like allergic etc + + def __init__(self, meal_id, name, price, taste, risk_name): + self.meal_id = meal_id + self.name = name + self.price = price + self.taste = taste + self.risk_name = risk_name + + + +class MenuMeal(Base): + __tablename__ = 'menu_meal' + + menu_id = Column(Integer, ForeignKey('menu.id'), primary_key=True) + meal_id = Column(Integer, ForeignKey('meal.meal_id'), primary_key=True) + + def __init__(self, menu_id, meal_id): + self.menu_id = menu_id + self.meal_id = meal_id + + + + +class MealRisk(Base): + __tablename__ = 'meal_risk' + + meal_id = Column(Integer, ForeignKey('meal.meal_id'), primary_key=True) + risk_name = Column(String(25), ForeignKey('risk.name'), primary_key=True) + + def __init__(self, menu_id, meal_id): + self.menu_id = menu_id + self.meal_id = meal_id + + + + +class Test(Base): + __tablename__ = 'test' + + col1 = Column(Integer, primary_key=True, nullable=False) + col2 = Column(Integer, nullable=False) + + +Base.metadata.create_all(engine) diff --git a/Bulovatsky_Max/workshop4/source/templates/404.html b/Bulovatsky_Max/workshop4/source/templates/404.html new file mode 100644 index 0000000..6316f09 --- /dev/null +++ b/Bulovatsky_Max/workshop4/source/templates/404.html @@ -0,0 +1,16 @@ + + + + + 404 page + + +

Not correct action value: {{action_value}}

+ + + + \ No newline at end of file diff --git a/Bulovatsky_Max/workshop4/source/templates/all.html b/Bulovatsky_Max/workshop4/source/templates/all.html new file mode 100644 index 0000000..c076c07 --- /dev/null +++ b/Bulovatsky_Max/workshop4/source/templates/all.html @@ -0,0 +1,36 @@ + + + + + all + + + + +

meal

+ + + + + + + + + +
nameprice
{{meal.get('name')}}{{meal.get('price')}}
+ +

menu

+ + + + + + + + + +
namecontent
{{menu.get('name')}}{{menu.get('content')}}
+ + + + \ No newline at end of file diff --git a/Bulovatsky_Max/workshop4/source/templates/index.html b/Bulovatsky_Max/workshop4/source/templates/index.html new file mode 100644 index 0000000..9d2b192 --- /dev/null +++ b/Bulovatsky_Max/workshop4/source/templates/index.html @@ -0,0 +1,4 @@ + +

Работает??

+ +Новое блюдо \ No newline at end of file diff --git a/Bulovatsky_Max/workshop4/source/templates/meal.html b/Bulovatsky_Max/workshop4/source/templates/meal.html new file mode 100644 index 0000000..8fce639 --- /dev/null +++ b/Bulovatsky_Max/workshop4/source/templates/meal.html @@ -0,0 +1,23 @@ + + + + + Document + + +
+

{{form.name.label}}

+

{{form.name}}

+

{{form.price.label}}

+

{{form.price}}

+

{{form.taste.label}}

+

{{form.taste}}

+

{{form.risk_name.label}}

+

{{form.risk_name}}

+ +

{{form.submit()}}

+
+ + + + \ No newline at end of file diff --git a/Bulovatsky_Max/workshop4/source/templates/menu.html b/Bulovatsky_Max/workshop4/source/templates/menu.html new file mode 100644 index 0000000..2e192f7 --- /dev/null +++ b/Bulovatsky_Max/workshop4/source/templates/menu.html @@ -0,0 +1,20 @@ + + + + + all + + + + + +
+

Name

+

What does it include?

+
+ + + + + + \ No newline at end of file diff --git a/Bulovatsky_Max/workshop5/hi.txt b/Bulovatsky_Max/workshop5/hi.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Bulovatsky_Max/workshop5/hi.txt @@ -0,0 +1 @@ + diff --git a/Bulovatsky_Max/workshop5/source/Procfile b/Bulovatsky_Max/workshop5/source/Procfile new file mode 100644 index 0000000..8001d1a --- /dev/null +++ b/Bulovatsky_Max/workshop5/source/Procfile @@ -0,0 +1 @@ +web: gunicorn app:app \ No newline at end of file diff --git a/Bulovatsky_Max/workshop5/source/app.py b/Bulovatsky_Max/workshop5/source/app.py new file mode 100644 index 0000000..a1b4fe3 --- /dev/null +++ b/Bulovatsky_Max/workshop5/source/app.py @@ -0,0 +1,55 @@ +from flask import Flask, request, jsonify, redirect, url_for, render_template +from flask_sqlalchemy import SQLAlchemy +import os +from models import * +from forms import * + +app = Flask(__name__) + +os.environ['APP_SETTINGS'] = 'config.DevelopmentConfig' +app.config['SQLALCHEMY_DATABASE_URI'] = "postgres://acfwdjeahlsvgl:e90c3e268016942f35a7650124a716365d0ad484c47b391f816ad7dc0e47e11d@ec2-54-247-169-129.eu-west-1.compute.amazonaws.com:5432/d1uae99vpu7qar" +app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False +app.config['SECRET_KEY'] = 'root' + + +db = SQLAlchemy(app) + +cur_order = [] + + + + +@app.route("/", methods=['GET', 'POST']) +def hello(): + return render_template('index.html') + + + +@app.route('/meal', methods=['GET', 'POST']) +def meal(): + meal_form = MealForm(request.form) + + if request.method == 'POST': + + meal_id = request.form['meal_id'] + name = request.form['name'] + price = request.form['price'] + taste = request.form['taste'] + risk_name = request.form['risk_name'] + + try: + meal = Meal(meal_id, name, price, taste, risk_name) + db.session.add(meal) + db.session.commit() + + return "Dish added {}".format(meal.meal_id) + + except Exception as e: + return str(e) + + return render_template('meal.html', form=meal_form) + + + +if __name__ == '__main__': + app.run(debug=True) diff --git a/Bulovatsky_Max/workshop5/source/config.py b/Bulovatsky_Max/workshop5/source/config.py new file mode 100644 index 0000000..f0f4433 --- /dev/null +++ b/Bulovatsky_Max/workshop5/source/config.py @@ -0,0 +1,28 @@ +import os +basedir = os.path.abspath((os.path.dirname(__file__))) + + +class Config(object): + DEBUG = False + TESTING = False + CSRF_ENABLED = True + SECRET_KEY = 'root' + SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'] + + +class ProductionConfig(Config): + DEBUG = False + + +class StagingConfig(Config): + DEVELOPMENT = True + DEBUG = True + + +class DevelopmentConfig(Config): + DEVELOPMENT = True + DEBUG = True + + +class TestingConfig(Config): + TESTING = True diff --git a/Bulovatsky_Max/workshop5/source/database_connection.py b/Bulovatsky_Max/workshop5/source/database_connection.py new file mode 100644 index 0000000..9c793ff --- /dev/null +++ b/Bulovatsky_Max/workshop5/source/database_connection.py @@ -0,0 +1,5 @@ +from sqlalchemy.engine import create_engine + +ENGINE_PATH_WIN_AUTH = "postgres://acfwdjeahlsvgl:e90c3e268016942f35a7650124a716365d0ad484c47b391f816ad7dc0e47e11d@ec2-54-247-169-129.eu-west-1.compute.amazonaws.com:5432/d1uae99vpu7qar" + +engine = create_engine(ENGINE_PATH_WIN_AUTH) \ No newline at end of file diff --git a/Bulovatsky_Max/workshop5/source/forms.py b/Bulovatsky_Max/workshop5/source/forms.py new file mode 100644 index 0000000..e32de1b --- /dev/null +++ b/Bulovatsky_Max/workshop5/source/forms.py @@ -0,0 +1,13 @@ +from flask_wtf import FlaskForm +from wtforms import SelectField, StringField, SubmitField, IntegerField, DecimalField, TextAreaField + + +class MealForm(FlaskForm): + name = StringField("Название: ") + price = DecimalField("Цена (за порцию): ") + taste = SelectField("Вкус: ", choices=[("1", "Сладкое"), ("2", "Соленое"), ("3", "Кислое"), ("4", "Другое")]) + risk_name = SelectField("Противопоказания: ", choices=[("1", "Цитрусовые"), ("2", "Молочные продукты"), + ("3", "Рыба"), ("4", "Другое")]) + + submit = SubmitField("Готово") + diff --git a/Bulovatsky_Max/workshop5/source/hi.txt b/Bulovatsky_Max/workshop5/source/hi.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Bulovatsky_Max/workshop5/source/hi.txt @@ -0,0 +1 @@ + diff --git a/Bulovatsky_Max/workshop5/source/models.py b/Bulovatsky_Max/workshop5/source/models.py new file mode 100644 index 0000000..18f4049 --- /dev/null +++ b/Bulovatsky_Max/workshop5/source/models.py @@ -0,0 +1,89 @@ +from sqlalchemy import Column, Integer, Float,String, ForeignKey,Sequence +from sqlalchemy.ext.declarative import declarative_base +from database_connection import engine +from sqlalchemy.orm import relationship +from sqlalchemy.orm import sessionmaker + + +Base = declarative_base() + +class Menu(Base): + __tablename__ = 'menu' + + id = Column(Integer, Sequence('id_seq'), primary_key=True) + name = Column(String(15), nullable=False) + price = Column(Float, nullable=False) + + def __init__(self, id, name, price): + self.id = id + self.name = name + self.price = price + + + +class Risk(Base): + __tablename__ = 'risk' + + name = Column(String(25), primary_key=True) + description = Column(String(100), nullable=False) + + def __init__(self, name, description): + self.name = name + self.description = description + + + + +class Meal(Base): + __tablename__ = 'meal' + + meal_id = Column(Integer, Sequence('id_seq'), primary_key=True) + name = Column(String(15), nullable=False) + price = Column(Float, nullable=False) + taste = Column(String(15), nullable=False) # key word to be searched + risk_name = Column(String(25), ForeignKey('risk.name')) # any risks like allergic etc + + def __init__(self, meal_id, name, price, taste, risk_name): + self.meal_id = meal_id + self.name = name + self.price = price + self.taste = taste + self.risk_name = risk_name + + + +class MenuMeal(Base): + __tablename__ = 'menu_meal' + + menu_id = Column(Integer, ForeignKey('menu.id'), primary_key=True) + meal_id = Column(Integer, ForeignKey('meal.meal_id'), primary_key=True) + + def __init__(self, menu_id, meal_id): + self.menu_id = menu_id + self.meal_id = meal_id + + + + +class MealRisk(Base): + __tablename__ = 'meal_risk' + + meal_id = Column(Integer, ForeignKey('meal.meal_id'), primary_key=True) + risk_name = Column(String(25), ForeignKey('risk.name'), primary_key=True) + + def __init__(self, menu_id, meal_id): + self.menu_id = menu_id + self.meal_id = meal_id + + + + +class Test(Base): + __tablename__ = 'test' + + col1 = Column(Integer, primary_key=True, nullable=False) + col2 = Column(Integer, nullable=False) + + + +Base.metadata.create_all(engine) \ No newline at end of file diff --git a/Bulovatsky_Max/workshop5/source/requirements.txt b/Bulovatsky_Max/workshop5/source/requirements.txt new file mode 100644 index 0000000..a2b1dfc --- /dev/null +++ b/Bulovatsky_Max/workshop5/source/requirements.txt @@ -0,0 +1,12 @@ +click==7.1.2 +Flask==1.1.2 +Flask-SQLAlchemy==2.4.2 +Flask-WTF==0.14.3 +itsdangerous==1.1.0 +Jinja2==2.11.2 +MarkupSafe==1.1.1 +psycopg2==2.8.5 +SQLAlchemy==1.3.17 +Werkzeug==1.0.1 +WTForms==2.3.1 +gunicorn \ No newline at end of file diff --git a/Bulovatsky_Max/workshop5/source/runtime.txt b/Bulovatsky_Max/workshop5/source/runtime.txt new file mode 100644 index 0000000..4b5675d --- /dev/null +++ b/Bulovatsky_Max/workshop5/source/runtime.txt @@ -0,0 +1 @@ +python-3.6.5 \ No newline at end of file diff --git a/Bulovatsky_Max/workshop5/source/templates/index.html b/Bulovatsky_Max/workshop5/source/templates/index.html new file mode 100644 index 0000000..cfff25c --- /dev/null +++ b/Bulovatsky_Max/workshop5/source/templates/index.html @@ -0,0 +1,4 @@ + +

Работает??

+ +Новое блюдо \ No newline at end of file diff --git a/Bulovatsky_Max/workshop5/source/templates/meal.html b/Bulovatsky_Max/workshop5/source/templates/meal.html new file mode 100644 index 0000000..16a623f --- /dev/null +++ b/Bulovatsky_Max/workshop5/source/templates/meal.html @@ -0,0 +1,23 @@ + + + + + Document + + +
+

{{form.name.label}}

+

{{form.name}}

+

{{form.price.label}}

+

{{form.price}}

+

{{form.taste.label}}

+

{{form.taste}}

+

{{form.risk_name.label}}

+

{{form.risk_name}}

+ +

{{form.submit()}}

+
+ + + + \ No newline at end of file diff --git a/Bulovatsky_Max/workshop5/source/templates/style.css b/Bulovatsky_Max/workshop5/source/templates/style.css new file mode 100644 index 0000000..4d1476a --- /dev/null +++ b/Bulovatsky_Max/workshop5/source/templates/style.css @@ -0,0 +1,5 @@ +head { + width: 100%; + height: 100px; + background-color: red; +} \ No newline at end of file diff --git a/WorkShop2/main.py b/WorkShop2/main.py new file mode 100644 index 0000000..41c8def --- /dev/null +++ b/WorkShop2/main.py @@ -0,0 +1,57 @@ +from flask import Flask, render_template, request, redirect, url_for + +app = Flask(__name__) + + +@app.route('/api/', methods=['GET']) +def apiget(action): + + if action == "meal": + return render_template("meal.html", meal=meal_example) + + elif action == "menu": + return render_template("menu.html", menu=menu_example) + + elif action == "all": + return render_template("all.html", meal=meal_example, menu=menu_example) + + else: + return render_template("404.html", action_value=action) + + +@app.route('/api', methods=['POST']) +def apipost(): + + + # + # send name="action" and value="meal_update" to POST + + if request.form["action"] == "meal_update": + + meal_example["name"] = request.form["name"] + meal_example["price"] = request.form["price"] + + elif request.form["action"] == "menu_update": + + menu_example["name"] = request.form["name"] + menu_example["content"] = request.form["content"] + + + + return redirect(url_for('apiget', action="all")) + + + +if __name__ == '__main__': + + meal_example = { + "name":"Ice-cream", + "price": 9.99 + } + + menu_example = { + "name": "Lite summer kit", + "content": ["MilkShake", "Ice-cream", "French fries"] + } + + app.run() \ No newline at end of file diff --git a/WorkShop2/templates/404.html b/WorkShop2/templates/404.html new file mode 100644 index 0000000..6316f09 --- /dev/null +++ b/WorkShop2/templates/404.html @@ -0,0 +1,16 @@ + + + + + 404 page + + +

Not correct action value: {{action_value}}

+ +
    + Possible actions +
  • meal
  • +
  • menu
  • +
+ + \ No newline at end of file diff --git a/WorkShop2/templates/all.html b/WorkShop2/templates/all.html new file mode 100644 index 0000000..c076c07 --- /dev/null +++ b/WorkShop2/templates/all.html @@ -0,0 +1,36 @@ + + + + + all + + + + +

meal

+ + + + + + + + + +
nameprice
{{meal.get('name')}}{{meal.get('price')}}
+ +

menu

+ + + + + + + + + +
namecontent
{{menu.get('name')}}{{menu.get('content')}}
+ + + + \ No newline at end of file diff --git a/WorkShop2/templates/meal.html b/WorkShop2/templates/meal.html new file mode 100644 index 0000000..3686375 --- /dev/null +++ b/WorkShop2/templates/meal.html @@ -0,0 +1,19 @@ + + + + + Meal + + + + +
+

Name

+

Price

+
+ + + + + + \ No newline at end of file diff --git a/WorkShop2/templates/menu.html b/WorkShop2/templates/menu.html new file mode 100644 index 0000000..2e192f7 --- /dev/null +++ b/WorkShop2/templates/menu.html @@ -0,0 +1,20 @@ + + + + + all + + + + + +
+

Name

+

What does it include?

+
+ + + + + + \ No newline at end of file