File tree 3 files changed +21
-8
lines changed
3 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ local_settings.py
61
61
db.sqlite3
62
62
db.sqlite3-journal
63
63
64
+ # Geo-Database
65
+ * .mmdb
66
+
64
67
# Flask stuff:
65
68
instance /
66
69
.webassets-cache
Original file line number Diff line number Diff line change 5
5
from cart .cart import Cart
6
6
from django .contrib .auth .decorators import login_required
7
7
from Shop .models import Product
8
+ import geoip2 .database
9
+ import socket
8
10
9
11
10
12
def index (request ):
11
13
# products = Product.objects.all()[:3]
12
14
# main_products = {'products': products}
15
+
16
+ # Getting The Ip Address
17
+ hostname = socket .gethostname ()
18
+ ip_address = socket .gethostbyname (hostname )
19
+
20
+ # Fetching The Country
21
+ # reader = geoip2.database.Reader('./GeoLite2-Country.mmdb')
22
+ # response = reader.country(ip_address=ip_address)
23
+ # print(response)
13
24
return render (request , 'home/index.html' )
14
25
15
26
Original file line number Diff line number Diff line change 284
284
285
285
<!--Ends Here-->
286
286
287
- < < < < < < < HEAD
288
- < div class ="main__body__section ">
289
-
290
- <!--Fisrt Row-->
291
- < div class ="home__row " style ="margin-top: -140px; ">
292
- =======
293
287
<!--Last Row-->
294
288
< div class ="home__row " style ="margin-top: -50px; ">
295
- > > > > > > > dc0cb827c498aa61d30e8534ba798965df72679c
296
289
< div class ="product ">
297
290
< h2 class ="card-heading "> Shop By Category</ h2 >
298
291
@@ -378,7 +371,7 @@ <h2 class="card-heading">Sign in for the best experience</h2>
378
371
height: auto;
379
372
">
380
373
</ div >
381
-
374
+ </ div >
382
375
</ div >
383
376
<!--Ends Here-->
384
377
@@ -462,6 +455,12 @@ <h2 class="x__product__title">
462
455
< li class ="x__items ">
463
456
< img src ="https://m.media-amazon.com/images/I/41V4eXt+eXL._AC_SY200_.jpg " alt ="Charger " class ="x__items__lists ">
464
457
</ li >
458
+ < li class ="x__items ">
459
+ < img src ="https://m.media-amazon.com/images/I/41V4eXt+eXL._AC_SY200_.jpg " alt ="Charger " class ="x__items__lists ">
460
+ </ li >
461
+ < li class ="x__items ">
462
+ < img src ="https://m.media-amazon.com/images/I/41V4eXt+eXL._AC_SY200_.jpg " alt ="Charger " class ="x__items__lists ">
463
+ </ li >
465
464
</ div >
466
465
</ div >
467
466
</ div >
You can’t perform that action at this time.
0 commit comments