From 46ebda6b9797237b51a9a9abc68d8884727df695 Mon Sep 17 00:00:00 2001 From: Rin Kaur <121915269+rinnie010@users.noreply.github.com> Date: Wed, 25 Feb 2026 03:34:47 +0000 Subject: [PATCH] finished --- src/db.sqlite3 | Bin 0 -> 139264 bytes src/manage.py | 15 +++ src/products/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 138 bytes src/products/__pycache__/admin.cpython-38.pyc | Bin 0 -> 252 bytes .../__pycache__/models.cpython-38.pyc | Bin 0 -> 590 bytes src/products/admin.py | 5 + src/products/apps.py | 5 + src/products/migrations/0001_initial.py | 24 ++++ .../migrations/0002_auto_20260225_0327.py | 29 +++++ src/products/migrations/__init__.py | 0 .../__pycache__/0001_initial.cpython-38.pyc | Bin 0 -> 808 bytes .../0002_auto_20260225_0327.cpython-38.pyc | Bin 0 -> 790 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 149 bytes src/products/models.py | 9 ++ src/products/tests.py | 3 + src/products/views.py | 3 + src/trydjango/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 139 bytes .../__pycache__/settings.cpython-38.pyc | Bin 0 -> 2298 bytes src/trydjango/__pycache__/urls.cpython-38.pyc | Bin 0 -> 918 bytes src/trydjango/__pycache__/wsgi.cpython-38.pyc | Bin 0 -> 546 bytes src/trydjango/manage.py | 15 +++ src/trydjango/settings.py | 123 ++++++++++++++++++ src/trydjango/trydjango/__init__.py | 0 src/trydjango/trydjango/settings.py | 120 +++++++++++++++++ src/trydjango/trydjango/urls.py | 21 +++ src/trydjango/trydjango/wsgi.py | 16 +++ src/trydjango/urls.py | 21 +++ src/trydjango/wsgi.py | 16 +++ 30 files changed, 425 insertions(+) create mode 100644 src/db.sqlite3 create mode 100755 src/manage.py create mode 100644 src/products/__init__.py create mode 100644 src/products/__pycache__/__init__.cpython-38.pyc create mode 100644 src/products/__pycache__/admin.cpython-38.pyc create mode 100644 src/products/__pycache__/models.cpython-38.pyc create mode 100644 src/products/admin.py create mode 100644 src/products/apps.py create mode 100644 src/products/migrations/0001_initial.py create mode 100644 src/products/migrations/0002_auto_20260225_0327.py create mode 100644 src/products/migrations/__init__.py create mode 100644 src/products/migrations/__pycache__/0001_initial.cpython-38.pyc create mode 100644 src/products/migrations/__pycache__/0002_auto_20260225_0327.cpython-38.pyc create mode 100644 src/products/migrations/__pycache__/__init__.cpython-38.pyc create mode 100644 src/products/models.py create mode 100644 src/products/tests.py create mode 100644 src/products/views.py create mode 100644 src/trydjango/__init__.py create mode 100644 src/trydjango/__pycache__/__init__.cpython-38.pyc create mode 100644 src/trydjango/__pycache__/settings.cpython-38.pyc create mode 100644 src/trydjango/__pycache__/urls.cpython-38.pyc create mode 100644 src/trydjango/__pycache__/wsgi.cpython-38.pyc create mode 100755 src/trydjango/manage.py create mode 100644 src/trydjango/settings.py create mode 100644 src/trydjango/trydjango/__init__.py create mode 100644 src/trydjango/trydjango/settings.py create mode 100644 src/trydjango/trydjango/urls.py create mode 100644 src/trydjango/trydjango/wsgi.py create mode 100644 src/trydjango/urls.py create mode 100644 src/trydjango/wsgi.py diff --git a/src/db.sqlite3 b/src/db.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..d32bb289d3224b46bf79f8e060428795a4c5e745 GIT binary patch literal 139264 zcmeI5du$uYeaCmjmuZO{$&$?TSw2&;bvB`sy}RU+k_;!uvt^xp7JatmhtwXnOL8Ty z%!kZ}Z26D^^7*ds258VALD61;B7Zf1w1)!eBl#ymP&7q*LDRHon-*yLM^K=5DGD?# zkPFb6;gY+2$kO@JdstsuT5)H7^PBH{W@eZ3F!$P(OJ>ywuawFKy&8@R{emb8&xgZ; zAVlf!82u&mSERp}=&zgpHeM`jr&m-swed?HY9*2%Guu%8&rZn@4+0||0>CKWX-MQ4<$8CgCRn~F|NC8GT_{dlrsR4Qhv$kNN2Sv0Gro^MSgCuXF? zsc2MIrKu?4i5!_eI*}sDvG`ojBMe_pQgJz&%e1EFt43L?Rp=qFSE^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_kk%xujS>K0Y%qvm`!Vub}c4hfOX}G$+*#WYA|I GW&i+TS03pA literal 0 HcmV?d00001 diff --git a/src/products/__pycache__/admin.cpython-38.pyc b/src/products/__pycache__/admin.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae8eca5a04aa4fa8c0fc3b1b69679e399cf24e26 GIT binary patch literal 252 zcmYjLF>1p=5WLk%wlH?y5rOf2z!(>{SDwE1zNR>Ug z$-wS1!!WZii^WU{zF*(nMea`||DlC!W%yB+RTdiMp#)GivARjTE;T5GWBQSy{)~G1 ztcvU=ZdJgLRo1)q26r}nqF~Q;zb_``gFRO5A*|}q_T=6u5z8>~!D7RdMv}7YamWb| zj(empMY+i1`dyk!pc8jhjcj&f(hhwvOttCmC2Yp-Rd*fowd9@~+{8aPhR^jJ{s57` BKKTFu literal 0 HcmV?d00001 diff --git a/src/products/__pycache__/models.cpython-38.pyc b/src/products/__pycache__/models.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..68d28fb85ac94bdb6a51357ae8daac004574dc61 GIT binary patch literal 590 zcmYjP&2H2%5Vn)eCfR0JNb~_H7qkbO7eEM=6`ZJ$D3@F;lbP;%aelBJvE>Taz5;?H zujFe_`wE;oi6!VL8F{|>@{MOEAD7DoBg^$qwdIW6jln~kQSgdh`;;6o;F>kO;+(x@ z5JCKdL5zGKeUGacW*^u(ITDYpxt}*3ptkiGKD2*=7lb0KIIt?hcs~OU(JikMjDO94 zvnnMl0}_SgHmY)p<}inp7z<*Y5Tk&M3g$k2Z#o!icRY|HRbDjmAT+jHw>w4zsYlNU zkNgU-R*lr6*Rn<%c%Zh**>5YiQ}zixb=T>$Gg3(bujQcK<$CEeAzIm>5Pl&9^)=}6 zTnO=HkUC_{Sjp$FchbC3sKF;rIgLKQ!h;LQ381Zw>YeIZUu?o literal 0 HcmV?d00001 diff --git a/src/products/admin.py b/src/products/admin.py new file mode 100644 index 00000000000..9c39fccdb28 --- /dev/null +++ b/src/products/admin.py @@ -0,0 +1,5 @@ +from django.contrib import admin + +# Register your models here. +from .models import Product +admin.site.register(Product) \ No newline at end of file diff --git a/src/products/apps.py b/src/products/apps.py new file mode 100644 index 00000000000..864c43ed858 --- /dev/null +++ b/src/products/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class ProductsConfig(AppConfig): + name = 'products' diff --git a/src/products/migrations/0001_initial.py b/src/products/migrations/0001_initial.py new file mode 100644 index 00000000000..6dc0f551f1c --- /dev/null +++ b/src/products/migrations/0001_initial.py @@ -0,0 +1,24 @@ +# Generated by Django 2.1.7 on 2026-02-25 03:16 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Product', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=120)), + ('description', models.TextField()), + ('price', models.DecimalField(decimal_places=2, max_digits=1000)), + ('summary', models.TextField(default='this is cool')), + ], + ), + ] diff --git a/src/products/migrations/0002_auto_20260225_0327.py b/src/products/migrations/0002_auto_20260225_0327.py new file mode 100644 index 00000000000..9c628644403 --- /dev/null +++ b/src/products/migrations/0002_auto_20260225_0327.py @@ -0,0 +1,29 @@ +# Generated by Django 2.1.7 on 2026-02-25 03:27 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('products', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='product', + name='featured', + field=models.BooleanField(default=True), + preserve_default=False, + ), + migrations.AlterField( + model_name='product', + name='price', + field=models.DecimalField(decimal_places=2, max_digits=10000), + ), + migrations.AlterField( + model_name='product', + name='summary', + field=models.TextField(default='this is cool!!'), + ), + ] diff --git a/src/products/migrations/__init__.py b/src/products/migrations/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/products/migrations/__pycache__/0001_initial.cpython-38.pyc b/src/products/migrations/__pycache__/0001_initial.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a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1mJ~J<~BtBlRpz;=n RO)gMDPO2Tq%+El~008u>BVYgk literal 0 HcmV?d00001 diff --git a/src/products/models.py b/src/products/models.py new file mode 100644 index 00000000000..bda88fcc6a9 --- /dev/null +++ b/src/products/models.py @@ -0,0 +1,9 @@ +from django.db import models + +# Create your models here. +class Product(models.Model): + title = models.CharField(max_length = 120) #max_kength = required + description = models.TextField() + price = models.DecimalField(decimal_places = 2, max_digits =10000) + summary = models.TextField(default = "this is cool!!") + featured = models.BooleanField() \ No newline at end of file diff --git a/src/products/tests.py b/src/products/tests.py new file mode 100644 index 00000000000..7ce503c2dd9 --- /dev/null +++ b/src/products/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/src/products/views.py b/src/products/views.py new file mode 100644 index 00000000000..91ea44a218f --- /dev/null +++ b/src/products/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/src/trydjango/__init__.py b/src/trydjango/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/trydjango/__pycache__/__init__.cpython-38.pyc b/src/trydjango/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5feddded57e66422f962234284e11ad6c577626c GIT binary patch literal 139 zcmWIL<>g`kf}LUWGC}lX5P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;!H4etCXTc5y*s za%!=@OIBiDdcI3)ZoYnTQL=tXQDq8PL_a=0GcU6wK3=b&@)n0pZhlH>PO2Tqq|ZRi F006;%AHo0t literal 0 HcmV?d00001 diff --git a/src/trydjango/__pycache__/settings.cpython-38.pyc b/src/trydjango/__pycache__/settings.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b9e4d82a9f8335ba4c486488e5df7b3463aa85d0 GIT binary patch literal 2298 zcmb7F+j84P7?vHycHB5ko1SP36_nD1P^oDPWf&+`Z6)>8hfE|lpbIpz{*AJU4vu!+ z)OwZyWMKb$3m)>RpX3QdpX2})IIhch46rlujP=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!T9$d)ps5P literal 0 HcmV?d00001 diff --git a/src/trydjango/__pycache__/wsgi.cpython-38.pyc b/src/trydjango/__pycache__/wsgi.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6224bf7f2e6a488c3ee6e23d6f2946259ed5ecda GIT binary patch literal 546 zcmYjP!EO^V5cN7~6BddPs(SV{Qdt8>giw)Eq98~QX+g?mW7d<6gV(dN-K6Q2BmaQP zkx$@L@U^G@0wQLQvguURwN{1j z3e9vH`@M@i6@S6 Ap8x;= literal 0 HcmV?d00001 diff --git a/src/trydjango/manage.py b/src/trydjango/manage.py new file mode 100755 index 00000000000..ddce5315368 --- /dev/null +++ b/src/trydjango/manage.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == '__main__': + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'trydjango.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) diff --git a/src/trydjango/settings.py b/src/trydjango/settings.py new file mode 100644 index 00000000000..bedf9d62b16 --- /dev/null +++ b/src/trydjango/settings.py @@ -0,0 +1,123 @@ +""" +Django settings for trydjango project. + +Generated by 'django-admin startproject' using Django 2.1.7. + +For more information on this file, see +https://docs.djangoproject.com/en/2.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/2.1/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'l5+=zrctlivtzy#gst+tmxk1at(_sqa(#q%nbe02a(b+ogxley' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + + #own + 'products' , +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'trydjango.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'trydjango.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/2.1/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/2.1/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/2.1/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/src/trydjango/trydjango/__init__.py b/src/trydjango/trydjango/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/trydjango/trydjango/settings.py b/src/trydjango/trydjango/settings.py new file mode 100644 index 00000000000..ac855af1fd1 --- /dev/null +++ b/src/trydjango/trydjango/settings.py @@ -0,0 +1,120 @@ +""" +Django settings for trydjango project. + +Generated by 'django-admin startproject' using Django 2.1.7. + +For more information on this file, see +https://docs.djangoproject.com/en/2.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/2.1/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '7e-tj@0=6jw8tkq%e0%i1!+=!+922cp0n9nf7fv6e2^kqr$tu-' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'trydjango.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'trydjango.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/2.1/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/2.1/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/2.1/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/src/trydjango/trydjango/urls.py b/src/trydjango/trydjango/urls.py new file mode 100644 index 00000000000..358bfa5f588 --- /dev/null +++ b/src/trydjango/trydjango/urls.py @@ -0,0 +1,21 @@ +"""trydjango URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/2.1/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path + +urlpatterns = [ + path('admin/', admin.site.urls), +] diff --git a/src/trydjango/trydjango/wsgi.py b/src/trydjango/trydjango/wsgi.py new file mode 100644 index 00000000000..47a28f9ce28 --- /dev/null +++ b/src/trydjango/trydjango/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for trydjango project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'trydjango.settings') + +application = get_wsgi_application() diff --git a/src/trydjango/urls.py b/src/trydjango/urls.py new file mode 100644 index 00000000000..358bfa5f588 --- /dev/null +++ b/src/trydjango/urls.py @@ -0,0 +1,21 @@ +"""trydjango URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/2.1/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path + +urlpatterns = [ + path('admin/', admin.site.urls), +] diff --git a/src/trydjango/wsgi.py b/src/trydjango/wsgi.py new file mode 100644 index 00000000000..47a28f9ce28 --- /dev/null +++ b/src/trydjango/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for trydjango project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'trydjango.settings') + +application = get_wsgi_application()