NitinBot001 commited on
Commit
3d7d477
·
verified ·
1 Parent(s): 4b2adab

Upload 130 files

Browse files
Home/__init__.py ADDED
File without changes
Home/__pycache__/__init__.cpython-313.pyc ADDED
Binary file (138 Bytes). View file
 
Home/__pycache__/admin.cpython-313.pyc ADDED
Binary file (182 Bytes). View file
 
Home/__pycache__/apps.cpython-313.pyc ADDED
Binary file (498 Bytes). View file
 
Home/__pycache__/models.cpython-313.pyc ADDED
Binary file (179 Bytes). View file
 
Home/__pycache__/urls.cpython-313.pyc ADDED
Binary file (505 Bytes). View file
 
Home/__pycache__/views.cpython-313.pyc ADDED
Binary file (590 Bytes). View file
 
Home/admin.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from django.contrib import admin
2
+
3
+ # Register your models here.
Home/apps.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ from django.apps import AppConfig
2
+
3
+
4
+ class HomeConfig(AppConfig):
5
+ default_auto_field = 'django.db.models.BigAutoField'
6
+ name = 'Home'
Home/migrations/__init__.py ADDED
File without changes
Home/migrations/__pycache__/__init__.cpython-313.pyc ADDED
Binary file (149 Bytes). View file
 
