Food Ordering System
Food Ordering System
PARADISE COMPUTER
EDUCATION
1549242
<!DOCTYPE html>
<html>
<head>
{% load staticfiles %}
<meta charset="UTF-8">
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css"
rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700'
rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?
family=Lobster+Two:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
<!--Animation-->
<script src="/static/webapp/js/wow.min.js"></script>
</head>
<body>
<div class="container">
<div class="navbar-collapse collapse w-100 dual-collapse2 order-1
order-md-0">
</li>
<li class="nav-item">
</li>
</ul>
</div>
</a>
<span class="navbar-toggler-icon"></span>
</button>
</div>
{% if request.user.is_authenticated %}
<li class="nav-item">
</li>
<li class="nav-item">
</li>
{% else %}
<li class="nav-item">
</li>
<li class="nav-item">
</li>
{% endif %}
</ul>
</div>
</div>
</nav>
<br>
<br>
<br>
<br>
<div class="footer">
<div class="container-fluid">
</div>
</div>
</div>
</script>
<script>
new WOW().init();
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
{% load staticfiles %}
<meta charset="UTF-8">
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css"
rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700'
rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?
family=Lobster+Two:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
<!--Animation-->
<script src="/static/webapp/js/wow.min.js"></script>
</head>
<body>
<div class="container-fluid">
<div class="navbar-collapse collapse w-100 dual-collapse2 order-1
order-md-0">
</li>
<li class="nav-item">
</li>
<li class="nav-item">
</li>
</ul>
</div>
</a>
<span class="navbar-toggler-icon"></span>
</button>
</div>
{% if request.user.is_authenticated %}
<li class="nav-item">
</li>
<li class="nav-item">
</li>
{% else %}
<li class="nav-item">
</li>
<li class="nav-item">
</li>
{% endif %}
</ul>
</div>
</div>
</nav>
{% block body %}
{% endblock %}
<br>
<br>
<br>
<br>
<div class="footer">
<div class="container-fluid">
</div>
</div>
</div>
</script>
<script>
new WOW().init();
</script>
</body>
</html>
<div class="form-group">
</div>
</div>
{% endfor %}
<!DOCTYPE html>
<html>
<head>
{% load staticfiles %}
<meta charset="UTF-8">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700'
rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?
family=Lobster+Two:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
<!--Animation-->
<script src="/static/webapp/js/wow.min.js"></script>
<style type="text/css">
.big-banner{
background-image: url('/static/webapp/images/slide_1.jpg');
.i-am-center{
.borders{
background-color: blue;
border-radius: 10px;
padding: 20px;
.wrapper {
min-height: 100%;
height: 100%;
margin: 0 auto -155px;
.footer, .push {
height: 155px;
</style>
</head>
<body>
<div class="container-fluid">
</li>
</ul>
</div>
</a>
</button>
</div>
<li class="nav-item">
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col">
</div>
<br>
<button type="button" class="btn btn-success btn-lg"><strong><a href="{% url
'register'%}" class="text-light">Register</a></strong></button>
</div>
<div class="col">
</div>
<br>
</div>
</div>
</div>
</div>
</div>
<div class="content">
<div class="container">
<div class="dotted-line">
</div>
<div class="i-am-center">
</div>
</div>
</div>
</div>
<label></label>
</div>
</div>
<label></label>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
<div class="top-restaurent-head">
<h3>Top Restaurants</h3>
</div>
<div class="row">
<div class="thumbnail">
<a href="">
</a>
</div>
</div>
<br>
<div class="col-md-4 ">
<div class="thumbnail">
<a href="">
</a>
</div>
</div>
<br>
<div class="thumbnail">
<a href="">
</a>
</div>
</div>
<br>
<div class="thumbnail">
<a href="">
</a>
</div>
</div>
<br>
<div class="thumbnail">
<a href="">
</a>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="top-cuisine-head">
<h3>Top Cuisines</h3>
</div>
<div class="row">
<div class="thumbnail">
<a href="">
<img src="/static/webapp/images/cuisine1.jpg" class="img-responsive"
alt="" />
</a>
</div>
<h5 class="text-secondary"><strong>Pizza</strong></h5>
</div>
</div>
<div class="thumbnail">
<a href="">
</a>
</div>
<h5 class="text-secondary"><strong>Burger</strong></h5>
</div>
</div>
<div class="thumbnail">
<a href="">
</a>
</div>
</div>
</div>
<div class="thumbnail">
<a href="">
</a>
</div>
<h5 class="text-secondary"><strong>Curry</strong></h5>
</div>
</div>
<div class="thumbnail">
<a href="">
</a>
</div>
<h5 class="text-secondary"><strong>trips</strong></h5>
</div>
</div>
<div class="thumbnail">
<a href="">
</a>
</div>
</div>
</div>
<div class="thumbnail">
<a href="">
</a>
</div>
<h5 class="text-secondary"><strong>Fingers</strong></h5>
</div>
</div>
<div class="thumbnail">
<img src="/static/webapp/images/cuisine8.jpg" class="img-responsive"
alt="" />
<h5 class="text-secondary"><strong>Cuisine</strong></h5>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
<br>
<br>
<br>
<div class="footer">
<div class="container">
</div>
</div>
<script>
new WOW().init();
</script>
</body>
</html>
{% extends 'webapp/base.html'%}
{% block body %}
<div class="row">
<div class="panel-body">
<br>
<br>
<br>
<br>
{% if error_message %}
{% endif %}
<br>
{% csrf_token %}
<div class="form-group">
Username:
</label>
<div class="col-sm-6">
</div>
</div>
<div class="form-group">
Password:
</label>
<div class="col-sm-7">
</div>
</div>
<div class="form-group">
</div>
</div>
</form>
</div>
<div class="panel-footer">
Don't have an account? <a href="{% url 'register' %}">Click here</a> to register.
</div>
</div>
</div>
</div>
</div>
<br>
<br>
{% endblock %}
{% extends 'webapp/base.html'%}
{% block body %}
<div class="container">
<p>
<font size="3"><b>Info : </b><a class="text-success"><strong>{{rinfo|
safe}}</strong></a>
<br/>
<br>
</font>
</p>
</div>
<br>
<div class="container">
</div>
<br>
<thead>
<th>Item Name</th>
<th>Category</th>
<th>Price</th>
<th>Add</th>
</thead>
{% for x in items %}
<tr>
<td>{{x.0}}</td>
<td>{{x.1}}</td>
<td>₹ {{x.2}}</td>
{% if x.4 == "Open" %}
{% if x.5 > 0 %}
<td>
<div class="input-group-btn">
onclick="if(document.querySelector('#itemno{{x.3}}').innerHTML>0){
document.querySelector('#itemno{{x.3}}').innerHTML--;
minuscounter('{{x.3}}');
}">
</div>
<div class="input-group-btn">
onclick="
if(document.querySelector('#itemno{{x.3}}').innerHTML<{{x.5}}){
document.querySelector('#itemno{{x.3}}').innerHTML++;
pluscounter('{{x.3}}');
</div>
</td>
{% else %}
<td>
NA
</td>
{% endif %}
{% else %}
<td>
Closed
</td>
{% endif %}
</tr>
{% endfor %}
</tr>
</table>
</div>
<br>
<script type="text/javascript">
function pluscounter(pk){
cart.push(pk);
console.log(cart);
};
function minuscounter(pk){
if (cart!=[]){
cart.splice(removeindex, 1);
console.log(cart);
};
function storearray(){
if(cart.length === 0)
return false;
document.cookie = "cart="+cart+";Path=/";
document.cookie ="rest={{restid}};Path=/";
window.location = "/checkout/";
};
</script>
{% endblock %}
{% extends 'webapp/base.html'%}
<br>
<br>
<thead>
<th>Item Name</th>
<th>Quantity</th>
<th>Price</th>
</thead>
{% for x in items %}
<tr><td>{{x.0}}</td><td>{{x.1}}</td><td>₹ {{x.2}}</td></tr>
{% endfor %}
</table>
<br>
</span>
<br>
<br>
{% csrf_token %}
<span><strong>Delivery Address:</strong></span>
<br>
<br>
<br>
</form>
</div>
{% endblock %}
{% extends 'webapp/base2.html' %}
{% block body %}
<div class="container">
</div>
</div>
<h5>Order Information</h5>
<span>Items List:</span>
<div>
<thead>
<th>
Name
</th>
<th>
Quantity
</th>
<th>
Price
</th>
</thead>
{% for x in order.2 %}
<tr><td>{{x.0}}</td><td>{{x.1}}</td><td>₹{{x.2}}</td></tr>
{% endfor %}
</table>
</div>
</div>
<select name="orderstatus">
{% if order.5 == 1 %}
<option value="2">Acknowledged</option>
<option value="3">Completed</option>
<option value="4">Dispatched</option>
<option value="5">Cancelled</option>
{% endif %}
{% if order.5 == 2 %}
<option value="1">Placed</option>
<option value="3">Completed</option>
<option value="4">Dispatched</option>
<option value="5">Cancelled</option>
{% endif %}
{% if order.5 == 3 %}
<option value="1">Placed</option>
<option value="2">Acknowledged</option>
<option value="4">Dispatched</option>
<option value="5">Cancelled</option>
{% endif %}
{% if order.5 == 4 %}
<option value="1">Placed</option>
<option value="2">Acknowledged</option>
<option value="3">Completed</option>
<option value="4" selected>Dispatched</option>
<option value="5">Cancelled</option>
{% endif %}
{% if order.5 == 5 %}
<option value="1">Placed</option>
<option value="2">Acknowledged</option>
<option value="3">Completed</option>
<option value="4">Dispatched</option>
{% endif %}
</select>
</form>
</div>
<div class="clearfix"></div>
</div>
{% endfor %}
{% endblock %}
{% extends 'webapp/base.html'%}
{% block body %}
<div class="container">
<br>
<br>
<br>
<br>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
{% endblock%}
{% extends 'webapp/base.html'%}
{% block body %}
<br>
<div class="row">
<div class="panel-heading">
</div>
<br>
<div class="panel-body">
<div class="row">
<tbody>
<tr>
<td>User Name:</td>
<td>{{user.username}}</td>
</tr>
<tr>
<td>First Name:</td>
<td>{{user.customer.f_name}}</td>
</tr>
<tr>
<td>Last Name:</td>
<td>{{user.customer.l_name}}</td>
</tr>
<tr>
<td>City:</td>
<td>{{user.customer.city}}</td>
</tr>
<td>Address:</td>
<td>{{user.customer.address}}</td>
</tr>
<tr>
<td>Email:</td>
<td><a href="#">{{user.email}}</a></td>
</tr>
<tr>
<td>Phone Number:</td>
<td>{{user.customer.phone}}
</td>
</tr>
</tbody>
</table>
<div class="container">
<div class="row">
<div class="col">
</div>
<!--<div class="col">
</div>-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
{% endblock%}
{% extends 'webapp/base2.html'%}
{% block body %}
<br>
</div>
<br>
<div class="row">
<div class="panel-heading">
</div>
<div class="panel-body">
<div class="row">
<tbody>
<tr>
<td>{{user.username}}</td>
</tr>
<tr>
<td>Name:</td>
<td>{{user.restaurant.rname}}</td>
</tr>
<tr>
<td>info:</td>
<td>{{user.restaurant.info}}</td>
</tr>
<tr>
<td>Location:</td>
<td>{{user.restaurant.location}}</td>
</tr>
<tr>
<td>Status:</td>
<td>{{user.restaurant.status}}</td>
</tr>
<tr>
<td>Approved:</td>
<td>{{user.restaurant.approved}}</td>
</tr>
<tr>
<td>Email:</td>
<td><a href="#">{{user.email}}</a></td>
</tr>
</tbody>
</table>
<div class="container">
<div class="row">
<div class="col">
</div>
<!--<div class="col">
</div>-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock%}
Business logic
class CustomerSignUpForm(forms.ModelForm):
password = forms.CharField(widget=forms.PasswordInput)
class Meta:
model = User
fields=['username','email','password']
user = super().save(commit=False)
user.is_customer=True
if commit:
user.save()
return user
class RestuarantSignUpForm(forms.ModelForm):
password = forms.CharField(widget=forms.PasswordInput)
class Meta:
model =User
fields=['username','email','password']
def save(self,commit=True):
user=super().save(commit=False)
user.is_restaurant=True
if commit:
user.save()
return user
class CustomerForm(forms.ModelForm):
class Meta:
model = Customer
fields =['f_name','l_name','city','phone','address']
class RestuarantForm(forms.ModelForm):
class Meta:
model = Restaurant
fields =['rname','info','location','r_logo','min_ord','status','approved']
class User(AbstractUser):
is_customer = models.BooleanField(default=False)
is_restaurant = models.BooleanField(default=False)
class Customer(models.Model):
user =
models.OneToOneField(settings.AUTH_USER_MODEL,on_delete=models.CASCADE)
f_name = models.CharField(max_length=20,blank=False)
l_name = models.CharField(max_length=20,blank=False)
city = models.CharField(max_length=40,blank=False)
phone = models.CharField(max_length=10,blank=False)
address = models.TextField()
def __str__(self):
return self.user.username
class Restaurant(models.Model):
user =
models.OneToOneField(settings.AUTH_USER_MODEL,on_delete=models.CASCADE)
rname = models.CharField(max_length=100,blank=False)
info = models.CharField(max_length=40,blank=False)
min_ord = models.CharField(max_length=5,blank=False)
location = models.CharField(max_length=40,blank=False)
r_logo = models.FileField(blank=False)
REST_STATE_OPEN = "Open"
REST_STATE_CLOSE = "Closed"
REST_STATE_CHOICES =(
(REST_STATE_OPEN,REST_STATE_OPEN),
(REST_STATE_CLOSE,REST_STATE_CLOSE)
status =
models.CharField(max_length=50,choices=REST_STATE_CHOICES,default=REST_STATE_O
PEN,blank=False)
approved = models.BooleanField(blank=False,default=True)
def __str__(self):
return self.rname
class Item(models.Model):
id = models.AutoField(primary_key=True)
fname = models.CharField(max_length=30,blank=False)
category = models.CharField(max_length=50,blank=False)
def __str__(self):
return self.fname
class Menu(models.Model):
id = models.AutoField(primary_key=True)
item_id = models.ForeignKey(Item,on_delete=models.CASCADE)
r_id = models.ForeignKey(Restaurant,on_delete=models.CASCADE)
price = models.IntegerField(blank=False)
quantity = models.IntegerField(blank=False,default=0)
def __str__(self):
class Order(models.Model):
id = models.AutoField(primary_key=True)
total_amount = models.IntegerField(default=0)
timestamp = models.DateTimeField(auto_now_add=True)
delivery_addr = models.CharField(max_length=50,blank=True)
ORDER_STATE_WAITING = "Waiting"
ORDER_STATE_PLACED = "Placed"
ORDER_STATE_ACKNOWLEDGED = "Acknowledged"
ORDER_STATE_COMPLETED = "Completed"
ORDER_STATE_CANCELLED = "Cancelled"
ORDER_STATE_DISPATCHED = "Dispatched"
ORDER_STATE_CHOICES = (
(ORDER_STATE_WAITING,ORDER_STATE_WAITING),
(ORDER_STATE_PLACED, ORDER_STATE_PLACED),
(ORDER_STATE_ACKNOWLEDGED, ORDER_STATE_ACKNOWLEDGED),
(ORDER_STATE_COMPLETED, ORDER_STATE_COMPLETED),
(ORDER_STATE_CANCELLED, ORDER_STATE_CANCELLED),
(ORDER_STATE_DISPATCHED, ORDER_STATE_DISPATCHED)
status =
models.CharField(max_length=50,choices=ORDER_STATE_CHOICES,default=ORDER_STAT
E_WAITING)
def __str__(self):
id = models.AutoField(primary_key=True)
ord_id = models.ForeignKey(Order,on_delete=models.CASCADE)
quantity = models.IntegerField(default=0)
def __str__(self):
return str(self.id)
def index(request):
return render(request,'webapp/index.html',{})
def orderplaced(request):
return render(request,'webapp/orderplaced.html',{})
def restuarent(request):
r_object = Restaurant.objects.all()
query = request.GET.get('q')
if query:
r_object=Restaurant.objects.filter(Q(rname__icontains=query)).distinct()
return render(request,'webapp/restaurents.html',{'r_object':r_object})
return render(request,'webapp/restaurents.html',{'r_object':r_object})
# logout
def Logout(request):
if request.user.is_restaurant:
logout(request)
return redirect("rlogin")
else:
logout(request)
return redirect("login")
def customerRegister(request):
if form.is_valid():
user = form.save(commit=False)
username = form.cleaned_data['username']
password = form.cleaned_data['password']
user.is_customer=True
user.set_password(password)
user.save()
user = authenticate(username=username,password=password)
if user.is_active:
login(request,user)
return redirect("ccreate")
context ={
'form':form
return render(request,'webapp/signup.html',context)
# Customer Login
def customerLogin(request):
if request.method=="POST":
username = request.POST['username']
password = request.POST['password']
user = authenticate(username=username,password=password)
if user.is_active:
login(request,user)
return redirect("profile")
else:
return render(request,'webapp/login.html',{'error_message':'Your
account disable'})
else:
return render(request,'webapp/login.html')
def customerProfile(request,pk=None):
if pk:
user = User.objects.get(pk=pk)
else:
user=request.user
return render(request,'webapp/profile.html',{'user':user})
def createCustomer(request):
instance = form.save(commit=False)
instance.user = request.user
instance.save()
return redirect("profile")
context={
'form':form,
return render(request,'webapp/profile_form.html',context)
def updateCustomer(request,id):
if form.is_valid():
form.save()
return redirect('profile')
context={
'form':form,
return render(request,'webapp/profile_form.html',context)
def restuarantMenu(request,pk=None):
menu = Menu.objects.filter(r_id=pk)
rest = Restaurant.objects.filter(id=pk)
items =[]
for i in menu:
item = Item.objects.filter(fname=i.item_id)
temp=[]
temp.append(content.fname)
temp.append(content.category)
temp.append(i.price)
temp.append(i.id)
temp.append(rest[0].status)
temp.append(i.quantity)
items.append(temp)
context = {
'items' : items,
'rid' : pk,
'rname': rest[0].rname,
'rmin' : rest[0].min_ord,
'rinfo' : rest[0].info,
'rlocation':rest[0].location,
return render(request,'webapp/menu.html',context)
@login_required(login_url='/login/user/')
def checkout(request):
if request.POST:
addr = request.POST['address']
ordid = request.POST['oid']
Order.objects.filter(id=int(ordid)).update(delivery_addr = addr,
status=Order.ORDER_STATE_PLACED)
return redirect('/orderplaced/')
else:
cart = request.COOKIES['cart'].split(",")
cart = dict(Counter(cart))
items = []
totalprice = 0
uid = User.objects.filter(username=request.user)
oid = Order()
oid.orderedBy = uid[0]
item = []
it = Menu.objects.filter(id=int(x))
if len(it):
oiid=orderItem()
oiid.item_id=it[0]
oiid.quantity=int(y)
oid.r_id=it[0].r_id
oid.save()
oiid.ord_id =oid
oiid.save()
totalprice += int(y)*it[0].price
item.append(it[0].item_id.fname)
it[0].quantity = it[0].quantity - y
it[0].save()
item.append(y)
item.append(it[0].price*int(y))
items.append(item)
oid.total_amount=totalprice
oid.save()
context={
"items":items,
"totalprice":totalprice,
"oid":oid.id
return render(request,'webapp/order.html',context)
def restRegister(request):
user = form.save(commit=False)
username = form.cleaned_data['username']
password = form.cleaned_data['password']
user.is_restaurant=True
user.set_password(password)
user.save()
user = authenticate(username=username,password=password)
if user.is_active:
login(request,user)
return redirect("rcreate")
context ={
'form':form
return render(request,'webapp/restsignup.html',context)
# restuarant login
def restLogin(request):
if request.method=="POST":
username = request.POST['username']
password = request.POST['password']
user = authenticate(username=username,password=password)
if user.is_active:
login(request,user)
return redirect("rprofile")
else:
return render(request,'webapp/restlogin.html',
{'error_message':'Your account disable'})
else:
return render(request,'webapp/restlogin.html')
def restaurantProfile(request,pk=None):
if pk:
user = User.objects.get(pk=pk)
else:
user=request.user
return render(request,'webapp/rest_profile.html',{'user':user})
@login_required(login_url='/login/restaurant/')
def createRestaurant(request):
if form.is_valid():
instance = form.save(commit=False)
instance.user = request.user
instance.save()
return redirect("rprofile")
context={
'form':form,
return render(request,'webapp/rest_profile_form.html',context)
@login_required(login_url='/login/restaurant/')
def updateRestaurant(request,id):
if form.is_valid():
form.save()
return redirect('rprofile')
context={
'form':form,
return render(request,'webapp/rest_profile_form.html',context)
@login_required(login_url='/login/restaurant/')
def menuManipulation(request):
if not request.user.is_authenticated:
return redirect("rlogin")
rest=Restaurant.objects.filter(id=request.user.restaurant.id);
rest=rest[0]
if request.POST:
type=request.POST['submit']
if type =="Modify":
menuid = int(request.POST['menuid'])
memu= Menu.objects.filter(id=menuid).\
update(price=int(request.POST['price']),quantity=int(request.POST['quantity']))
itemid=int(request.POST['item'])
item=Item.objects.filter(id=itemid)
item=item[0]
menu=Menu()
menu.item_id=item
menu.r_id=rest
menu.price=int(request.POST['price'])
menu.quantity=int(request.POST['quantity'])
menu.save()
else:
menuid = int(request.POST['menuid'])
menu = Menu.objects.filter(id=menuid)
menu[0].delete()
menuitems=Menu.objects.filter(r_id=rest)
menu=[]
for x in menuitems:
cmenu=[]
cmenu.append(x.item_id)
cmenu.append(x.price)
cmenu.append(x.quantity)
cmenu.append(x.id)
menu.append(cmenu)
menuitems = Item.objects.all()
items = []
for y in menuitems:
citem = []
citem.append(y.id)
citem.append(y.fname)
items.append(citem)
context={
"menu":menu,
"items":items,
"username":request.user.username,
return render(request,'webapp/menu_modify.html',context)
def orderlist(request):
if request.POST:
oid = request.POST['orderid']
select = request.POST['orderstatus']
select = int(select)
order = Order.objects.filter(id=oid)
if len(order):
x = Order.ORDER_STATE_WAITING
if select == 1:
x = Order.ORDER_STATE_PLACED
elif select == 2:
x = Order.ORDER_STATE_ACKNOWLEDGED
elif select == 3:
x = Order.ORDER_STATE_COMPLETED
elif select == 4:
x = Order.ORDER_STATE_DISPATCHED
elif select == 5:
x = Order.ORDER_STATE_CANCELLED
else:
x = Order.ORDER_STATE_WAITING
order[0].status = x
order[0].save()
orders = Order.objects.filter(r_id=request.user.restaurant.id).order_by('-timestamp')
corders = []
user = user[0]
corder = []
if user.is_restaurant:
corder.append(user.restaurant.rname)
corder.append(user.restaurant.info)
else:
corder.append(user.customer.f_name)
corder.append(user.customer.phone)
items_list = orderItem.objects.filter(ord_id=order)
items = []
citem = []
citem.append(item.item_id)
citem.append(item.quantity)
menu = Menu.objects.filter(id=item.item_id.id)
citem.append(menu[0].price*item.quantity)
menu = 0
items.append(citem)
corder.append(items)
corder.append(order.total_amount)
corder.append(order.id)
x = order.status
if x == Order.ORDER_STATE_WAITING:
continue
elif x == Order.ORDER_STATE_PLACED:
x=1
elif x == Order.ORDER_STATE_ACKNOWLEDGED:
x=2
elif x == Order.ORDER_STATE_COMPLETED:
x=3
elif x == Order.ORDER_STATE_DISPATCHED:
x=4
elif x == Order.ORDER_STATE_CANCELLED:
x=5
else:
continue
corder.append(x)
corder.append(order.delivery_addr)
corders.append(corder)
return render(request,"webapp/order-list.html",context)
Our project is only a humble venture to satisfy the needs to manage their project
work. Several user friendly coding have also adopted. This package shall prove to be a
powerful package in satisfying all the requirements of the school. The objective of
software planning is to provide a frame work that enables the manger to make
reasonable estimates made within a limited time frame at the beginning of the software
project and should be updated regularly as the project progresses.
A description of the background and context of the project and its relation to work
already done in the area.
Made statement of the aims and objectives of the project.
The description of Purpose, Scope, and applicability.
We define the problem on which we are working in the project.
We describe the requirement Specifications of the system and the actions that
can be done on these things.
We understand the problem domain and produce a model of the system, which
describes operations that can be performed on the system.
We included features and operations in detail, including screen layouts.
We designed user interface and security issues related to system.
Finally the system is implemented and tested according to test cases.