lokesh341 commited on
Commit
437b681
·
verified ·
1 Parent(s): 809e3c8

Update menu.py

Browse files
Files changed (1) hide show
  1. menu.py +0 -49
menu.py CHANGED
@@ -282,53 +282,4 @@ def add_to_cart():
282
 
283
 
284
 
285
- @app.route('/menu')
286
- def menu():
287
- # Existing categories and selected_category logic
288
- categories = ["Vegetarian", "Non-Vegetarian", "Biryani", "Snacks"]
289
- selected_category = request.args.get('category', 'Vegetarian') # Default to Vegetarian
290
-
291
- # Define the 18 items with sections
292
- menu_items = [
293
- # Vegetarian
294
- {"Name": "Veg Manchurian", "Price__c": 8, "Image1__c": "/static/images/veg_manchurian.jpg", "Image2__c": "/static/images/veg_manchurian_large.jpg", "Description__c": "Indo-Chinese dish with cauliflower and soy sauce", "Section__c": "Starters", "Category__c": "Vegetarian", "Ingredients__c": "Cauliflower, Onion, Ginger, Garlic, Soy Sauce, Cornflour, Green Chilies, Capsicum, Spring Onion", "Nutritional_Info__c": {"Calories": 250, "Protein": 5, "Carbs": 35, "Fats": 12}, "Allergens__c": "Soy, Gluten"},
295
- {"Name": "Chilli Gobi", "Price__c": 8, "Image1__c": "/static/images/chilli_gobi.jpg", "Image2__c": "/static/images/chilli_gobi_large.jpg", "Description__c": "Spicy Indo-Chinese cauliflower dish", "Section__c": "Starters", "Category__c": "Vegetarian", "Ingredients__c": "Cauliflower, Onion, Green Chilies, Soy Sauce, Cornflour, Garlic, Ginger, Cumin Powder", "Nutritional_Info__c": {"Calories": 250, "Protein": 6, "Carbs": 35, "Fats": 12}, "Allergens__c": "Soy, Gluten"},
296
- {"Name": "Paneer Butter Masala", "Price__c": 10, "Image1__c": "/static/images/paneer_butter_masala.jpg", "Image2__c": "/static/images/paneer_butter_masala_large.jpg", "Description__c": "Creamy paneer curry with butter and spices", "Section__c": "Main Course", "Category__c": "Vegetarian", "Ingredients__c": "Paneer, Butter, Cream, Tomato Puree, Onion, Ginger, Garlic, Garam Masala", "Nutritional_Info__c": {"Calories": 400, "Protein": 15, "Carbs": 20, "Fats": 25}, "Allergens__c": "Dairy"},
297
- {"Name": "Channa Masala", "Price__c": 7, "Image1__c": "/static/images/channa_masala.jpg", "Image2__c": "/static/images/channa_masala_large.jpg", "Description__c": "Spiced chickpea curry", "Section__c": "Main Course", "Category__c": "Vegetarian", "Ingredients__c": "Chickpeas, Onion, Tomatoes, Ginger-Garlic Paste, Garam Masala, Coriander Powder, Cumin Seeds, Lemon Juice", "Nutritional_Info__c": {"Calories": 250, "Protein": 10, "Carbs": 45, "Fats": 5}, "Allergens__c": "None"},
298
-
299
- # Non-Vegetarian
300
- {"Name": "Sukka Gosht (Goat)", "Price__c": 12, "Image1__c": "/static/images/sukka_gosht.jpg", "Image2__c": "/static/images/sukka_gosht_large.jpg", "Description__c": "Dry spiced goat curry with aromatic spices", "Section__c": "Main Course", "Category__c": "Non-Vegetarian", "Ingredients__c": "Goat Meat, Ginger-Garlic Paste, Green Chilies, Onion, Tomatoes, Garam Masala, Coriander Powder, Cumin Powder, Fresh Coriander", "Nutritional_Info__c": {"Calories": 450, "Protein": 35, "Carbs": 10, "Fats": 30}, "Allergens__c": "None"},
301
- {"Name": "Prawn Fry", "Price__c": 14, "Image1__c": "/static/images/prawn_fry.jpg", "Image2__c": "/static/images/prawn_fry_large.jpg", "Description__c": "Spicy fried prawns with garlic and lemon", "Section__c": "Starters", "Category__c": "Non-Vegetarian", "Ingredients__c": "Prawns, Garlic, Ginger, Chili Powder, Coriander Powder, Cumin Powder, Lemon Juice, Oil", "Nutritional_Info__c": {"Calories": 350, "Protein": 25, "Carbs": 10, "Fats": 20}, "Allergens__c": "Shellfish"},
302
- {"Name": "Fish Curry", "Price__c": 12, "Image1__c": "/static/images/fish_curry.jpg", "Image2__c": "/static/images/fish_curry_large.jpg", "Description__c": "Tangy fish curry with coconut milk", "Section__c": "Main Course", "Category__c": "Non-Vegetarian", "Ingredients__c": "Fish (Salmon or King Fish), Onion, Tomato, Ginger-Garlic Paste, Curry Leaves, Coconut Milk, Tamarind, Mustard Seeds", "Nutritional_Info__c": {"Calories": 300, "Protein": 25, "Carbs": 10, "Fats": 20}, "Allergens__c": "Fish"},
303
- {"Name": "Fiery Mango Glaze Chicken", "Price__c": 11, "Image1__c": "/static/images/fiery_mango_glaze_chicken.jpg", "Image2__c": "/static/images/fiery_mango_glaze_chicken_large.jpg", "Description__c": "Sweet and spicy chicken with mango glaze", "Section__c": "Main Course", "Category__c": "Non-Vegetarian", "Ingredients__c": "Chicken, Mango Puree, Chili Sauce, Soy Sauce, Honey, Garlic, Ginger, Lemon Juice", "Nutritional_Info__c": {"Calories": 350, "Protein": 30, "Carbs": 15, "Fats": 18}, "Allergens__c": "Soy"},
304
- {"Name": "Chilli Chicken", "Price__c": 10, "Image1__c": "/static/images/chilli_chicken.jpg", "Image2__c": "/static/images/chilli_chicken_large.jpg", "Description__c": "Indo-Chinese spicy chicken with bell peppers", "Section__c": "Starters", "Category__c": "Non-Vegetarian", "Ingredients__c": "Chicken, Bell Pepper, Onion, Green Chilies, Soy Sauce, Cornflour, Garlic, Ginger", "Nutritional_Info__c": {"Calories": 400, "Protein": 35, "Carbs": 20, "Fats": 18}, "Allergens__c": "Soy, Gluten"},
305
- {"Name": "Chicken Manchurian", "Price__c": 10, "Image1__c": "/static/images/chicken_manchurian.jpg", "Image2__c": "/static/images/chicken_manchurian_large.jpg", "Description__c": "Indo-Chinese chicken with soy sauce", "Section__c": "Starters", "Category__c": "Non-Vegetarian", "Ingredients__c": "Chicken, Onion, Garlic, Ginger, Soy Sauce, Cornflour, Green Chilies, Capsicum", "Nutritional_Info__c": {"Calories": 350, "Protein": 25, "Carbs": 20, "Fats": 18}, "Allergens__c": "Soy, Gluten"},
306
- {"Name": "Chicken Curry", "Price__c": 11, "Image1__c": "/static/images/chicken_curry.jpg", "Image2__c": "/static/images/chicken_curry_large.jpg", "Description__c": "Spicy chicken curry with coconut milk", "Section__c": "Main Course", "Category__c": "Non-Vegetarian", "Ingredients__c": "Chicken, Onion, Tomatoes, Ginger-Garlic Paste, Garam Masala, Coconut Milk, Coriander Leaves", "Nutritional_Info__c": {"Calories": 400, "Protein": 30, "Carbs": 15, "Fats": 20}, "Allergens__c": "None"},
307
-
308
- # Biryani
309
- {"Name": "Veg Biryani", "Price__c": 9, "Image1__c": "/static/images/veg_biryani.jpg", "Image2__c": "/static/images/veg_biryani_large.jpg", "Description__c": "Aromatic rice with mixed vegetables", "Section__c": "Biryani", "Category__c": "Biryani", "Ingredients__c": "Basmati Rice, Mixed Vegetables (Carrot, Peas, Potato, Cauliflower), Ginger, Garlic, Biryani Masala, Mint Leaves, Curd, Onion, Ghee", "Nutritional_Info__c": {"Calories": 300, "Protein": 6, "Carbs": 50, "Fats": 12}, "Allergens__c": "Dairy"},
310
- {"Name": "Paneer Biryani", "Price__c": 10, "Image1__c": "/static/images/paneer_biryani.jpg", "Image2__c": "/static/images/paneer_biryani_large.jpg", "Description__c": "Aromatic rice with paneer and vegetables", "Section__c": "Biryani", "Category__c": "Biryani", "Ingredients__c": "Paneer, Basmati Rice, Mixed Vegetables (Carrot, Peas, Potato), Onion, Tomatoes, Biryani Masala, Mint Leaves, Curd", "Nutritional_Info__c": {"Calories": 350, "Protein": 12, "Carbs": 55, "Fats": 15}, "Allergens__c": "Dairy"},
311
- {"Name": "Mutton Biryani", "Price__c": 14, "Image1__c": "/static/images/mutton_biryani.jpg", "Image2__c": "/static/images/mutton_biryani_large.jpg", "Description__c": "Aromatic rice with tender mutton", "Section__c": "Biryani", "Category__c": "Biryani", "Ingredients__c": "Mutton, Basmati Rice, Onion, Tomatoes, Ginger-Garlic Paste, Biryani Masala, Mint Leaves, Yogurt, Ghee", "Nutritional_Info__c": {"Calories": 500, "Protein": 30, "Carbs": 50, "Fats": 25}, "Allergens__c": "Dairy"},
312
- {"Name": "Chicken Biryani", "Price__c": 12, "Image1__c": "/static/images/chicken_biryani.jpg", "Image2__c": "/static/images/chicken_biryani_large.jpg", "Description__c": "Aromatic rice with chicken", "Section__c": "Biryani", "Category__c": "Biryani", "Ingredients__c": "Chicken, Basmati Rice, Onion, Tomatoes, Ginger-Garlic Paste, Biryani Masala, Mint Leaves, Curd", "Nutritional_Info__c": {"Calories": 500, "Protein": 35, "Carbs": 60, "Fats": 20}, "Allergens__c": "Dairy"},
313
-
314
- # Snacks
315
- {"Name": "Samosa", "Price__c": 3, "Image1__c": "/static/images/samosa.jpg", "Image2__c": "/static/images/samosa_large.jpg", "Description__c": "Crispy pastry with potato and pea filling", "Section__c": "Snacks", "Category__c": "Snacks", "Ingredients__c": "Potatoes, Peas, Onion, Ginger, Cumin Seeds, Garam Masala, Wheat Flour (for dough), Oil (for frying)", "Nutritional_Info__c": {"Calories": 150, "Protein": 3, "Carbs": 25, "Fats": 7}, "Allergens__c": "Gluten"},
316
- {"Name": "Onion Pakoda", "Price__c": 4, "Image1__c": "/static/images/onion_pakoda.jpg", "Image2__c": "/static/images/onion_pakoda_large.jpg", "Description__c": "Crispy onion fritters", "Section__c": "Snacks", "Category__c": "Snacks", "Ingredients__c": "Onion, Chickpea Flour (Besan), Rice Flour, Green Chilies, Cumin Seeds, Ginger, Turmeric Powder, Oil (for frying)", "Nutritional_Info__c": {"Calories": 200, "Protein": 5, "Carbs": 30, "Fats": 8}, "Allergens__c": "Gluten (if cross-contamination)"},
317
- {"Name": "Roti", "Price__c": 2, "Image1__c": "/static/images/roti.jpg", "Image2__c": "/static/images/roti_large.jpg", "Description__c": "Whole wheat flatbread", "Section__c": "Snacks", "Category__c": "Snacks", "Ingredients__c": "Whole Wheat Flour, Water, Salt", "Nutritional_Info__c": {"Calories": 150, "Protein": 4, "Carbs": 30, "Fats": 1}, "Allergens__c": "Gluten"},
318
- ]
319
-
320
- # Group items by section
321
- ordered_menu = {}
322
- for item in menu_items:
323
- if item['Category__c'] == selected_category or selected_category in ["Biryani", "Snacks"]:
324
- section = item['Section__c']
325
- if section not in ordered_menu:
326
- ordered_menu[section] = []
327
- ordered_menu[section].append(item)
328
-
329
- # Mock user data
330
- first_letter = "J" # Example first letter of user's name
331
-
332
- return render_template('menu.html', ordered_menu=ordered_menu, categories=categories, selected_category=selected_category, first_letter=first_letter)
333
-
334
 
 
282
 
283
 
284
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285