├── webapp ├── __init__.py ├── migrations │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── 0001_initial.cpython-36.pyc │ │ ├── 0002_auto_20181019_0704.cpython-36.pyc │ │ ├── 0002_auto_20181020_1643.cpython-36.pyc │ │ ├── 0002_auto_20181021_1256.cpython-36.pyc │ │ ├── 0003_auto_20181020_1721.cpython-36.pyc │ │ ├── 0003_auto_20181021_1310.cpython-36.pyc │ │ ├── 0004_auto_20181020_1801.cpython-36.pyc │ │ ├── 0004_auto_20181021_1320.cpython-36.pyc │ │ └── 0005_auto_20181021_1341.cpython-36.pyc │ └── 0001_initial.py ├── tests.py ├── apps.py ├── static │ └── webapp │ │ ├── images │ │ ├── 12.png │ │ ├── 5p.jpg │ │ ├── 6p.jpg │ │ ├── 8p.jpg │ │ ├── p1.jpg │ │ ├── p2.jpg │ │ ├── p3.jpg │ │ ├── bag.png │ │ ├── cross.png │ │ ├── icon1.jpg │ │ ├── icon2.jpg │ │ ├── icon3.jpg │ │ ├── line.png │ │ ├── logo.jpg │ │ ├── logo.png │ │ ├── logo1.png │ │ ├── lunch.png │ │ ├── order.jpg │ │ ├── star1.png │ │ ├── star2.png │ │ ├── tick1.png │ │ ├── banner.jpg │ │ ├── close_1.png │ │ ├── loader.gif │ │ ├── slide_1.jpg │ │ ├── slide_2.jpg │ │ ├── slide_3.jpg │ │ ├── to-top2.png │ │ ├── type-1.png │ │ ├── type-2.png │ │ ├── type-3.png │ │ ├── type-4.png │ │ ├── wood_1.png │ │ ├── 0302-steak.png │ │ ├── 0401-vegan.png │ │ ├── 0402-chef.png │ │ ├── cuisine1.jpg │ │ ├── cuisine2.jpg │ │ ├── cuisine3.jpg │ │ ├── cuisine4.jpg │ │ ├── cuisine5.jpg │ │ ├── cuisine6.jpg │ │ ├── cuisine7.jpg │ │ ├── cuisine8.jpg │ │ ├── img-sprite.png │ │ ├── res_img_1.jpg │ │ ├── res_img_2.jpg │ │ ├── res_img_3.jpg │ │ ├── res_img_4.jpg │ │ ├── res_img_5.jpg │ │ ├── res_img_6.jpg │ │ ├── res_img_7.jpg │ │ ├── res_img_8.jpg │ │ ├── dotted-line.png │ │ ├── restaurent-1.jpg │ │ ├── restaurent-2.jpg │ │ ├── restaurent-3.jpg │ │ ├── restaurent-4.jpg │ │ ├── restaurent-5.jpg │ │ ├── restaurent-6.jpg │ │ ├── service-banner.jpg │ │ ├── 0203-coffee-love.png │ │ ├── 0301-pina-colada.png │ │ ├── dotted-line-right.png │ │ ├── order-section-bg.png │ │ ├── restaurent-logo1.jpg │ │ ├── restaurent-logo2.jpg │ │ ├── restaurent-logo3.jpg │ │ ├── restaurent-logo4.jpg │ │ ├── restaurent-logo5.jpg │ │ ├── restaurent-logo6.jpg │ │ ├── 0103-served-plate_64.png │ │ ├── 0301-pina-colada_64.png │ │ ├── 0103-served-plate_128.png │ │ └── dotted-line-right-wide.png │ │ └── js │ │ ├── move-top.js │ │ ├── classie.js │ │ ├── wow.min.js │ │ ├── easing.js │ │ ├── uisearch.js │ │ ├── jquery.flexisel.js │ │ ├── jquery.easydropdown.js │ │ ├── simpleCart.min.js │ │ └── jquery.carouFredSel-6.1.0-packed.js ├── __pycache__ │ ├── admin.cpython-36.pyc │ ├── apps.cpython-36.pyc │ ├── forms.cpython-36.pyc │ ├── urls.cpython-36.pyc │ ├── views.cpython-36.pyc │ ├── __init__.cpython-36.pyc │ └── models.cpython-36.pyc ├── admin.py ├── templates │ └── webapp │ │ ├── form_template.html │ │ ├── orderplaced.html │ │ ├── profile_form.html │ │ ├── rest_profile_form.html │ │ ├── order.html │ │ ├── signup.html │ │ ├── restsignup.html │ │ ├── restaurents.html │ │ ├── login.html │ │ ├── restlogin.html │ │ ├── menu_modify.html │ │ ├── menu.html │ │ ├── profile.html │ │ ├── rest_profile.html │ │ ├── base.html │ │ ├── base2.html │ │ ├── order-list.html │ │ └── index.html ├── urls.py ├── forms.py ├── models.py └── views.py ├── foodapp ├── __init__.py ├── __pycache__ │ ├── urls.cpython-36.pyc │ ├── wsgi.cpython-36.pyc │ ├── __init__.cpython-36.pyc │ └── settings.cpython-36.pyc ├── wsgi.py ├── urls.py └── settings.py ├── requirements.txt ├── db.sqlite3 ├── manage.py └── README.md /webapp/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /foodapp/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /webapp/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==2.0.8 2 | 3 | -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/db.sqlite3 -------------------------------------------------------------------------------- /webapp/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /webapp/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class WebappConfig(AppConfig): 5 | name = 'webapp' 6 | -------------------------------------------------------------------------------- /webapp/static/webapp/images/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/12.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/5p.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/5p.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/6p.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/6p.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/8p.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/8p.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/p1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/p1.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/p2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/p2.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/p3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/p3.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/bag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/bag.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/cross.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/icon1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/icon1.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/icon2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/icon2.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/icon3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/icon3.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/line.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/logo.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/logo.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/logo1.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/lunch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/lunch.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/order.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/order.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/star1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/star1.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/star2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/star2.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/tick1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/tick1.png -------------------------------------------------------------------------------- /foodapp/__pycache__/urls.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/foodapp/__pycache__/urls.cpython-36.pyc -------------------------------------------------------------------------------- /foodapp/__pycache__/wsgi.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/foodapp/__pycache__/wsgi.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/__pycache__/admin.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/__pycache__/admin.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/__pycache__/apps.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/__pycache__/apps.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/__pycache__/forms.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/__pycache__/forms.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/__pycache__/urls.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/__pycache__/urls.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/__pycache__/views.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/__pycache__/views.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/static/webapp/images/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/banner.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/close_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/close_1.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/loader.gif -------------------------------------------------------------------------------- /webapp/static/webapp/images/slide_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/slide_1.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/slide_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/slide_2.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/slide_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/slide_3.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/to-top2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/to-top2.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/type-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/type-1.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/type-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/type-2.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/type-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/type-3.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/type-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/type-4.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/wood_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/wood_1.png -------------------------------------------------------------------------------- /webapp/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/__pycache__/models.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/__pycache__/models.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/static/webapp/images/0302-steak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/0302-steak.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/0401-vegan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/0401-vegan.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/0402-chef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/0402-chef.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/cuisine1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/cuisine1.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/cuisine2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/cuisine2.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/cuisine3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/cuisine3.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/cuisine4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/cuisine4.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/cuisine5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/cuisine5.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/cuisine6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/cuisine6.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/cuisine7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/cuisine7.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/cuisine8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/cuisine8.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/img-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/img-sprite.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/res_img_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/res_img_1.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/res_img_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/res_img_2.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/res_img_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/res_img_3.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/res_img_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/res_img_4.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/res_img_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/res_img_5.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/res_img_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/res_img_6.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/res_img_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/res_img_7.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/res_img_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/res_img_8.jpg -------------------------------------------------------------------------------- /foodapp/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/foodapp/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /foodapp/__pycache__/settings.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/foodapp/__pycache__/settings.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/static/webapp/images/dotted-line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/dotted-line.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/restaurent-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/restaurent-1.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/restaurent-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/restaurent-2.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/restaurent-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/restaurent-3.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/restaurent-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/restaurent-4.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/restaurent-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/restaurent-5.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/restaurent-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/restaurent-6.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/service-banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/service-banner.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/0203-coffee-love.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/0203-coffee-love.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/0301-pina-colada.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/0301-pina-colada.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/dotted-line-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/dotted-line-right.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/order-section-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/order-section-bg.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/restaurent-logo1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/restaurent-logo1.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/restaurent-logo2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/restaurent-logo2.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/restaurent-logo3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/restaurent-logo3.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/restaurent-logo4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/restaurent-logo4.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/restaurent-logo5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/restaurent-logo5.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/restaurent-logo6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/restaurent-logo6.jpg -------------------------------------------------------------------------------- /webapp/static/webapp/images/0103-served-plate_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/0103-served-plate_64.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/0301-pina-colada_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/0301-pina-colada_64.png -------------------------------------------------------------------------------- /webapp/migrations/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/migrations/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/static/webapp/images/0103-served-plate_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/0103-served-plate_128.png -------------------------------------------------------------------------------- /webapp/static/webapp/images/dotted-line-right-wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/static/webapp/images/dotted-line-right-wide.png -------------------------------------------------------------------------------- /webapp/migrations/__pycache__/0001_initial.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/migrations/__pycache__/0001_initial.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/migrations/__pycache__/0002_auto_20181019_0704.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/migrations/__pycache__/0002_auto_20181019_0704.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/migrations/__pycache__/0002_auto_20181020_1643.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/migrations/__pycache__/0002_auto_20181020_1643.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/migrations/__pycache__/0002_auto_20181021_1256.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/migrations/__pycache__/0002_auto_20181021_1256.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/migrations/__pycache__/0003_auto_20181020_1721.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/migrations/__pycache__/0003_auto_20181020_1721.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/migrations/__pycache__/0003_auto_20181021_1310.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/migrations/__pycache__/0003_auto_20181021_1310.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/migrations/__pycache__/0004_auto_20181020_1801.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/migrations/__pycache__/0004_auto_20181020_1801.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/migrations/__pycache__/0004_auto_20181021_1320.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/migrations/__pycache__/0004_auto_20181021_1320.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/migrations/__pycache__/0005_auto_20181021_1341.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif536/Food-Ordering-System/HEAD/webapp/migrations/__pycache__/0005_auto_20181021_1341.cpython-36.pyc -------------------------------------------------------------------------------- /webapp/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Customer,Restaurant,Item,Menu,Order,orderItem,User 3 | 4 | admin.site.register(User) 5 | admin.site.register(Customer) 6 | admin.site.register(Restaurant) 7 | admin.site.register(Item) 8 | admin.site.register(Menu) 9 | admin.site.register(Order) 10 | admin.site.register(orderItem) -------------------------------------------------------------------------------- /webapp/templates/webapp/form_template.html: -------------------------------------------------------------------------------- 1 | {% for field in form %} 2 |
3 |
4 | {{ field.errors }} 5 |
6 | 7 |
{{ field }}
8 |
9 | {% endfor %} -------------------------------------------------------------------------------- /foodapp/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for foodapp project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "foodapp.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /webapp/templates/webapp/orderplaced.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base.html'%} 2 | {% block title %}orderplaced{% endblock %} 3 | 4 | {% block body %} 5 |
6 |
7 |