Home/models.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from django.db import models
2
+
3
+ # Create your models here.
Home/templates/index.html ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>MysteryBox | Home</title>
7
+
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ </head>
10
+ <body class="bg-gray-50 text-gray-800">
11
+
12
+
13
+ <!-- Navbar -->
14
+ <header class="bg-purple-700 text-white">
15
+ <div class="max-w-7xl mx-auto flex justify-between items-center py-4 px-6">
16
+
17
+ <!-- Logo -->
18
+ <a href="/" class="text-xl font-bold tracking-wide">
19
+ 🎁 MysteryBox
20
+ </a>
21
+
22
+ <!-- Navigation Links (Desktop) -->
23
+ <nav class="hidden md:flex space-x-6 text-sm font-medium">
24
+ <a href="/" class="hover:text-yellow-300">Home</a>
25
+ <a href="/boxes" class="hover:text-yellow-300">All Boxes</a>
26
+ <a href="/boxes/?category=gadgets" class="hover:text-yellow-300">electronics</a>
27
+ <a href="/boxes/?category=clothes" class="hover:text-yellow-300">Clothes</a>
28
+ <a href="/boxes/?category=accessories" class="hover:text-yellow-300">Accessories</a>
29
+
30
+ <a href="reward" class="hover:text-yellow-300">Rewards</a>
31
+ </nav>
32
+
33
+ <!-- Right Icons -->
34
+ <div class="flex items-center space-x-4">
35
+ <!-- Search -->
36
+
37
+
38
+ <!-- Cart -->
39
+ <a href="/cart/" class="relative">
40
+ <span class="text-xl">🛒</span>
41
+ <span class="absolute -top-2 -right-2 bg-yellow-400 text-black text-xs font-bold px-1 rounded">3</span>
42
+ </a>
43
+
44
+ <!-- Account -->
45
+ <a href="/Accounts/" class="hover:text-yellow-300">
46
+ {% if request.user.is_authenticated %}
47
+ <span>👤 Hello,{{ request.user.first_name|slice:"0:8" }}</span>
48
+ {% else %}
49
+ 👤 Account
50
+ {% endif %}
51
+ </a>
52
+ {% if request.user.is_authenticated %}
53
+ <a href="Accounts/logout" class="hover:text-yellow-300">
54
+
55
+ 👤 Logout
56
+ </a>
57
+ {% else %}
58
+ <a href="Accounts/login" class="hover:text-yellow-300">
59
+ 👤 Login
60
+ </a>
61
+ {% endif %}
62
+
63
+ </div>
64
+
65
+ </div>
66
+ </header>
67
+
68
+
69
+ <!-- Hero Section -->
70
+ <section class="bg-gradient-to-r from-purple-700 to-purple-500 text-white py-20">
71
+ <div class="max-w-4xl mx-auto text-center">
72
+ <!-- Search Bar -->
73
+ <form action="/search/" method="get" class="mb-8">
74
+ <input type="text"
75
+ name="q"
76
+ placeholder="Search..."
77
+ class="w-full max-w-2xl px-5 py-2.5 rounded-full text-black text-base focus:outline-none focus:ring-4 focus:ring-yellow-300 shadow" />
78
+ </form>
79
+
80
+ <h1 class="text-4xl md:text-6xl font-bold mb-4">
81
+ Unbox the Mystery. Discover the Surprise!
82
+ </h1>
83
+ <p class="text-xl mb-6">
84
+ Branded products at unbelievable prices — delivered to your door.
85
+ </p>
86
+ <a href="#boxes"
87
+ class="px-8 py-4 rounded-full bg-yellow-400 text-black font-semibold shadow-lg hover:bg-yellow-500 transition">
88
+ Shop Now
89
+ </a>
90
+ </div>
91
+ </section>
92
+
93
+
94
+ <!-- Mystery Boxes -->
95
+ <section id="boxes" class="py-16 max-w-6xl mx-auto grid grid-cols-1 md:grid-cols-3 gap-6 text-center">
96
+ <div class="p-6 rounded-lg bg-orange-400 text-white shadow-lg">
97
+ <h2 class="text-2xl font-bold mb-4">₹299 Box</h2>
98
+ <a href="#" class="px-4 py-2 rounded-full bg-white text-black font-semibold">Buy Now</a>
99
+ </div>
100
+ <div class="p-6 rounded-lg bg-yellow-400 text-black shadow-lg">
101
+ <h2 class="text-2xl font-bold mb-4">₹499 Box</h2>
102
+ <a href="#" class="px-4 py-2 rounded-full bg-black text-white font-semibold">Buy Now</a>
103
+ </div>
104
+ <div class="p-6 rounded-lg bg-blue-500 text-white shadow-lg">
105
+ <h2 class="text-2xl font-bold mb-4">₹999 Box</h2>
106
+ <a href="#" class="px-4 py-2 rounded-full bg-white text-black font-semibold">Buy Now</a>
107
+ </div>
108
+ </section>
109
+ <main class="max-w-7xl mx-auto px-6 py-10">
110
+
111
+ <!-- Grid of Boxes -->
112
+ <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-8">
113
+
114
+ <!-- Example Box Item -->
115
+ <div class="bg-white shadow-lg rounded-lg overflow-hidden hover:scale-105 transition">
116
+ <img src="https://em-content.zobj.net/source/microsoft-teams/337/wrapped-gift_1f381.png" alt="Box" class="w-full h-40 object-contain bg-gray-200 p-6">
117
+ <div class="p-4 text-center">
118
+ <h2 class="text-lg font-bold">Box ₹299</h2>
119
+ <p class="text-gray-500 text-sm">Small Mystery Surprise</p>
120
+ <button class="mt-4 px-4 py-2 bg-purple-700 text-white rounded hover:bg-purple-800">Buy Now</button>
121
+ </div>
122
+ </div>
123
+
124
+ <div class="bg-white shadow-lg rounded-lg overflow-hidden hover:scale-105 transition">
125
+ <img src="https://em-content.zobj.net/source/microsoft-teams/337/wrapped-gift_1f381.png" alt="Box" class="w-full h-40 object-contain bg-gray-200 p-6">
126
+ <div class="p-4 text-center">
127
+ <h2 class="text-lg font-bold">Box ₹499</h2>
128
+ <p class="text-gray-500 text-sm">Medium Mystery Box</p>
129
+ <button class="mt-4 px-4 py-2 bg-purple-700 text-white rounded hover:bg-purple-800">Buy Now</button>
130
+ </div>
131
+ </div>
132
+
133
+ <div class="bg-white shadow-lg rounded-lg overflow-hidden hover:scale-105 transition">
134
+ <img src="https://em-content.zobj.net/source/microsoft-teams/337/wrapped-gift_1f381.png" alt="Box" class="w-full h-40 object-contain bg-gray-200 p-6">
135
+ <div class="p-4 text-center">
136
+ <h2 class="text-lg font-bold">Box ₹999</h2>
137
+ <p class="text-gray-500 text-sm">Premium Mystery Offer</p>
138
+ <button class="mt-4 px-4 py-2 bg-purple-700 text-white rounded hover:bg-purple-800">Buy Now</button>
139
+ </div>
140
+ </div>
141
+
142
+ <div class="bg-white shadow-lg rounded-lg overflow-hidden hover:scale-105 transition">
143
+ <img src="https://em-content.zobj.net/source/microsoft-teams/337/wrapped-gift_1f381.png" alt="Box" class="w-full h-40 object-contain bg-gray-200 p-6">
144
+ <div class="p-4 text-center">
145
+ <h2 class="text-lg font-bold">Box ₹1499</h2>
146
+ <p class="text-gray-500 text-sm">Ultra Luxury Box</p>
147
+ <button class="mt-4 px-4 py-2 bg-purple-700 text-white rounded hover:bg-purple-800">Buy Now</button>
148
+ </div>
149
+ </div>
150
+ <!-- 3rd row (add more if needed) -->
151
+
152
+
153
+ </div>
154
+ </main>
155
+ <!-- Features -->
156
+ <section class="bg-white py-16">
157
+ <div class="max-w-6xl mx-auto text-center">
158
+ <h2 class="text-3xl font-bold mb-8">Why Choose Us</h2>
159
+ <div class="grid grid-cols-2 md:grid-cols-4 gap-8">
160
+ <div>
161
+ <div class="text-4xl">💰</div>
162
+ <p class="mt-2">Affordable Prices</p>
163
+ </div>
164
+ <div>
165
+ <div class="text-4xl">🎉</div>
166
+ <p class="mt-2">Surprise & Fun</p>
167
+ </div>
168
+ <div>
169
+ <div class="text-4xl">🌱</div>
170
+ <p class="mt-2">Eco-Friendly</p>
171
+ </div>
172
+ <div>
173
+ <div class="text-4xl">⭐</div>
174
+ <p class="mt-2">Trusted Sellers</p>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ </section>
179
+
180
+ <!-- Reviews -->
181
+ <section class="py-16 bg-gray-100">
182
+ <div class="max-w-6xl mx-auto text-center">
183
+ <h2 class="text-3xl font-bold mb-8">Customer Reviews</h2>
184
+ <div class="grid md:grid-cols-2 gap-8">
185
+ <div class="p-6 bg-white rounded-lg shadow">
186
+ <strong class="block mb-2">😊 Aman</strong>
187
+ <p>“Loved the mystery box! Amazing quality at low cost.”</p>
188
+ <p class="mt-2 text-yellow-500">⭐⭐⭐⭐⭐</p>
189
+ </div>
190
+ <div class="p-6 bg-white rounded-lg shadow">
191
+ <strong class="block mb-2">😎 Lucky</strong>
192
+ <p>“Great surprise and value. Will order again!”</p>
193
+ <p class="mt-2 text-yellow-500">⭐⭐⭐⭐</p>
194
+ </div>
195
+ </div>
196
+ </div>
197
+ </section>
198
+
199
+
200
+ <!-- Footer -->
201
+ <footer class="bg-purple-700 text-white py-8">
202
+ <div class="max-w-6xl mx-auto px-4">
203
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6 text-center md:text-left">
204
+
205
+ <!-- Logo & Tagline -->
206
+ <div>
207
+ <h2 class="text-lg font-bold">🎁 MysteryBox</h2>
208
+ <p class="text-sm mt-2">Affordable. Fun. Eco-Friendly.</p>
209
+ </div>
210
+
211
+ <!-- Navigation Links -->
212
+ <div>
213
+ <h3 class="font-semibold mb-3">Quick Links</h3>
214
+ <ul class="space-y-2">
215
+ <li><a href="/about" class="hover:underline">About Us</a></li>
216
+ <li><a href="/contact" class="hover:underline">Contact</a></li>
217
+ <li><a href="/faq" class="hover:underline">FAQ</a></li>
218
+ </ul>
219
+ </div>
220
+
221
+ <!-- Social Media -->
222
+ <div>
223
+ <h3 class="font-semibold mb-3">Follow Us</h3>
224
+ <div class="flex justify-center md:justify-start space-x-4 text-2xl">
225
+ <a href="https://instagram.com" target="_blank" class="hover:text-pink-400">
226
+ <i class="fab fa-instagram"></i>
227
+ </a>
228
+ <a href="https://facebook.com" target="_blank" class="hover:text-blue-400">
229
+ <i class="fab fa-facebook"></i>
230
+ </a>
231
+ </div>
232
+ </div>
233
+ </div>
234
+
235
+ <!-- Divider -->
236
+ <div class="border-t border-purple-500 mt-6 pt-4 text-center text-sm">
237
+ <p>&copy; 2024 MysteryBox. All rights reserved.</p>
238
+ </div>
239
+ </div>
240
+ </footer>
241
+
242
+ <!-- ✅ Font Awesome (for social icons) -->
243
+ <script src="https://kit.fontawesome.com/3b5fbf8a70.js" crossorigin="anonymous"></script>
244
+
245
+
246
+ </body>
247
+ </html>
Home/tests.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from django.test import TestCase
2
+
3
+ # Create your tests here.
Home/urls.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from django.contrib import admin
2
+ from django.urls import path
3
+ from Home import views
4
+ from django.contrib.auth import views as auth_views
5
+ from . import *
6
+
7
+ urlpatterns = [
8
+ path("", views.index , name="Home"),
9
+ path("reward", views.all_boxes , name="box"),
10
+
11
+ ]
Home/views.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from django.shortcuts import render
2
+ from django.shortcuts import render , HttpResponse , redirect
3
+ # Create your views here.
4
+
5
+
6
+
7
+ def index(request):
8
+ return render(request, 'Home/templates/index.html' )
9
+
10
+ def all_boxes(request):
11
+
12
+ return render(request, "Boxes/templates/spin_wheel.html")