From 6be5962f9ec8327bbea3ab4fe0c3ee4deb80d54e Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sat, 7 Feb 2026 11:09:10 +0000 Subject: [PATCH] store-2 --- core/__pycache__/admin.cpython-311.pyc | Bin 212 -> 1176 bytes core/__pycache__/models.cpython-311.pyc | Bin 209 -> 2595 bytes core/__pycache__/urls.cpython-311.pyc | Bin 347 -> 364 bytes core/__pycache__/views.cpython-311.pyc | Bin 1364 -> 1717 bytes core/admin.py | 13 +- core/migrations/0001_initial.py | 41 +++ .../__pycache__/0001_initial.cpython-311.pyc | Bin 0 -> 2308 bytes core/models.py | 28 +- core/templates/base.html | 144 ++++++++-- .../templates/core/includes/product_card.html | 35 +++ core/templates/core/index.html | 264 ++++++++---------- core/urls.py | 7 +- core/views.py | 47 ++-- seed_data.py | 72 +++++ 14 files changed, 465 insertions(+), 186 deletions(-) create mode 100644 core/migrations/0001_initial.py create mode 100644 core/migrations/__pycache__/0001_initial.cpython-311.pyc create mode 100644 core/templates/core/includes/product_card.html create mode 100644 seed_data.py diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index a5ed392d6714413db63120e4233d2e96cbadb5de..2969c45a8dc382b69187efb0b7bde4851dd48a48 100644 GIT binary patch literal 1176 zcma)5zi-n(6uz_1iJKp7Xp;yov>=no{$=g;r_-hJ=+d*|=fYKg!o-TCVMqJ;d$ zMLr56Xrsl+JQzDf5Q}nRX`EU*D&bL!aR%&$s^&y5ksg>?+X;kXv7fdi zO1($r7(7-X*0gPO+O{g$b^uv@v@5p#DRumjr{a5YVskH!d}mYDA}OLUN`0u7+f7gS zJl-QGSl!uDV?7K+BV9||N!k!!gqtRzYOGLm>G5zF*Y zrki)bh@|HVRrX@LDV!vgg4Z>96O+#ZfQ!|T<0QC2XtiZG5a z0iep6j!n-`gjCg7IMQ7o2`DEq>IOpgg*CKha=={iBY?l(fFEp^`ZryqA#{vi}H ztk%cWINxyEt#H{5+llnnB%XLxfOZQ%miWs^{3DbpMGIOD)s_^b(k0O8ybl>h($ literal 212 zcmZ3^%ge<81k-=yXW9el#~=<2FhLogg@BCd3@HpLj5!Rsj8Tk?3@J>(44TX@K?*b( zZ?Pt(n;80F)6nZ2$lO diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index e061640edbdcec3e5c1744466c916e7acdd2763b..62f08a53193cc03d9c68775d443744b950169216 100644 GIT binary patch literal 2595 zcmbVO%}*Og6rc6Cy*6u`l#r4JnuaDWDpVrK2HjX9b8n9M66;`W?0aRb9Rq$iAM5t*UqHnh{8P z;X;;7i}{*0qs}$sDcOSq$?MUv6|=&|>Pz*iT_0l)SgCHCeC)o-?^rdh#KuY{XJh{D zj@DL11dZTXSc>jheE^MvzxJ6=oWy|t@RK0orvOSFAE8gMkGZyoTWpet1T)re^APYk z2yz6?#$SsW%N8ye;{AXkuBs4jRb9&-gd~_rgLn_iqe0qA@8eY`(eIr<|G*p18}+g`hEt&{B6y>o^?V3dp`X4-XbH!R^dJHqYXjg&5afaN zORhZd#B$`3mOSFhBaNAMXL8(;FSO(fu6*IhBzL~J?%Z5-k@pLecyhc+%4|11I&eOpZ@O9G7Oc#OldK#D- zzDBs&)1~nqRe&P;Xcq7!%|TJ-Mf^t&wN|osUcxGlUN3O;RU~S@z$%19nll6VgnD%+ zl4ex}j$}65LCqcHAW-rchU#VAwnPtQCB32X;S9i$`tmY;O$j_34N40un16_X1%2!sOn$GHKZDLD zv9VNxMkT21gK-%X>KN}Lv(1T~AXpF=Thk42Dx&c+gpT9Z{2W4;ks@1WwyG^zrct+< zTIa@Ef5+l(2|8)L56~cgDt*q$^V@cFb^DH^OtzFsSDADYlL1Tgzl|mMSv(*4fq#U6 z=7`iR@S$F=UT3Qw0f_kYmHFu_Ggn2T6nr~GaslYxXA_w+tHkx1t(#Smp7F2O7e#Aa zFENq0`O^>nL=vvP?71Y;@M$raRt+}MEp?e`cAYaSGBa?@f?i?1ELGwlfgICppQ$dP zsaB03`H$Aw0@rCB3FSpW{-Sp+g)pmApBlfGZ{rPk1WT#r$DK|US_^zEF#>K&C_3g`C^g?&8|`12;LFF!V3;r#wvgr3L$0+JkGWdHyG delta 143 zcmZ21a*;7%IWI340}xFAk)LS^q#uJgFu(+5d=>&SrZc24q%h_%P(f)d0X Ui)ANI;FRLNz#s!eMQlJ301luYM*si- diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 5a69659f6c6e0ae848e54157af197c543a09315f..9ca76135f535ca632e1e12a9098d76ccf5e2a5a8 100644 GIT binary patch delta 241 zcmcc3^oEIhIWI340}u$vv`^%gW^|jVu3DeP0ulj%6xKCt%a|D$Rs%5vq%%gbrmzPy zXmY#+31~9jVkt;0$#}^K;jorvrj{4qVz|YUk)N9ilFduZP4&}cyTzT7m6(^FuUA@> zQ(Ocxu80jpu!0D7AaRQuC<8RABz58*pHLs5$OmRdM#dWqG8a(M4F=&0sOSS511o2P jONUTLXiwCPvAJ;QmYG^!T*NwYUu3WsP~ZbI zBO~Jt2AK<}=mCTH1yuBbje(W3!KFi}BV-2K1s3^>Eb>=a@IICjH5NU~HUxU6DABL!?_jfF*=hmB+>u1_2@-~t}f z&76e`23e(nFNmR5^H!3f%$IrB?2`xr2mh1nfO8YsXwkQz?bCi;t;+0xez$8|Xa2(- z_RJmDf-3p6=zia$?NeG`htLj)yWQhDXL+@5EB@zQ-e$;z&2PI|zeQH~jml>BxL(X> ztbDI^EdV%s>%!YCxn@P)#5|p|&F%?1Q1M-VI?%fCE?l;-C!US{jvAbsmm1iUdhe@! zYVZg4au?dVXmd7ii#BUB6-EuI@-tyQU`4wQFc)gS9oT_R?RL8b(>Sp9=~vzqDpnCI z^F^(ko3{*t6+Ks0wQ@nJ)~upZX-}Z3fJJ$v=@uqtiZV-7%6Fy|hBI8wm2ftz z<&CnH)5<2OE~(he6Rl!tM!DC*n|ig7WJm~LJ_OH@W@aDZoK+=QeQ@lK5=BXY20QUJ z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R&*~6dBEe3bs5JzWFqk3cq_3d0S2BU zOwz-6%m^QrTB%c*^grh5!~OV7D|52$b-5bGSv;Uit-+HK`1SD$hWgz*NqQrvn#0is9`xfGJpKUGn1|{MJiz<8*7zyZgoo-sLWNtCrx?w9 zm@`KhsdfGo=7NXG1Q?R71v>@RVu80dc%%&l8vX!ZY<+mL2hg2F>(a?wt8#f5e*}B= zGEdwI_UL^cU(_5@wdfX?bzI`|@=_tp(^}K9)CwgK!#vfXdR?Pi>L%IZ37b$|GxTl3 z(+>$J`h}j;`rf9j&@O zv|w3|?NF_e7yf+3&}{o)MobgpF-+FArs43!1~D3{LmoR+P{aq1FReC=Ce;j{?3JPu zyAYzHB|N&W69d~kW;OgH8T*=AxLI)yUW#xE6T3onFUBKKW`!JxEpQ-C2pr~qOe#>i z0V`+~V*6!by{bDlPe7nb)Fw6bLpWl9j;tA)x#=gE(rtAe=xb7f3lbd`t0jAcs+t3I z_#B(oBUQtg$16b_;tfATd%LeVu|ch*p6W(@ouhX7V&94Ps(qR)9MyE;pW9^tyjX++b8( zGd#VZSLb10lmw+bvAChpp1KMR?y2{oMZTI|^11V^__z0N_x#XsgJ`C2^({da_w_pQ z&14Bm)~n`Mu+yTrrkPcX%Xp2)y|Up_<*~*2)y4Ux8$4+>NbjQk9le1B(c9098&;hZ zn`=$eX%@+2Qh{`7@sUM0?FKZkCBc8I*|AsIVV1k{2`j`&CjsRY$tn` zjb7cosZMt6>L9x9bi0h6!*@GcRc*PGcRWGrdkB;ZTz}_@;;*_FvTCSy#}Hi pk|e1cMbdeO^8UAjF0=Q2yU`0$w2MxQCrLMR@wEsXz9;JC@HZVMbPfOj literal 0 HcmV?d00001 diff --git a/core/models.py b/core/models.py index 71a8362..51249d7 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,29 @@ from django.db import models +from django.urls import reverse -# Create your models here. +class Category(models.Model): + name = models.CharField(max_length=100) + slug = models.SlugField(unique=True) + icon = models.CharField(max_length=50, help_text="Bootstrap icon class", default="bi-tag") + + class Meta: + verbose_name_plural = "Categories" + + def __str__(self): + return self.name + +class Product(models.Model): + name = models.CharField(max_length=200) + slug = models.SlugField(unique=True) + category = models.ForeignKey(Category, related_name='products', on_delete=models.CASCADE) + description = models.TextField() + price = models.DecimalField(max_digits=10, decimal_places=2) + image_url = models.URLField(max_length=500, blank=True) + is_featured = models.BooleanField(default=False) + created_at = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return self.name + + def get_absolute_url(self): + return reverse('product_detail', args=[self.slug]) diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..07d6c87 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,25 +1,131 @@ - - - {% block title %}Knowledge Base{% endblock %} - {% if project_description %} - - - - {% endif %} - {% if project_image_url %} - - - {% endif %} - {% load static %} - - {% block head %}{% endblock %} + + + {% block title %}ShinaStore | Futuristic Gaming Gear{% endblock %} + + + + + + + + + + + {% load static %} + + + + {% block head %}{% endblock %} - - {% block content %}{% endblock %} - + - +
+ {% block content %}{% endblock %} +
+ +
+
+