Thank You For Placing Order

8 |
9 |

Waiting for Confirmation

10 |
11 |
12 |

Go back

13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | {% endblock%} -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "foodapp.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError as exc: 10 | raise ImportError( 11 | "Couldn't import Django. Are you sure it's installed and " 12 | "available on your PYTHONPATH environment variable? Did you " 13 | "forget to activate a virtual environment?" 14 | ) from exc 15 | execute_from_command_line(sys.argv) 16 | -------------------------------------------------------------------------------- /webapp/templates/webapp/profile_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base.html'%} 2 | {% block title %}Update profile{% endblock %} 3 | 4 | {% block body %} 5 |
6 |

{{title}}

7 |
8 |
9 | 10 |
11 |
12 |
13 | {% csrf_token %} 14 | {% for field in form %} 15 |
16 |
17 | {{ field.errors }} 18 |
19 | 20 |
{{ field }}
21 |
22 | {% endfor %} 23 | 24 | 25 |
26 |
27 | 28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | 36 | {% endblock%} -------------------------------------------------------------------------------- /foodapp/urls.py: -------------------------------------------------------------------------------- 1 | """foodapp URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.0/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path,include 18 | from django.conf import settings 19 | from django.conf.urls.static import static 20 | 21 | urlpatterns = [ 22 | path('',include('webapp.urls')), 23 | path('admin/', admin.site.urls), 24 | ] 25 | 26 | if settings.DEBUG: 27 | urlpatterns +=static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) 28 | urlpatterns +=static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT) 29 | -------------------------------------------------------------------------------- /webapp/templates/webapp/rest_profile_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base.html'%} 2 | {% block title %}Update restaurant profile {% endblock %} 3 | 4 | {% block body %} 5 |
6 |

{{title}}

7 |
8 |
9 | 10 |
11 |
12 |
13 | {% csrf_token %} 14 | {% for field in form %} 15 |
16 |
17 | {{ field.errors }} 18 |
19 | 20 |
{{ field }}
21 |
22 | {% endfor %} 23 | 24 | 25 |
26 |
27 | 28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | 36 | {% endblock%} -------------------------------------------------------------------------------- /webapp/templates/webapp/order.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base.html'%} 2 | {% block title %} Cart {% endblock %} 3 | 4 | {% block body %} 5 |
6 |
7 |

Order Information :

8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | {% for x in items %} 16 | 17 | {% endfor %} 18 | 19 |
Item NameQuantityPrice
{{x.0}}{{x.1}}₹ {{x.2}}
20 |
21 | Total price: ₹ {{totalprice}} 22 | 23 |
24 |
25 |
26 | {% csrf_token %} 27 | Delivery Address: 28 |
29 |
30 |
31 | 32 |
33 | 34 |
35 | 36 |
37 | 38 | {% endblock %} 39 | -------------------------------------------------------------------------------- /webapp/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('', views.index, name='index'), 6 | path('orderplaced/',views.orderplaced), 7 | path('restaurant/',views.restuarent,name='restuarant'), 8 | path('register/user/',views.customerRegister,name='register'), 9 | path('login/user/',views.customerLogin,name='login'), 10 | path('login/restaurant/',views.restLogin,name='rlogin'), 11 | path('register/restaurant/',views.restRegister,name='rregister'), 12 | path('profile/restaurant/',views.restaurantProfile,name='rprofile'), 13 | path('profile/user/',views.customerProfile,name='profile'), 14 | path('user/create/',views.createCustomer,name='ccreate'), 15 | path('user/update//',views.updateCustomer,name='cupdate'), 16 | path('restaurant/create/',views.createRestaurant,name='rcreate'), 17 | path('restaurant/update//',views.updateRestaurant,name='rupdate'), 18 | path('restaurant/orderlist/',views.orderlist,name='orderlist'), 19 | path('restaurant/menu/',views.menuManipulation,name='mmenu'), 20 | path('logout/',views.Logout,name='logout'), 21 | path('restaurant//',views.restuarantMenu,name='menu'), 22 | path('checkout/',views.checkout,name='checkout'), 23 | 24 | ] -------------------------------------------------------------------------------- /webapp/forms.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.forms import UserCreationForm 2 | from django import forms 3 | from .models import User,Customer,Restaurant,Item,Menu 4 | 5 | class CustomerSignUpForm(forms.ModelForm): 6 | password = forms.CharField(widget=forms.PasswordInput) 7 | class Meta: 8 | model = User 9 | fields=['username','email','password'] 10 | def save(self, commit=True): 11 | user = super().save(commit=False) 12 | user.is_customer=True 13 | if commit: 14 | user.save() 15 | return user 16 | 17 | 18 | class RestuarantSignUpForm(forms.ModelForm): 19 | password = forms.CharField(widget=forms.PasswordInput) 20 | class Meta: 21 | model =User 22 | fields=['username','email','password'] 23 | def save(self,commit=True): 24 | user=super().save(commit=False) 25 | user.is_restaurant=True 26 | if commit: 27 | user.save() 28 | return user 29 | 30 | class CustomerForm(forms.ModelForm): 31 | class Meta: 32 | model = Customer 33 | fields =['f_name','l_name','city','phone','address'] 34 | 35 | 36 | class RestuarantForm(forms.ModelForm): 37 | class Meta: 38 | model = Restaurant 39 | fields =['rname','info','location','r_logo','min_ord','status','approved'] 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /webapp/static/webapp/js/move-top.js: -------------------------------------------------------------------------------- 1 | /* UItoTop jQuery Plugin 1.2 | Matt Varone | http://www.mattvarone.com/web-design/uitotop-jquery-plugin */ 2 | (function($){$.fn.UItoTop=function(options){var defaults={text:'To Top',min:200,inDelay:600,outDelay:400,containerID:'toTop',containerHoverID:'toTopHover',scrollSpeed:1200,easingType:'linear'},settings=$.extend(defaults,options),containerIDhash='#'+settings.containerID,containerHoverIDHash='#'+settings.containerHoverID;$('body').append(''+settings.text+'');$(containerIDhash).hide().on('click.UItoTop',function(){$('html, body').animate({scrollTop:0},settings.scrollSpeed,settings.easingType);$('#'+settings.containerHoverID,this).stop().animate({'opacity':0},settings.inDelay,settings.easingType);return false;}).prepend('').hover(function(){$(containerHoverIDHash,this).stop().animate({'opacity':1},600,'linear');},function(){$(containerHoverIDHash,this).stop().animate({'opacity':0},700,'linear');});$(window).scroll(function(){var sd=$(window).scrollTop();if(typeof document.body.style.maxHeight==="undefined"){$(containerIDhash).css({'position':'absolute','top':sd+$(window).height()-50});} 3 | if(sd>settings.min) 4 | $(containerIDhash).fadeIn(settings.inDelay);else 5 | $(containerIDhash).fadeOut(settings.Outdelay);});};})(jQuery); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Food-Ordering-System 2 | Online Food Ordering System is the web based application intended for restaurant's Businesses.It provide various feature such as searching,viewing and selection of food items from restaurant for customers.This Application also provides restaurant management and menu management for restaurant manager or owner. 3 | 4 | ## Software Requirements 5 | Programming languages : Python 6 | 7 | Operating System : Windows/Linux 8 | 9 | Web Technologies : Django(2.0),Html,Css,Javascript 10 | 11 | Database : Sqlite 12 | 13 | ### Screenshot 14 | 15 | ###### Home page 16 | ![res_list](https://user-images.githubusercontent.com/20842692/50056350-f1761480-0180-11e9-9f53-348cae2c620e.png) 17 | 18 | ###### Restaurant menu page 19 | ![r_menu](https://user-images.githubusercontent.com/20842692/50056372-4023ae80-0181-11e9-9fb8-ccff9e493dd8.png) 20 | 21 | ###### Menu management page 22 | ![menu_manage](https://user-images.githubusercontent.com/20842692/50056396-9e509180-0181-11e9-89f4-ea356c1a8862.png) 23 | 24 | ###### Order History page 25 | ![order_status](https://user-images.githubusercontent.com/20842692/50056409-d2c44d80-0181-11e9-8b3a-0266fc5f8436.png) 26 | 27 | 28 | #### Setup To Run 29 | ``` 30 | pip install -r requirements.txt 31 | ``` 32 | ``` 33 | python manage.py runserver 34 | ``` 35 | 36 | Thank you for visiting my repository. 37 | -------------------------------------------------------------------------------- /webapp/templates/webapp/signup.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base.html'%} 2 | {% block title %}Register{% endblock %} 3 | {% block body %} 4 |
5 | 6 |
7 |
8 |
9 |
10 |
11 |
12 |

Register for an Account

13 | {% if error_message %} 14 |

{{ error_message }}

15 | {% endif %} 16 |
17 | 18 |
19 | {% csrf_token %} 20 | {% include 'webapp/form_template.html' %} 21 | 22 |
23 |
24 | 25 |
26 |
27 |
28 | 29 |
30 | 31 | 34 |
35 |
36 |
37 | 38 |
39 | 40 | {% endblock %} -------------------------------------------------------------------------------- /webapp/templates/webapp/restsignup.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base2.html'%} 2 | {% block title %}Restuatrant Register{% endblock %} 3 | {% block body %} 4 |
5 | 6 |
7 |
8 |
9 |
10 |
11 |
12 |

Register for Restuarant

13 | {% if error_message %} 14 |

{{ error_message }}

15 | {% endif %} 16 |
17 | 18 |
19 | {% csrf_token %} 20 | {% include 'webapp/form_template.html' %} 21 | 22 |
23 |
24 | 25 |
26 |
27 |
28 | 29 |
30 | 31 | 34 |
35 |
36 |
37 | 38 |
39 | 40 | {% endblock %} -------------------------------------------------------------------------------- /webapp/templates/webapp/restaurents.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base.html'%} 2 | {% block title %}Restaurants{% endblock %} 3 | 4 | {% block body %} 5 |
6 |

Restaurants

7 |
8 |
9 |
10 |
11 | 22 | 23 |
24 |
25 |
26 |
27 |
28 |
29 | {% for rest in r_object %} 30 |
31 |
32 |
33 | 34 | 35 | 36 |
37 |

{{rest.rname}}

38 |
{{rest.info}}
39 |

Min: ₹ {{rest.min_ord}}

40 |
Status: {{rest.status}}
41 | 42 |
43 | 44 |
45 | 46 |
47 |
48 | 49 | {% endfor%} 50 |
51 |
52 | 53 | {% endblock %} 54 | 55 | 56 | -------------------------------------------------------------------------------- /webapp/static/webapp/js/classie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * classie - class helper functions 3 | * from bonzo https://github.com/ded/bonzo 4 | * 5 | * classie.has( elem, 'my-class' ) -> true/false 6 | * classie.add( elem, 'my-new-class' ) 7 | * classie.remove( elem, 'my-unwanted-class' ) 8 | * classie.toggle( elem, 'my-class' ) 9 | */ 10 | 11 | /*jshint browser: true, strict: true, undef: true */ 12 | /*global define: false */ 13 | 14 | ( function( window ) { 15 | 16 | 'use strict'; 17 | 18 | // class helper functions from bonzo https://github.com/ded/bonzo 19 | 20 | function classReg( className ) { 21 | return new RegExp("(^|\\s+)" + className + "(\\s+|$)"); 22 | } 23 | 24 | // classList support for class management 25 | // altho to be fair, the api sucks because it won't accept multiple classes at once 26 | var hasClass, addClass, removeClass; 27 | 28 | if ( 'classList' in document.documentElement ) { 29 | hasClass = function( elem, c ) { 30 | return elem.classList.contains( c ); 31 | }; 32 | addClass = function( elem, c ) { 33 | elem.classList.add( c ); 34 | }; 35 | removeClass = function( elem, c ) { 36 | elem.classList.remove( c ); 37 | }; 38 | } 39 | else { 40 | hasClass = function( elem, c ) { 41 | return classReg( c ).test( elem.className ); 42 | }; 43 | addClass = function( elem, c ) { 44 | if ( !hasClass( elem, c ) ) { 45 | elem.className = elem.className + ' ' + c; 46 | } 47 | }; 48 | removeClass = function( elem, c ) { 49 | elem.className = elem.className.replace( classReg( c ), ' ' ); 50 | }; 51 | } 52 | 53 | function toggleClass( elem, c ) { 54 | var fn = hasClass( elem, c ) ? removeClass : addClass; 55 | fn( elem, c ); 56 | } 57 | 58 | var classie = { 59 | // full names 60 | hasClass: hasClass, 61 | addClass: addClass, 62 | removeClass: removeClass, 63 | toggleClass: toggleClass, 64 | // short names 65 | has: hasClass, 66 | add: addClass, 67 | remove: removeClass, 68 | toggle: toggleClass 69 | }; 70 | 71 | // transport 72 | if ( typeof define === 'function' && define.amd ) { 73 | // AMD 74 | define( classie ); 75 | } else { 76 | // browser global 77 | window.classie = classie; 78 | } 79 | 80 | })( window ); 81 | -------------------------------------------------------------------------------- /webapp/templates/webapp/login.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base.html'%} 2 | {% block title %}Log In{% endblock %} 3 | 4 | {% block body %} 5 |
6 | 7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |

Log In

16 | {% if error_message %} 17 |

{{ error_message }}

18 | {% endif %} 19 |
20 |
21 | {% csrf_token %} 22 |
23 | 26 |
27 | 28 |
29 |
30 |
31 | 34 |
35 | 36 |
37 |
38 |
39 |
40 | 41 |
42 |
43 |
44 |
45 | 48 |
49 |
50 |
51 | 52 |
53 |
54 |
55 | {% endblock %} 56 | 57 | -------------------------------------------------------------------------------- /webapp/templates/webapp/restlogin.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base2.html'%} 2 | {% block title %} Restaurant Log In{% endblock %} 3 | 4 | {% block body %} 5 |
6 | 7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |

Restuarant Log In

16 | {% if error_message %} 17 |

{{ error_message }}

18 | {% endif %} 19 |
20 |
21 | {% csrf_token %} 22 |
23 | 26 |
27 | 28 |
29 |
30 |
31 | 34 |
35 | 36 |
37 |
38 |
39 |
40 | 41 |
42 |
43 |
44 |
45 | 48 |
49 |
50 |
51 | 52 |
53 |
54 |
55 | {% endblock %} 56 | 57 | -------------------------------------------------------------------------------- /webapp/templates/webapp/menu_modify.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base2.html'%} 2 | {% block title %}Add Menu{% endblock %} 3 | {% block body %} 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

17 |

Modify Items

18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | {% for x in menu %} 26 | 27 | {% csrf_token %} 28 | 29 | 30 | 31 | 35 | 36 | 37 | {% endfor %} 38 |
ItemPriceQuantity
{{x.0}} 32 | 33 | 34 |
39 |

40 |
41 |
42 |
43 |
44 |

45 |

Add Item

46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | {% csrf_token %} 55 | 62 | 63 | 65 | 68 | 69 | 70 |
ItemPriceQuantity
56 | 61 | 64 | 66 | 67 |
71 |

72 |
73 |
74 |
75 |
76 |

77 |

Delete Item

78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | {% for x in menu %} 86 | 87 | 88 | 89 | 90 | 97 | 98 | {% endfor %} 99 |
ItemPriceQuantity
{{x.0}}{{x.1}}{{x.2}} 91 |
{% csrf_token %} 92 | 93 | 94 | 95 |
96 |
100 |

101 |
102 |
103 |
104 | 105 | {% endblock %} -------------------------------------------------------------------------------- /webapp/templates/webapp/menu.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base.html'%} 2 | {% block title %}Menu{% endblock %} 3 | 4 | {% block body %} 5 |
6 |

{{rname}}

7 |

8 | Info : {{rinfo|safe}} 9 |
10 | Location: {{rlocation}} 11 |
12 | Min Order: ₹{{rmin}} 13 |
14 |

15 |
16 | 17 |
18 |
19 | 20 |
21 |
22 |

Menu

23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | {% for x in items %} 32 | 33 | 34 | 35 | 36 | {% if x.4 == "Open" %} 37 | {% if x.5 > 0 %} 38 | 60 | {% else %} 61 | 64 | {% endif %} 65 | {% else %} 66 | 69 | {% endif %} 70 | 71 | {% endfor %} 72 | 73 |
Item NameCategoryPriceAdd
{{x.0}}{{x.1}}₹ {{x.2}} 39 |
40 | 41 |
42 | 48 |
49 | 0 50 |
51 | 57 |
58 |
59 |
62 | NA 63 | 67 | Closed 68 |
74 |
75 |
76 | 102 | {% endblock %} 103 | -------------------------------------------------------------------------------- /webapp/templates/webapp/profile.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base.html'%} 2 | {% block title %}Profile{% endblock %} 3 | 4 | {% block body %} 5 |
6 |
7 | 8 |
9 |
10 | 11 |
12 |
13 |

{{user.customer.f_name}} {{user.customer.l_name}}

14 |
15 |
16 |
17 |
18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 50 | 51 | 52 | 53 | 54 |
User Name:{{user.username}}
First Name:{{user.customer.f_name}}
Last Name:{{user.customer.l_name}}
City:{{user.customer.city}}
Address:{{user.customer.address}}
Email:{{user.email}}
Phone Number:{{user.customer.phone}} 49 |
55 |
56 |
57 |
58 | Edit 59 |
60 | 63 |
64 |
65 | 66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | {% endblock%} -------------------------------------------------------------------------------- /webapp/templates/webapp/rest_profile.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base2.html'%} 2 | {% block title %}Profile{% endblock %} 3 | 4 | {% block body %} 5 |
6 |
7 | 8 |
9 |
10 |
11 | 12 |
13 |
14 | 15 |
16 |
17 |

{{user.restaurant.rname}}

18 |
19 | 20 |
21 |
22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |
Restaurant UserName:{{user.username}}
Name:{{user.restaurant.rname}}
info:{{user.restaurant.info}}
Location:{{user.restaurant.location}}
Status:{{user.restaurant.status}}
Approved:{{user.restaurant.approved}}
Email:{{user.email}}
58 |
59 |
60 |
61 | Edit 62 |
63 | 66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | {% endblock%} -------------------------------------------------------------------------------- /foodapp/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for foodapp project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.0. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.0/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.0/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = '*qwvu5+co-z4(@my1c(90h*)cbejnp)%d+k1f645sh(9ul=&07' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | AUTH_USER_MODEL= 'webapp.User' 32 | # Application definition 33 | 34 | INSTALLED_APPS = [ 35 | 'webapp.apps.WebappConfig', 36 | 'django.contrib.admin', 37 | 'django.contrib.auth', 38 | 'django.contrib.contenttypes', 39 | 'django.contrib.sessions', 40 | 'django.contrib.messages', 41 | 'django.contrib.staticfiles', 42 | ] 43 | 44 | MIDDLEWARE = [ 45 | 'django.middleware.security.SecurityMiddleware', 46 | 'django.contrib.sessions.middleware.SessionMiddleware', 47 | 'django.middleware.common.CommonMiddleware', 48 | 'django.middleware.csrf.CsrfViewMiddleware', 49 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 50 | 'django.contrib.messages.middleware.MessageMiddleware', 51 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 52 | ] 53 | 54 | ROOT_URLCONF = 'foodapp.urls' 55 | 56 | TEMPLATES = [ 57 | { 58 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 59 | 'DIRS': [], 60 | 'APP_DIRS': True, 61 | 'OPTIONS': { 62 | 'context_processors': [ 63 | 'django.template.context_processors.debug', 64 | 'django.template.context_processors.request', 65 | 'django.contrib.auth.context_processors.auth', 66 | 'django.contrib.messages.context_processors.messages', 67 | ], 68 | }, 69 | }, 70 | ] 71 | 72 | WSGI_APPLICATION = 'foodapp.wsgi.application' 73 | 74 | 75 | # Database 76 | # https://docs.djangoproject.com/en/2.0/ref/settings/#databases 77 | 78 | DATABASES = { 79 | 'default': { 80 | 'ENGINE': 'django.db.backends.sqlite3', 81 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 82 | } 83 | } 84 | 85 | 86 | # Password validation 87 | # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators 88 | 89 | AUTH_PASSWORD_VALIDATORS = [ 90 | { 91 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 92 | }, 93 | { 94 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 95 | }, 96 | { 97 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 98 | }, 99 | { 100 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 101 | }, 102 | ] 103 | 104 | 105 | # Internationalization 106 | # https://docs.djangoproject.com/en/2.0/topics/i18n/ 107 | 108 | LANGUAGE_CODE = 'en-us' 109 | 110 | TIME_ZONE = 'UTC' 111 | 112 | USE_I18N = True 113 | 114 | USE_L10N = True 115 | 116 | USE_TZ = True 117 | 118 | 119 | # Static files (CSS, JavaScript, Images) 120 | # https://docs.djangoproject.com/en/2.0/howto/static-files/ 121 | 122 | STATIC_URL = '/static/' 123 | 124 | STATICFILES_DIRS = [ 125 | os.path.join(BASE_DIR, "static"), 126 | '/var/www/static/', 127 | ] 128 | MEDIA_URL = '/media/' 129 | MEDIA_ROOT = os.path.join(BASE_DIR, 'media') 130 | -------------------------------------------------------------------------------- /webapp/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import AbstractUser 3 | from django.conf import settings 4 | from django.db.models.signals import post_save 5 | 6 | class User(AbstractUser): 7 | is_customer = models.BooleanField(default=False) 8 | is_restaurant = models.BooleanField(default=False) 9 | 10 | 11 | class Customer(models.Model): 12 | user = models.OneToOneField(settings.AUTH_USER_MODEL,on_delete=models.CASCADE) 13 | f_name = models.CharField(max_length=20,blank=False) 14 | l_name = models.CharField(max_length=20,blank=False) 15 | city = models.CharField(max_length=40,blank=False) 16 | phone = models.CharField(max_length=10,blank=False) 17 | address = models.TextField() 18 | 19 | def __str__(self): 20 | return self.user.username 21 | 22 | class Restaurant(models.Model): 23 | user = models.OneToOneField(settings.AUTH_USER_MODEL,on_delete=models.CASCADE) 24 | rname = models.CharField(max_length=100,blank=False) 25 | info = models.CharField(max_length=40,blank=False) 26 | min_ord = models.CharField(max_length=5,blank=False) 27 | location = models.CharField(max_length=40,blank=False) 28 | r_logo = models.FileField(blank=False) 29 | 30 | REST_STATE_OPEN = "Open" 31 | REST_STATE_CLOSE = "Closed" 32 | REST_STATE_CHOICES =( 33 | (REST_STATE_OPEN,REST_STATE_OPEN), 34 | (REST_STATE_CLOSE,REST_STATE_CLOSE) 35 | ) 36 | status = models.CharField(max_length=50,choices=REST_STATE_CHOICES,default=REST_STATE_OPEN,blank=False) 37 | approved = models.BooleanField(blank=False,default=True) 38 | 39 | def __str__(self): 40 | return self.rname 41 | 42 | class Item(models.Model): 43 | id = models.AutoField(primary_key=True) 44 | fname = models.CharField(max_length=30,blank=False) 45 | category = models.CharField(max_length=50,blank=False) 46 | 47 | def __str__(self): 48 | return self.fname 49 | 50 | class Menu(models.Model): 51 | id = models.AutoField(primary_key=True) 52 | item_id = models.ForeignKey(Item,on_delete=models.CASCADE) 53 | r_id = models.ForeignKey(Restaurant,on_delete=models.CASCADE) 54 | price = models.IntegerField(blank=False) 55 | quantity = models.IntegerField(blank=False,default=0) 56 | 57 | def __str__(self): 58 | return self.item_id.fname+' - '+str(self.price) 59 | 60 | 61 | class Order(models.Model): 62 | id = models.AutoField(primary_key=True) 63 | total_amount = models.IntegerField(default=0) 64 | timestamp = models.DateTimeField(auto_now_add=True) 65 | delivery_addr = models.CharField(max_length=50,blank=True) 66 | orderedBy = models.ForeignKey(User ,on_delete=models.CASCADE) 67 | r_id = models.ForeignKey(Restaurant ,on_delete=models.CASCADE) 68 | 69 | ORDER_STATE_WAITING = "Waiting" 70 | ORDER_STATE_PLACED = "Placed" 71 | ORDER_STATE_ACKNOWLEDGED = "Acknowledged" 72 | ORDER_STATE_COMPLETED = "Completed" 73 | ORDER_STATE_CANCELLED = "Cancelled" 74 | ORDER_STATE_DISPATCHED = "Dispatched" 75 | 76 | ORDER_STATE_CHOICES = ( 77 | (ORDER_STATE_WAITING,ORDER_STATE_WAITING), 78 | (ORDER_STATE_PLACED, ORDER_STATE_PLACED), 79 | (ORDER_STATE_ACKNOWLEDGED, ORDER_STATE_ACKNOWLEDGED), 80 | (ORDER_STATE_COMPLETED, ORDER_STATE_COMPLETED), 81 | (ORDER_STATE_CANCELLED, ORDER_STATE_CANCELLED), 82 | (ORDER_STATE_DISPATCHED, ORDER_STATE_DISPATCHED) 83 | ) 84 | status = models.CharField(max_length=50,choices=ORDER_STATE_CHOICES,default=ORDER_STATE_WAITING) 85 | 86 | def __str__(self): 87 | return str(self.id) +' '+self.status 88 | 89 | 90 | class orderItem(models.Model): 91 | id = models.AutoField(primary_key=True) 92 | item_id = models.ForeignKey(Menu ,on_delete=models.CASCADE) 93 | ord_id = models.ForeignKey(Order,on_delete=models.CASCADE) 94 | quantity = models.IntegerField(default=0) 95 | 96 | def __str__(self): 97 | return str(self.id) 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /webapp/templates/webapp/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% load staticfiles %} 5 | 6 | 7 | 8 | {% block title %}FoodApp{% endblock title %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 68 | 69 | {% block body %} 70 | {% endblock %} 71 |
72 |
73 |
74 |
75 | 76 | 84 | 85 | 87 | 88 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /webapp/templates/webapp/base2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% load staticfiles %} 5 | 6 | 7 | 8 | {% block title %}FoodApp{% endblock title %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 71 | 72 | {% block body %} 73 | {% endblock %} 74 |
75 |
76 |
77 |
78 | 79 | 87 | 88 | 90 | 91 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /webapp/templates/webapp/order-list.html: -------------------------------------------------------------------------------- 1 | {% extends 'webapp/base2.html' %} 2 | {% block title %}Order List{% endblock %} 3 | 4 | {% block body %} 5 | {% for order in orders %} 6 |
7 |
8 |
9 |

{{order.0}} - {{order.1}} - {{order.6}}

10 |
11 |
12 |
13 |
Order Information
14 | Items List: 15 |
16 | 17 | 18 | 21 | 24 | 27 | 28 | {% for x in order.2 %} 29 | 30 | {% endfor %} 31 |
19 | Name 20 | 22 | Quantity 23 | 25 | Price 26 |
{{x.0}}{{x.1}}₹{{x.2}}
32 |
33 |
34 |
35 |
{% csrf_token %} 36 | Total price: ₹{{order.3}} 37 | Status: 38 | 75 | 76 | 77 |
78 |
79 |
80 | 81 | 82 |
83 | {% endfor %} 84 | {% endblock %} -------------------------------------------------------------------------------- /webapp/static/webapp/js/wow.min.js: -------------------------------------------------------------------------------- 1 | /*! WOW - v0.1.9 - 2014-05-10 2 | * Copyright (c) 2014 Matthieu Aussaguel; Licensed MIT */(function(){var a,b,c=function(a,b){return function(){return a.apply(b,arguments)}};a=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in a)d=a[c],null!=d&&(b[c]=d);return b},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a}(),b=this.WeakMap||(b=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),this.WOW=function(){function d(a){null==a&&(a={}),this.scrollCallback=c(this.scrollCallback,this),this.scrollHandler=c(this.scrollHandler,this),this.start=c(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new b}return d.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0},d.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():document.addEventListener("DOMContentLoaded",this.start)},d.prototype.start=function(){var a,b,c,d;if(this.boxes=this.element.getElementsByClassName(this.config.boxClass),this.boxes.length){if(this.disabled())return this.resetStyle();for(d=this.boxes,b=0,c=d.length;c>b;b++)a=d[b],this.applyStyle(a,!0);return window.addEventListener("scroll",this.scrollHandler,!1),window.addEventListener("resize",this.scrollHandler,!1),this.interval=setInterval(this.scrollCallback,50)}},d.prototype.stop=function(){return window.removeEventListener("scroll",this.scrollHandler,!1),window.removeEventListener("resize",this.scrollHandler,!1),null!=this.interval?clearInterval(this.interval):void 0},d.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass},d.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},d.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),d.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.setAttribute("style","visibility: visible;"));return e},d.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},d.prototype.vendors=["moz","webkit"],d.prototype.vendorSet=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charAt(0).toUpperCase()+c.substr(1)]=d);return h}.call(this));return f},d.prototype.vendorCSS=function(a,b){var c,d,e,f,g,h;for(d=window.getComputedStyle(a),c=d.getPropertyCSSValue(b),h=this.vendors,f=0,g=h.length;g>f;f++)e=h[f],c=c||d.getPropertyCSSValue("-"+e+"-"+b);return c},d.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=window.getComputedStyle(a).getPropertyValue("animation-name")}return"none"===b?"":b},d.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},d.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},d.prototype.scrollHandler=function(){return this.scrolled=!0},d.prototype.scrollCallback=function(){var a;return this.scrolled&&(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),!this.boxes.length)?this.stop():void 0},d.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},d.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+this.element.clientHeight-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},d.prototype.util=function(){return this._util||(this._util=new a)},d.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},d}()}).call(this); -------------------------------------------------------------------------------- /webapp/static/webapp/js/easing.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php 3 | * 4 | * Uses the built In easIng capabilities added In jQuery 1.1 5 | * to offer multiple easIng options 6 | * 7 | * Copyright (c) 2007 George Smith 8 | * Licensed under the MIT License: 9 | * http://www.opensource.org/licenses/mit-license.php 10 | */ 11 | 12 | // t: current time, b: begInnIng value, c: change In value, d: duration 13 | 14 | jQuery.extend( jQuery.easing, 15 | { 16 | easeInQuad: function (x, t, b, c, d) { 17 | return c*(t/=d)*t + b; 18 | }, 19 | easeOutQuad: function (x, t, b, c, d) { 20 | return -c *(t/=d)*(t-2) + b; 21 | }, 22 | easeInOutQuad: function (x, t, b, c, d) { 23 | if ((t/=d/2) < 1) return c/2*t*t + b; 24 | return -c/2 * ((--t)*(t-2) - 1) + b; 25 | }, 26 | easeInCubic: function (x, t, b, c, d) { 27 | return c*(t/=d)*t*t + b; 28 | }, 29 | easeOutCubic: function (x, t, b, c, d) { 30 | return c*((t=t/d-1)*t*t + 1) + b; 31 | }, 32 | easeInOutCubic: function (x, t, b, c, d) { 33 | if ((t/=d/2) < 1) return c/2*t*t*t + b; 34 | return c/2*((t-=2)*t*t + 2) + b; 35 | }, 36 | easeInQuart: function (x, t, b, c, d) { 37 | return c*(t/=d)*t*t*t + b; 38 | }, 39 | easeOutQuart: function (x, t, b, c, d) { 40 | return -c * ((t=t/d-1)*t*t*t - 1) + b; 41 | }, 42 | easeInOutQuart: function (x, t, b, c, d) { 43 | if ((t/=d/2) < 1) return c/2*t*t*t*t + b; 44 | return -c/2 * ((t-=2)*t*t*t - 2) + b; 45 | }, 46 | easeInQuint: function (x, t, b, c, d) { 47 | return c*(t/=d)*t*t*t*t + b; 48 | }, 49 | easeOutQuint: function (x, t, b, c, d) { 50 | return c*((t=t/d-1)*t*t*t*t + 1) + b; 51 | }, 52 | easeInOutQuint: function (x, t, b, c, d) { 53 | if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; 54 | return c/2*((t-=2)*t*t*t*t + 2) + b; 55 | }, 56 | easeInSine: function (x, t, b, c, d) { 57 | return -c * Math.cos(t/d * (Math.PI/2)) + c + b; 58 | }, 59 | easeOutSine: function (x, t, b, c, d) { 60 | return c * Math.sin(t/d * (Math.PI/2)) + b; 61 | }, 62 | easeInOutSine: function (x, t, b, c, d) { 63 | return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; 64 | }, 65 | easeInExpo: function (x, t, b, c, d) { 66 | return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; 67 | }, 68 | easeOutExpo: function (x, t, b, c, d) { 69 | return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; 70 | }, 71 | easeInOutExpo: function (x, t, b, c, d) { 72 | if (t==0) return b; 73 | if (t==d) return b+c; 74 | if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; 75 | return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; 76 | }, 77 | easeInCirc: function (x, t, b, c, d) { 78 | return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 79 | }, 80 | easeOutCirc: function (x, t, b, c, d) { 81 | return c * Math.sqrt(1 - (t=t/d-1)*t) + b; 82 | }, 83 | easeInOutCirc: function (x, t, b, c, d) { 84 | if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; 85 | return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; 86 | }, 87 | easeInElastic: function (x, t, b, c, d) { 88 | var s=1.70158;var p=0;var a=c; 89 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 90 | if (a < Math.abs(c)) { a=c; var s=p/4; } 91 | else var s = p/(2*Math.PI) * Math.asin (c/a); 92 | return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 93 | }, 94 | easeOutElastic: function (x, t, b, c, d) { 95 | var s=1.70158;var p=0;var a=c; 96 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 97 | if (a < Math.abs(c)) { a=c; var s=p/4; } 98 | else var s = p/(2*Math.PI) * Math.asin (c/a); 99 | return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 100 | }, 101 | easeInOutElastic: function (x, t, b, c, d) { 102 | var s=1.70158;var p=0;var a=c; 103 | if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 104 | if (a < Math.abs(c)) { a=c; var s=p/4; } 105 | else var s = p/(2*Math.PI) * Math.asin (c/a); 106 | if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 107 | return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 108 | }, 109 | easeInBack: function (x, t, b, c, d, s) { 110 | if (s == undefined) s = 1.70158; 111 | return c*(t/=d)*t*((s+1)*t - s) + b; 112 | }, 113 | easeOutBack: function (x, t, b, c, d, s) { 114 | if (s == undefined) s = 1.70158; 115 | return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 116 | }, 117 | easeInOutBack: function (x, t, b, c, d, s) { 118 | if (s == undefined) s = 1.70158; 119 | if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 120 | return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 121 | }, 122 | easeInBounce: function (x, t, b, c, d) { 123 | return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; 124 | }, 125 | easeOutBounce: function (x, t, b, c, d) { 126 | if ((t/=d) < (1/2.75)) { 127 | return c*(7.5625*t*t) + b; 128 | } else if (t < (2/2.75)) { 129 | return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 130 | } else if (t < (2.5/2.75)) { 131 | return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 132 | } else { 133 | return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 134 | } 135 | }, 136 | easeInOutBounce: function (x, t, b, c, d) { 137 | if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; 138 | return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; 139 | } 140 | }); 141 | -------------------------------------------------------------------------------- /webapp/static/webapp/js/uisearch.js: -------------------------------------------------------------------------------- 1 | /** 2 | * uisearch.js v1.0.0 3 | * http://www.codrops.com 4 | * 5 | * Licensed under the MIT license. 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * 8 | * Copyright 2013, Codrops 9 | * http://www.codrops.com 10 | */ 11 | ;( function( window ) { 12 | 13 | 'use strict'; 14 | 15 | // EventListener | @jon_neal | //github.com/jonathantneal/EventListener 16 | !window.addEventListener && window.Element && (function () { 17 | function addToPrototype(name, method) { 18 | Window.prototype[name] = HTMLDocument.prototype[name] = Element.prototype[name] = method; 19 | } 20 | 21 | var registry = []; 22 | 23 | addToPrototype("addEventListener", function (type, listener) { 24 | var target = this; 25 | 26 | registry.unshift({ 27 | __listener: function (event) { 28 | event.currentTarget = target; 29 | event.pageX = event.clientX + document.documentElement.scrollLeft; 30 | event.pageY = event.clientY + document.documentElement.scrollTop; 31 | event.preventDefault = function () { event.returnValue = false }; 32 | event.relatedTarget = event.fromElement || null; 33 | event.stopPropagation = function () { event.cancelBubble = true }; 34 | event.relatedTarget = event.fromElement || null; 35 | event.target = event.srcElement || target; 36 | event.timeStamp = +new Date; 37 | 38 | listener.call(target, event); 39 | }, 40 | listener: listener, 41 | target: target, 42 | type: type 43 | }); 44 | 45 | this.attachEvent("on" + type, registry[0].__listener); 46 | }); 47 | 48 | addToPrototype("removeEventListener", function (type, listener) { 49 | for (var index = 0, length = registry.length; index < length; ++index) { 50 | if (registry[index].target == this && registry[index].type == type && registry[index].listener == listener) { 51 | return this.detachEvent("on" + type, registry.splice(index, 1)[0].__listener); 52 | } 53 | } 54 | }); 55 | 56 | addToPrototype("dispatchEvent", function (eventObject) { 57 | try { 58 | return this.fireEvent("on" + eventObject.type, eventObject); 59 | } catch (error) { 60 | for (var index = 0, length = registry.length; index < length; ++index) { 61 | if (registry[index].target == this && registry[index].type == eventObject.type) { 62 | registry[index].call(this, eventObject); 63 | } 64 | } 65 | } 66 | }); 67 | })(); 68 | 69 | // http://stackoverflow.com/a/11381730/989439 70 | function mobilecheck() { 71 | var check = false; 72 | (function(a){if(/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera); 73 | return check; 74 | } 75 | 76 | // http://www.jonathantneal.com/blog/polyfills-and-prototypes/ 77 | !String.prototype.trim && (String.prototype.trim = function() { 78 | return this.replace(/^\s+|\s+$/g, ''); 79 | }); 80 | 81 | function UISearch( el, options ) { 82 | this.el = el; 83 | this.inputEl = el.querySelector( 'form > input.sb-search-input' ); 84 | this._initEvents(); 85 | } 86 | 87 | UISearch.prototype = { 88 | _initEvents : function() { 89 | var self = this, 90 | initSearchFn = function( ev ) { 91 | ev.stopPropagation(); 92 | // trim its value 93 | self.inputEl.value = self.inputEl.value.trim(); 94 | 95 | if( !classie.has( self.el, 'sb-search-open' ) ) { // open it 96 | ev.preventDefault(); 97 | self.open(); 98 | } 99 | else if( classie.has( self.el, 'sb-search-open' ) && /^\s*$/.test( self.inputEl.value ) ) { // close it 100 | ev.preventDefault(); 101 | self.close(); 102 | } 103 | } 104 | 105 | this.el.addEventListener( 'click', initSearchFn ); 106 | this.el.addEventListener( 'touchstart', initSearchFn ); 107 | this.inputEl.addEventListener( 'click', function( ev ) { ev.stopPropagation(); }); 108 | this.inputEl.addEventListener( 'touchstart', function( ev ) { ev.stopPropagation(); } ); 109 | }, 110 | open : function() { 111 | var self = this; 112 | classie.add( this.el, 'sb-search-open' ); 113 | // focus the input 114 | if( !mobilecheck() ) { 115 | this.inputEl.focus(); 116 | } 117 | // close the search input if body is clicked 118 | var bodyFn = function( ev ) { 119 | self.close(); 120 | this.removeEventListener( 'click', bodyFn ); 121 | this.removeEventListener( 'touchstart', bodyFn ); 122 | }; 123 | document.addEventListener( 'click', bodyFn ); 124 | document.addEventListener( 'touchstart', bodyFn ); 125 | }, 126 | close : function() { 127 | this.inputEl.blur(); 128 | classie.remove( this.el, 'sb-search-open' ); 129 | } 130 | } 131 | 132 | // add to global namespace 133 | window.UISearch = UISearch; 134 | 135 | } )( window ); -------------------------------------------------------------------------------- /webapp/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.7 on 2018-10-26 18:45 2 | 3 | from django.conf import settings 4 | import django.contrib.auth.models 5 | import django.contrib.auth.validators 6 | from django.db import migrations, models 7 | import django.db.models.deletion 8 | import django.utils.timezone 9 | 10 | 11 | class Migration(migrations.Migration): 12 | 13 | initial = True 14 | 15 | dependencies = [ 16 | ('auth', '0009_alter_user_last_name_max_length'), 17 | ] 18 | 19 | operations = [ 20 | migrations.CreateModel( 21 | name='User', 22 | fields=[ 23 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 24 | ('password', models.CharField(max_length=128, verbose_name='password')), 25 | ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), 26 | ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), 27 | ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), 28 | ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')), 29 | ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), 30 | ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), 31 | ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), 32 | ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), 33 | ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), 34 | ('is_customer', models.BooleanField(default=False)), 35 | ('is_restaurant', models.BooleanField(default=False)), 36 | ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), 37 | ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), 38 | ], 39 | options={ 40 | 'verbose_name': 'user', 41 | 'verbose_name_plural': 'users', 42 | 'abstract': False, 43 | }, 44 | managers=[ 45 | ('objects', django.contrib.auth.models.UserManager()), 46 | ], 47 | ), 48 | migrations.CreateModel( 49 | name='Customer', 50 | fields=[ 51 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 52 | ('f_name', models.CharField(max_length=20)), 53 | ('l_name', models.CharField(max_length=20)), 54 | ('city', models.CharField(max_length=40)), 55 | ('phone', models.CharField(max_length=10)), 56 | ('address', models.TextField()), 57 | ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 58 | ], 59 | ), 60 | migrations.CreateModel( 61 | name='Item', 62 | fields=[ 63 | ('id', models.AutoField(primary_key=True, serialize=False)), 64 | ('fname', models.CharField(max_length=30)), 65 | ('category', models.CharField(max_length=50)), 66 | ], 67 | ), 68 | migrations.CreateModel( 69 | name='Menu', 70 | fields=[ 71 | ('id', models.AutoField(primary_key=True, serialize=False)), 72 | ('price', models.IntegerField()), 73 | ('quantity', models.IntegerField(default=0)), 74 | ('item_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='webapp.Item')), 75 | ], 76 | ), 77 | migrations.CreateModel( 78 | name='Order', 79 | fields=[ 80 | ('id', models.AutoField(primary_key=True, serialize=False)), 81 | ('total_amount', models.IntegerField(default=0)), 82 | ('timestamp', models.DateTimeField(auto_now_add=True)), 83 | ('delivery_addr', models.CharField(blank=True, max_length=50)), 84 | ('status', models.CharField(choices=[('Waiting', 'Waiting'), ('Placed', 'Placed'), ('Acknowledged', 'Acknowledged'), ('Completed', 'Completed'), ('Cancelled', 'Cancelled'), ('Dispatched', 'Dispatched')], default='Waiting', max_length=50)), 85 | ('orderedBy', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 86 | ], 87 | ), 88 | migrations.CreateModel( 89 | name='orderItem', 90 | fields=[ 91 | ('id', models.AutoField(primary_key=True, serialize=False)), 92 | ('quantity', models.IntegerField(default=0)), 93 | ('item_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='webapp.Menu')), 94 | ('ord_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='webapp.Order')), 95 | ], 96 | ), 97 | migrations.CreateModel( 98 | name='Restaurant', 99 | fields=[ 100 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 101 | ('rname', models.CharField(max_length=100)), 102 | ('info', models.CharField(max_length=40)), 103 | ('min_ord', models.CharField(max_length=5)), 104 | ('location', models.CharField(max_length=40)), 105 | ('r_logo', models.FileField(upload_to='')), 106 | ('status', models.CharField(choices=[('Open', 'Open'), ('Closed', 'Closed')], default='Open', max_length=50)), 107 | ('approved', models.BooleanField(default=True)), 108 | ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 109 | ], 110 | ), 111 | migrations.AddField( 112 | model_name='order', 113 | name='r_id', 114 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='webapp.Restaurant'), 115 | ), 116 | migrations.AddField( 117 | model_name='menu', 118 | name='r_id', 119 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='webapp.Restaurant'), 120 | ), 121 | ] 122 | -------------------------------------------------------------------------------- /webapp/static/webapp/js/jquery.flexisel.js: -------------------------------------------------------------------------------- 1 | /* 2 | * File: jquery.flexisel.js 3 | * Version: 1.0.0 4 | * Description: Responsive carousel jQuery plugin 5 | * Author: 9bit Studios 6 | * Copyright 2012, 9bit Studios 7 | * http://www.9bitstudios.com 8 | * Free to use and abuse under the MIT license. 9 | * http://www.opensource.org/licenses/mit-license.php 10 | */ 11 | 12 | (function ($) { 13 | 14 | $.fn.flexisel = function (options) { 15 | 16 | var defaults = $.extend({ 17 | visibleItems: 4, 18 | animationSpeed: 200, 19 | autoPlay: false, 20 | autoPlaySpeed: 3000, 21 | pauseOnHover: true, 22 | setMaxWidthAndHeight: false, 23 | enableResponsiveBreakpoints: false, 24 | responsiveBreakpoints: { 25 | portrait: { 26 | changePoint:480, 27 | visibleItems: 1 28 | }, 29 | landscape: { 30 | changePoint:640, 31 | visibleItems: 2 32 | }, 33 | tablet: { 34 | changePoint:768, 35 | visibleItems: 3 36 | } 37 | } 38 | }, options); 39 | 40 | /****************************** 41 | Private Variables 42 | *******************************/ 43 | 44 | var object = $(this); 45 | var settings = $.extend(defaults, options); 46 | var itemsWidth; // Declare the global width of each item in carousel 47 | var canNavigate = true; 48 | var itemsVisible = settings.visibleItems; 49 | 50 | /****************************** 51 | Public Methods 52 | *******************************/ 53 | 54 | var methods = { 55 | 56 | init: function() { 57 | 58 | return this.each(function () { 59 | methods.appendHTML(); 60 | methods.setEventHandlers(); 61 | methods.initializeItems(); 62 | }); 63 | }, 64 | 65 | /****************************** 66 | Initialize Items 67 | *******************************/ 68 | 69 | initializeItems: function() { 70 | 71 | var listParent = object.parent(); 72 | var innerHeight = listParent.height(); 73 | var childSet = object.children(); 74 | 75 | var innerWidth = listParent.width(); // Set widths 76 | itemsWidth = (innerWidth)/itemsVisible; 77 | childSet.width(itemsWidth); 78 | childSet.last().insertBefore(childSet.first()); 79 | childSet.last().insertBefore(childSet.first()); 80 | object.css({'left' : -itemsWidth}); 81 | 82 | object.fadeIn(); 83 | $(window).trigger("resize"); // needed to position arrows correctly 84 | 85 | }, 86 | 87 | 88 | /****************************** 89 | Append HTML 90 | *******************************/ 91 | 92 | appendHTML: function() { 93 | 94 | object.addClass("nbs-flexisel-ul"); 95 | object.wrap("
"); 96 | object.find("li").addClass("nbs-flexisel-item"); 97 | 98 | if(settings.setMaxWidthAndHeight) { 99 | var baseWidth = $(".nbs-flexisel-item > img").width(); 100 | var baseHeight = $(".nbs-flexisel-item > img").height(); 101 | $(".nbs-flexisel-item > img").css("max-width", baseWidth); 102 | $(".nbs-flexisel-item > img").css("max-height", baseHeight); 103 | } 104 | 105 | $("
").insertAfter(object); 106 | var cloneContent = object.children().clone(); 107 | object.append(cloneContent); 108 | }, 109 | 110 | 111 | /****************************** 112 | Set Event Handlers 113 | *******************************/ 114 | setEventHandlers: function() { 115 | 116 | var listParent = object.parent(); 117 | var childSet = object.children(); 118 | var leftArrow = listParent.find($(".nbs-flexisel-nav-left")); 119 | var rightArrow = listParent.find($(".nbs-flexisel-nav-right")); 120 | 121 | $(window).on("resize", function(event){ 122 | 123 | methods.setResponsiveEvents(); 124 | 125 | var innerWidth = $(listParent).width(); 126 | var innerHeight = $(listParent).height(); 127 | 128 | itemsWidth = (innerWidth)/itemsVisible; 129 | 130 | childSet.width(itemsWidth); 131 | object.css({'left' : -itemsWidth}); 132 | 133 | var halfArrowHeight = (leftArrow.height())/2; 134 | var arrowMargin = (innerHeight/2) - halfArrowHeight; 135 | leftArrow.css("top", arrowMargin + "px"); 136 | rightArrow.css("top", arrowMargin + "px"); 137 | 138 | }); 139 | 140 | $(leftArrow).on("click", function (event) { 141 | methods.scrollLeft(); 142 | }); 143 | 144 | $(rightArrow).on("click", function (event) { 145 | methods.scrollRight(); 146 | }); 147 | 148 | if(settings.pauseOnHover == true) { 149 | $(".nbs-flexisel-item").on({ 150 | mouseenter: function () { 151 | canNavigate = false; 152 | }, 153 | mouseleave: function () { 154 | canNavigate = true; 155 | } 156 | }); 157 | } 158 | 159 | if(settings.autoPlay == true) { 160 | 161 | setInterval(function () { 162 | if(canNavigate == true) 163 | methods.scrollRight(); 164 | }, settings.autoPlaySpeed); 165 | } 166 | 167 | }, 168 | 169 | /****************************** 170 | Set Responsive Events 171 | *******************************/ 172 | 173 | setResponsiveEvents: function() { 174 | var contentWidth = $('html').width(); 175 | 176 | if(settings.enableResponsiveBreakpoints == true) { 177 | if(contentWidth < settings.responsiveBreakpoints.portrait.changePoint) { 178 | itemsVisible = settings.responsiveBreakpoints.portrait.visibleItems; 179 | } 180 | else if(contentWidth > settings.responsiveBreakpoints.portrait.changePoint && contentWidth < settings.responsiveBreakpoints.landscape.changePoint) { 181 | itemsVisible = settings.responsiveBreakpoints.landscape.visibleItems; 182 | } 183 | else if(contentWidth > settings.responsiveBreakpoints.landscape.changePoint && contentWidth < settings.responsiveBreakpoints.tablet.changePoint) { 184 | itemsVisible = settings.responsiveBreakpoints.tablet.visibleItems; 185 | } 186 | else { 187 | itemsVisible = settings.visibleItems; 188 | } 189 | } 190 | }, 191 | 192 | /****************************** 193 | Scroll Left 194 | *******************************/ 195 | 196 | scrollLeft:function() { 197 | 198 | if(canNavigate == true) { 199 | canNavigate = false; 200 | 201 | var listParent = object.parent(); 202 | var innerWidth = listParent.width(); 203 | 204 | itemsWidth = (innerWidth)/itemsVisible; 205 | 206 | var childSet = object.children(); 207 | 208 | object.animate({ 209 | 'left' : "+=" + itemsWidth 210 | }, 211 | { 212 | queue:false, 213 | duration:settings.animationSpeed, 214 | easing: "linear", 215 | complete: function() { 216 | childSet.last().insertBefore(childSet.first()); // Get the first list item and put it after the last list item (that's how the infinite effects is made) 217 | methods.adjustScroll(); 218 | canNavigate = true; 219 | } 220 | } 221 | ); 222 | } 223 | }, 224 | 225 | /****************************** 226 | Scroll Right 227 | *******************************/ 228 | 229 | scrollRight:function() { 230 | 231 | if(canNavigate == true) { 232 | canNavigate = false; 233 | 234 | var listParent = object.parent(); 235 | var innerWidth = listParent.width(); 236 | 237 | itemsWidth = (innerWidth)/itemsVisible; 238 | 239 | var childSet = object.children(); 240 | 241 | object.animate({ 242 | 'left' : "-=" + itemsWidth 243 | }, 244 | { 245 | queue:false, 246 | duration:settings.animationSpeed, 247 | easing: "linear", 248 | complete: function() { 249 | childSet.first().insertAfter(childSet.last()); // Get the first list item and put it after the last list item (that's how the infinite effects is made) 250 | methods.adjustScroll(); 251 | canNavigate = true; 252 | } 253 | } 254 | ); 255 | } 256 | }, 257 | 258 | /****************************** 259 | Adjust Scroll 260 | *******************************/ 261 | 262 | adjustScroll: function() { 263 | 264 | var listParent = object.parent(); 265 | var childSet = object.children(); 266 | 267 | var innerWidth = listParent.width(); 268 | itemsWidth = (innerWidth)/itemsVisible; 269 | childSet.width(itemsWidth); 270 | object.css({'left' : -itemsWidth}); 271 | } 272 | 273 | }; 274 | 275 | if (methods[options]) { // $("#element").pluginName('methodName', 'arg1', 'arg2'); 276 | return methods[options].apply(this, Array.prototype.slice.call(arguments, 1)); 277 | } else if (typeof options === 'object' || !options) { // $("#element").pluginName({ option: 1, option:2 }); 278 | return methods.init.apply(this); 279 | } else { 280 | $.error( 'Method "' + method + '" does not exist in flexisel plugin!'); 281 | } 282 | }; 283 | 284 | })(jQuery); 285 | -------------------------------------------------------------------------------- /webapp/templates/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% load staticfiles %} 5 | 6 | 7 | 8 | {% block title %}FoodApp{% endblock title %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 40 | 41 | 42 | 43 | 70 | 71 |
72 |
73 |
74 |
75 |
76 |

Feeling Hungry

77 |

Register Now
and
Order Online

78 |
79 |
80 | 81 |
82 |
83 |
84 |

Be a Partner

85 |

Join Us Today
and
Increase Your Sale

86 |
87 |
88 | 89 |
90 |
91 |
92 | 93 |
94 | 95 | 96 |
97 |
98 |
99 |
100 |

Ordering food was never so easy

101 |
102 |

Just 4 steps to follow

103 |
104 |
105 |
106 |
107 |
108 |
109 |

Choose Your Restaurant

110 |
111 |
112 |
113 |
114 | 115 |

Order Your Cuisine

116 |
117 |
118 |
119 |
120 |

Pay online

121 | 122 |
123 |
124 |
125 |
126 |

Enjoy your food

127 | 128 | 129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 | 138 |
139 |
140 |

Top Restaurants

141 |
142 |
143 | 144 |
145 |
146 | 147 | 148 | 149 | 150 |
151 |
152 |
153 |
154 |
155 | 156 | 157 | 158 | 159 |
160 |
161 |
162 |
163 |
164 | 165 | 166 | 167 | 168 |
169 |
170 |
171 |
172 |
173 | 174 | 175 | 176 | 177 |
178 |
179 |
180 |
181 |
182 | 183 | 184 | 185 | 186 |
187 |
188 | 189 |
190 | 191 |
192 | 193 |
194 |
195 |
196 |
197 |

Top Cuisines

198 |
199 |
200 |
201 |
202 | 203 | 204 | 205 |
206 |
207 |
Pizza
208 |
209 |
210 |
211 |
212 | 213 | 214 | 215 |
216 |
217 |
Burger
218 |
219 |
220 | 221 |
222 |
223 | 224 | 225 | 226 |
227 |
228 |
Dough Nut
229 |
230 |
231 |
232 |
233 | 234 | 235 | 236 |
237 |
238 |
Curry
239 |
240 |
241 |
242 |
243 | 244 | 245 | 246 |
247 |
248 |
trips
249 |
250 |
251 |
252 |
253 | 254 | 255 | 256 |
257 |
258 |
Frawn Rice
259 |
260 |
261 |
262 |
263 | 264 | 265 | 266 |
267 |
268 |
Fingers
269 |
270 |
271 |
272 |
273 | 274 |
275 |
Cuisine
276 |
277 |
278 | 279 |
280 |
281 |
282 |
283 | 284 |
285 |
286 |
287 |