© 2026 SHINASTORE. POWERED BY NEURAL TECHNOLOGY.

+
+
+ + + + \ No newline at end of file diff --git a/core/templates/core/includes/product_card.html b/core/templates/core/includes/product_card.html new file mode 100644 index 0000000..a95d99e --- /dev/null +++ b/core/templates/core/includes/product_card.html @@ -0,0 +1,35 @@ +
+
+ {% if product.is_featured %} + FEATURED + {% endif %} + {% if product.image_url %} + {{ product.name }} + {% else %} +
+ +
+ {% endif %} +
+
+
+
{{ product.name }}
+ ${{ product.price }} +
+

{{ product.description|truncatewords:15 }}

+
+ +
+
+
+ + diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..74c7699 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,127 @@ {% extends "base.html" %} - -{% block title %}{{ project_name }}{% endblock %} - -{% block head %} - - - - -{% endblock %} +{% load static %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… + +
+
+
+
+

GEAR UP FOR THE FUTURE

+

Experience high-performance marketplace for futuristic tech and gaming gear. Neural peripherals, VR, and RGB-infused hardware.

+ +
+
+
+
+ Future Tech +
+
+
-

AppWizzy AI is collecting your requirements and applying the first changes.

-

This page will refresh automatically as the plan is implemented.

-

- Runtime: Django {{ django_version }} · Python {{ python_version }} - — UTC {{ current_time|date:"Y-m-d H:i:s" }} -

-
-
-
- Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC) -
-{% endblock %} \ No newline at end of file + +
+
+
+ + +
+
+
+

NEURAL CATALOG

+
+ ALL + {% for cat in categories %} + + {{ cat.name|upper }} + + {% endfor %} +
+
+
+
+
+ + +
+ {% if current_category %} + + {% endif %} +
+
+
+ + + {% if not current_category and not search_query and featured_products %} +
+

FEATURED TECH

+
+ {% for product in featured_products %} +
+ {% include "core/includes/product_card.html" with product=product %} +
+ {% endfor %} +
+
+ {% endif %} + + +
+ {% for product in products %} +
+ {% include "core/includes/product_card.html" with product=product %} +
+ {% empty %} +
+

NO GEAR FOUND IN THIS SECTOR

+ RESET NEURAL SEARCH +
+ {% endfor %} +
+
+ + +{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..ac234e7 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,7 +1,6 @@ from django.urls import path - -from .views import home +from . import views urlpatterns = [ - path("", home, name="home"), -] + path("", views.home, name="home"), +] \ No newline at end of file diff --git a/core/views.py b/core/views.py index c9aed12..c2ad46c 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,32 @@ import os -import platform - -from django import get_version as django_version -from django.shortcuts import render -from django.utils import timezone - +from django.shortcuts import render, get_object_or_404 +from .models import Category, Product +from django.db.models import Q def home(request): - """Render the landing screen with loader and environment details.""" - host_name = request.get_host().lower() - agent_brand = "AppWizzy" if host_name == "appwizzy.com" else "Flatlogic" - now = timezone.now() - + """Render the ShinaStore landing page with products and filters.""" + query = request.GET.get('q') + category_slug = request.GET.get('category') + + categories = Category.objects.all() + products = Product.objects.all() + + if query: + products = products.filter( + Q(name__icontains=query) | Q(description__icontains=query) + ) + + if category_slug: + category = get_object_or_404(Category, slug=category_slug) + products = products.filter(category=category) + + featured_products = Product.objects.filter(is_featured=True)[:4] + context = { - "project_name": "New Style", - "agent_brand": agent_brand, - "django_version": django_version(), - "python_version": platform.python_version(), - "current_time": now, - "host_name": host_name, - "project_description": os.getenv("PROJECT_DESCRIPTION", ""), - "project_image_url": os.getenv("PROJECT_IMAGE_URL", ""), + "categories": categories, + "products": products, + "featured_products": featured_products, + "current_category": category_slug, + "search_query": query or "", } - return render(request, "core/index.html", context) + return render(request, "core/index.html", context) \ No newline at end of file diff --git a/seed_data.py b/seed_data.py new file mode 100644 index 0000000..58dc737 --- /dev/null +++ b/seed_data.py @@ -0,0 +1,72 @@ +from core.models import Category, Product + +# Clear existing data +Product.objects.all().delete() +Category.objects.all().delete() + +# Create Categories +categories = [ + {'name': 'VR Headsets', 'slug': 'vr-headsets', 'icon': 'bi-headset-vr'}, + {'name': 'Consoles', 'slug': 'consoles', 'icon': 'bi-controller'}, + {'name': 'Neural Gear', 'slug': 'neural-gear', 'icon': 'bi-cpu'}, + {'name': 'RGB Hardware', 'slug': 'rgb-hardware', 'icon': 'bi-lightning-charge'}, +] + +cat_objs = {} +for cat in categories: + c = Category.objects.create(**cat) + cat_objs[cat['slug']] = c + +# Create Products +products = [ + { + 'name': 'NeuralLink X1', + 'slug': 'neurallink-x1', + 'category': cat_objs['neural-gear'], + 'description': 'Direct brain-to-game interface with zero latency. Experience gaming like never before.', + 'price': 1299.99, + 'image_url': 'https://images.pexels.com/photos/8473479/pexels-photo-8473479.jpeg?auto=compress&cs=tinysrgb&w=800', + 'is_featured': True, + }, + { + 'name': 'HoloVisor Pro', + 'slug': 'holovisor-pro', + 'category': cat_objs['vr-headsets'], + 'description': '8K holographic display with 240Hz refresh rate and wide FOV.', + 'price': 899.99, + 'image_url': 'https://images.pexels.com/photos/3761153/pexels-photo-3761153.jpeg?auto=compress&cs=tinysrgb&w=800', + 'is_featured': True, + }, + { + 'name': 'Quantum Console S', + 'slug': 'quantum-console-s', + 'category': cat_objs['consoles'], + 'description': 'Powered by quantum processing units for instant loading and photorealistic graphics.', + 'price': 499.99, + 'image_url': 'https://images.pexels.com/photos/5947116/pexels-photo-5947116.jpeg?auto=compress&cs=tinysrgb&w=800', + 'is_featured': True, + }, + { + 'name': 'Neon Striker Keyboard', + 'slug': 'neon-striker-keyboard', + 'category': cat_objs['rgb-hardware'], + 'description': 'Mechanical keys with customizable OLED screens and liquid RGB cooling.', + 'price': 249.99, + 'image_url': 'https://images.pexels.com/photos/1779487/pexels-photo-1779487.jpeg?auto=compress&cs=tinysrgb&w=800', + 'is_featured': False, + }, + { + 'name': 'Synapse Controller', + 'slug': 'synapse-controller', + 'category': cat_objs['neural-gear'], + 'description': 'Haptic feedback so precise you can feel the textures of the virtual world.', + 'price': 149.99, + 'image_url': 'https://images.pexels.com/photos/3945657/pexels-photo-3945657.jpeg?auto=compress&cs=tinysrgb&w=800', + 'is_featured': False, + }, +] + +for prod in products: + Product.objects.create(**prod) + +print("Seed data created successfully!")