From 206d50c6305d7568dc2f785d2e95e0179d0aa235 Mon Sep 17 00:00:00 2001 From: caleb stark Date: Sun, 26 Oct 2025 22:30:36 +0000 Subject: [PATCH 1/2] init django --- trydjango/src/db.sqlite3 | 0 trydjango/src/manage.py | 15 +++ trydjango/src/trydjango/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 149 bytes .../__pycache__/settings.cpython-38.pyc | Bin 0 -> 2294 bytes .../trydjango/__pycache__/urls.cpython-38.pyc | Bin 0 -> 928 bytes .../trydjango/__pycache__/wsgi.cpython-38.pyc | Bin 0 -> 556 bytes trydjango/src/trydjango/settings.py | 120 ++++++++++++++++++ trydjango/src/trydjango/trydjango/__init__.py | 0 trydjango/src/trydjango/trydjango/settings.py | 120 ++++++++++++++++++ trydjango/src/trydjango/trydjango/urls.py | 21 +++ trydjango/src/trydjango/trydjango/wsgi.py | 16 +++ trydjango/src/trydjango/urls.py | 21 +++ trydjango/src/trydjango/wsgi.py | 16 +++ 14 files changed, 329 insertions(+) create mode 100644 trydjango/src/db.sqlite3 create mode 100755 trydjango/src/manage.py create mode 100644 trydjango/src/trydjango/__init__.py create mode 100644 trydjango/src/trydjango/__pycache__/__init__.cpython-38.pyc create mode 100644 trydjango/src/trydjango/__pycache__/settings.cpython-38.pyc create mode 100644 trydjango/src/trydjango/__pycache__/urls.cpython-38.pyc create mode 100644 trydjango/src/trydjango/__pycache__/wsgi.cpython-38.pyc create mode 100644 trydjango/src/trydjango/settings.py create mode 100644 trydjango/src/trydjango/trydjango/__init__.py create mode 100644 trydjango/src/trydjango/trydjango/settings.py create mode 100644 trydjango/src/trydjango/trydjango/urls.py create mode 100644 trydjango/src/trydjango/trydjango/wsgi.py create mode 100644 trydjango/src/trydjango/urls.py create mode 100644 trydjango/src/trydjango/wsgi.py diff --git a/trydjango/src/db.sqlite3 b/trydjango/src/db.sqlite3 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/trydjango/src/manage.py b/trydjango/src/manage.py new file mode 100755 index 00000000000..ddce5315368 --- /dev/null +++ b/trydjango/src/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/trydjango/src/trydjango/__init__.py b/trydjango/src/trydjango/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/trydjango/src/trydjango/__pycache__/__init__.cpython-38.pyc b/trydjango/src/trydjango/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..512f095db41a766e6bfb6fe04a892c171407092e GIT binary patch literal 149 zcmWIL<>g`kf}VN*GC=fW5P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;!HOetCXTc5y*s za%!=@OIBiDdcI3)ZoYm=QDq94r(ax@jKqtN&&r&fB6qb#!je`k++>;iyO-V?KR7e{#nNEsgDZ~?B7$k>Qe>AdoEidR|w5tGm zhCV{3)BNnK^bz#8zxo25X(p5ONH)e}GE*vfk9W^~zddKwu2jk#Jiq+0ytd34Ds8W+%lF^d)*4)N$Rx`M8vYv{VelN`G7hIevC1>H2}&@FU3 zi**qf&}VP+=<_#uk~8Mf5)wdj34M{#FEjcT$vM1n3EeRk(AUNyWO5nC6&P31vT+UN zHE!juCFVG;tn69769^PDMtp|~-5?ZLc#H<@ei-awn~CM}7WQ#yF^q)Hv2b@FUbT=% ze1S46WJArnLPWujFm$^vu8A99{T#e{L5Kz7LjccWB=80Ju^xet#Kqr02Dsc~tWTdv z5(;c84q}{SU&Ea(%PN+&5x1NW?lg>K}!f=eh9g6`>-EFVE2OhVzctWA-w7<5o`FP`qt{?5M-#J?Dcg(f5p8eq7=JLV8>iV7?t&{ur ztnNeS&cSQ)y&hj4>_@Z%pM|6&X4u7xliY~);#(8U)CBvC9rrPfuT2OkrWDXTEAT*I zIbd;f(t-j0c8WTUSBEl>AmrjhE5stjb`%nJENa6^Vd_}Q z;Szg)&$9QS;>Dkyhn9z1{j{{{nBCl{o5Uz|X)F!>FzoeRXehA*4zQ0-3SLyQ*3*Y# zYAj^Of5c2^1sl=|LK@$jbaGZlM7R?<@%?jXhWG&5g2fMpx}y?J5&eYc6zTZkgz^Z* zPZ*rYR`{g&Os>9En~K3JwH+-f$=lmzHY>Ka^;)Z`#Wzm@JERT~t$rVH&JHmtBHXni zmyK!~bx!f42QFdwVO$30aK4gH3Tkt!)>IR|DL2%x2n`&+m`FXVoW4crVGtq{E(wCN zaAKR{P-bbnMht7jBd(Qp#;buw5XMi>>#0F};zeE^`wr`!+W&Z7`$3~@4|68EAObu>`tqto9&%?wbgu{%;;)kyDsahmdx*JTeVcbUaQJ!r6l}bK>TDz zk##u@t|iyyw*JE0mNjj+wWFA?;nSOj*^nKtAf2i8WpZYLwkHR z{J4t!6`CFXVHh_Z?pz%~S3_e3|DnPJYCHpZ}PD d&wu3S`C`hO{Q&byo&zp_hW^bjLWIFv_!l<%2(ADC literal 0 HcmV?d00001 diff --git a/trydjango/src/trydjango/__pycache__/urls.cpython-38.pyc b/trydjango/src/trydjango/__pycache__/urls.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cde3d8f3b1a810bc8009afbcf29516734ca908e0 GIT binary patch literal 928 zcma)5L2uJA6i(8#D_IAB!M8M0iP;VuDnOu(iAjh9uuCtQ8@o+PY)7`k=&rl+8@ThA za^=K{I|ty|O;Ln|G)uAkoagU--{0wqS3OWUtrd)VWt>=S51 zT^iPgmUw&EyUeeix(EN=^z$*kmg%};DGQZqRL2~(er5Ly&3!B;2SU6{*wVCWO8gGSW)LMHo?j!AF-`d9jKJQ%V9%}kYShL(A|mJ4A@ zWVOWw6h2GSp=WSaqXWnM9N4x*Xe~ZzV8SuMDwLNRo@-cwW=mn!CS^ngl1-D>F;z2RJ9;j*o$|C$P{I2isad&%dx z^2jCB8rKyV&sVNgJpCOPLPotLJSoBF&0W4DBRuV&ydMqD^6}C6`EWEC=ci}=iw{TF zkMHKs9C)ux>3W^e$@3^8&jUpl9&M#$MVugO8e1BvLI=!JSu`Pyg%W1sQu}a!hw~?~ z&0}udpVxea_Oq)+0gm@K3-3dP{EnVGTkN2QC#%qghU*QF2WL;4Rw CZm%Q& literal 0 HcmV?d00001 diff --git a/trydjango/src/trydjango/settings.py b/trydjango/src/trydjango/settings.py new file mode 100644 index 00000000000..07820f8b944 --- /dev/null +++ b/trydjango/src/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 = 'rhn6k17@87xs2xk2$x&pb_11hc+(@&qq-2jcu2i*(af3g$qvi5' + +# 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/trydjango/src/trydjango/trydjango/__init__.py b/trydjango/src/trydjango/trydjango/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/trydjango/src/trydjango/trydjango/settings.py b/trydjango/src/trydjango/trydjango/settings.py new file mode 100644 index 00000000000..362efa6ce49 --- /dev/null +++ b/trydjango/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 = 'j6am*ce0r$7bswt6zx5im!fu)xedpkmc8mbkldak3q43tqk6zb' + +# 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/trydjango/src/trydjango/trydjango/urls.py b/trydjango/src/trydjango/trydjango/urls.py new file mode 100644 index 00000000000..358bfa5f588 --- /dev/null +++ b/trydjango/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/trydjango/src/trydjango/trydjango/wsgi.py b/trydjango/src/trydjango/trydjango/wsgi.py new file mode 100644 index 00000000000..47a28f9ce28 --- /dev/null +++ b/trydjango/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/trydjango/src/trydjango/urls.py b/trydjango/src/trydjango/urls.py new file mode 100644 index 00000000000..358bfa5f588 --- /dev/null +++ b/trydjango/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/trydjango/src/trydjango/wsgi.py b/trydjango/src/trydjango/wsgi.py new file mode 100644 index 00000000000..47a28f9ce28 --- /dev/null +++ b/trydjango/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() From c95db13307bbe6285698e9874d79bc2520d0b103 Mon Sep 17 00:00:00 2001 From: caleb stark Date: Mon, 27 Oct 2025 00:02:34 +0000 Subject: [PATCH 2/2] django tutorial --- trydjango/src/db.sqlite3 | Bin 0 -> 139264 bytes trydjango/src/pages/__init__.py | 0 .../pages/__pycache__/__init__.cpython-38.pyc | Bin 0 -> 145 bytes .../pages/__pycache__/admin.cpython-38.pyc | Bin 0 -> 186 bytes .../pages/__pycache__/models.cpython-38.pyc | Bin 0 -> 183 bytes .../pages/__pycache__/views.cpython-38.pyc | Bin 0 -> 378 bytes trydjango/src/pages/admin.py | 3 +++ trydjango/src/pages/apps.py | 5 ++++ trydjango/src/pages/migrations/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 156 bytes trydjango/src/pages/models.py | 3 +++ trydjango/src/pages/tests.py | 3 +++ trydjango/src/pages/views.py | 6 +++++ trydjango/src/products/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 148 bytes .../products/__pycache__/admin.cpython-38.pyc | Bin 0 -> 262 bytes .../__pycache__/models.cpython-38.pyc | Bin 0 -> 598 bytes .../products/__pycache__/views.cpython-38.pyc | Bin 0 -> 394 bytes trydjango/src/products/admin.py | 6 +++++ trydjango/src/products/apps.py | 5 ++++ .../src/products/migrations/0001_initial.py | 24 ++++++++++++++++++ .../migrations/0002_product_featured.py | 19 ++++++++++++++ trydjango/src/products/migrations/__init__.py | 0 .../__pycache__/0001_initial.cpython-38.pyc | Bin 0 -> 810 bytes .../0002_product_featured.cpython-38.pyc | Bin 0 -> 606 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 159 bytes trydjango/src/products/models.py | 9 +++++++ trydjango/src/products/tests.py | 3 +++ trydjango/src/products/views.py | 6 +++++ .../__pycache__/settings.cpython-38.pyc | Bin 2294 -> 2319 bytes .../trydjango/__pycache__/urls.cpython-38.pyc | Bin 928 -> 1089 bytes trydjango/src/trydjango/settings.py | 3 +++ trydjango/src/trydjango/urls.py | 5 ++++ 33 files changed, 100 insertions(+) create mode 100644 trydjango/src/pages/__init__.py create mode 100644 trydjango/src/pages/__pycache__/__init__.cpython-38.pyc create mode 100644 trydjango/src/pages/__pycache__/admin.cpython-38.pyc create mode 100644 trydjango/src/pages/__pycache__/models.cpython-38.pyc create mode 100644 trydjango/src/pages/__pycache__/views.cpython-38.pyc create mode 100644 trydjango/src/pages/admin.py create mode 100644 trydjango/src/pages/apps.py create mode 100644 trydjango/src/pages/migrations/__init__.py create mode 100644 trydjango/src/pages/migrations/__pycache__/__init__.cpython-38.pyc create mode 100644 trydjango/src/pages/models.py create mode 100644 trydjango/src/pages/tests.py create mode 100644 trydjango/src/pages/views.py create mode 100644 trydjango/src/products/__init__.py create mode 100644 trydjango/src/products/__pycache__/__init__.cpython-38.pyc create mode 100644 trydjango/src/products/__pycache__/admin.cpython-38.pyc create mode 100644 trydjango/src/products/__pycache__/models.cpython-38.pyc create mode 100644 trydjango/src/products/__pycache__/views.cpython-38.pyc create mode 100644 trydjango/src/products/admin.py create mode 100644 trydjango/src/products/apps.py create mode 100644 trydjango/src/products/migrations/0001_initial.py create mode 100644 trydjango/src/products/migrations/0002_product_featured.py create mode 100644 trydjango/src/products/migrations/__init__.py create mode 100644 trydjango/src/products/migrations/__pycache__/0001_initial.cpython-38.pyc create mode 100644 trydjango/src/products/migrations/__pycache__/0002_product_featured.cpython-38.pyc create mode 100644 trydjango/src/products/migrations/__pycache__/__init__.cpython-38.pyc create mode 100644 trydjango/src/products/models.py create mode 100644 trydjango/src/products/tests.py create mode 100644 trydjango/src/products/views.py diff --git a/trydjango/src/db.sqlite3 b/trydjango/src/db.sqlite3 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4b9e05d1836cdb7049a2445b2ad0dc4d83395aec 100644 GIT binary patch literal 139264 zcmeI5du$s=e#dvkmuZn4$+Ao*wj)ZmViSt2eefYFbuWr7J8~>4w&loj8*G>4N?MCA zlay>ZxB_yVTpxG+qlX@@DB2V#?ynX_6BI}vcYoX+4n?nMb0~T(+FlFv`p2O_lPg;E z0VD@>X1L@oAF@>Engr5!Ev>jSzxmB~J~R86hq>3UUNLJ%WVuu+=(UI{^a-LUJQs-w zf}qmh5&BE$uSkC{(qA|IZEP%Tr%e^kZv4E5T8ZQXW*e^m*(n*~K>!3m00ck)1V8`; zKmY_l00ck)1b%!31`h|Rv;N-S7092EFOeJ>4*hlL^P%U1KMMYF@NO^`_(9;!z{`Q* z-hZVg*gyaTKmY_l00ck)1V8`;K2`!h(eDvXB&W-jQf@t4t4fljXx4$YZ0NQ1ijh+! zB|a`o<4Pi;s8j0XR6Kq*p-xUJakY=89-Xcl)v8%4vedF>7R{Qe=i3s=Q;K|6Nh(rO zQVCDw$nw#N5=tzdycF^XgEyx2_1Y@UC8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src/pages/models.py b/trydjango/src/pages/models.py new file mode 100644 index 00000000000..71a83623907 --- /dev/null +++ b/trydjango/src/pages/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/trydjango/src/pages/tests.py b/trydjango/src/pages/tests.py new file mode 100644 index 00000000000..7ce503c2dd9 --- /dev/null +++ b/trydjango/src/pages/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/trydjango/src/pages/views.py b/trydjango/src/pages/views.py new file mode 100644 index 00000000000..86aea120381 --- /dev/null +++ b/trydjango/src/pages/views.py @@ -0,0 +1,6 @@ +from django.http import HttpResponse +from django.shortcuts import render + +# Create your views here. +def home_view(*args, **kwargs): + return HttpResponse("

Hello World

") \ No newline at end of file diff --git a/trydjango/src/products/__init__.py b/trydjango/src/products/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/trydjango/src/products/__pycache__/__init__.cpython-38.pyc b/trydjango/src/products/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..56c83c7bd24294d6eb829b08968e461106fa98a5 GIT binary patch literal 148 zcmWIL<>g`kg6T{DWq|0%AOaaM0yz#qT+9L_QW%06G#UL?G8BP?5yUS`{qp>x?BasN zUQoe*MRMo3kcY-!Gd&|EIE4*_ojW2HVrA0%rhUZF!( zU$XE^w)I(-|Nm_^n+VqT*Wdok^C!Tg6vK*(p1B!eWG$@Br4%MIs*bG6l@uTk@ihT; z3;Xz0WXYYcMJBtXFt%#$a-i`RojI0%la2Bxb10gfo0qQfSiNJ!C*8<812thBAg0Pg zmm=&c@_?TLQ(pJ&_eGx^eo$MKKziMOT7z}k<7N1(2}|7$cBK0h^Y+rE3wAixundVP J*i6+l`Ul!bLyiCd literal 0 HcmV?d00001 diff --git a/trydjango/src/products/__pycache__/models.cpython-38.pyc b/trydjango/src/products/__pycache__/models.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..84fbcfcce43d58bb06efee144aed617c3257a3f7 GIT binary patch literal 598 zcmYjPy^ho{5VqrFH_2sB6z~ExD9xp$K?uR>KqqlR;*gLV%a<{`*>ird6R}%Ed+%_R zl)R2xs(l3t#5k7V#)>uHeB*EInS5BSa)S2e=b!CIO2{t{?puuD1%CE1Za{!)(o#+- zc}*Y!_Kg5jbQgVPoI(7al*tkENJ-tI?LlccE6rx+o6Z99r zaK*O~Um{8&fdwoPWiyvTI&-;VcPHNoFCfFhxm&(7Jxuj@+@mtyAaCVfXw_}T?Nu4M zL&F^)bSf=D`!pi`*%wx@n~rgO;_j;T$xZX0+#*<;tZ(bh1@KxLgQ))ug>& z2=RH6IxxoTx$M?Z*%~0cC5`3}e%Gu2_eXGsTm^G_~SOJGHGe z2Uoo8d#z*_*z}W<<75>4Am$;KnYZ6ht1rE|v4g*Hwcg2Y)2~(ASED(=j4EsDY6u;% zRT#$Ea4-xd{0yw0drAv>ICL7fEPO|J$b}JqJFK_H4&sslgN*gAfos ZGz_;K826zar!{?1sTn7Pt~TP4{|D>`Uc3MR literal 0 HcmV?d00001 diff --git a/trydjango/src/products/admin.py b/trydjango/src/products/admin.py new file mode 100644 index 00000000000..773b3a1c15d --- /dev/null +++ b/trydjango/src/products/admin.py @@ -0,0 +1,6 @@ +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/trydjango/src/products/apps.py b/trydjango/src/products/apps.py new file mode 100644 index 00000000000..864c43ed858 --- /dev/null +++ b/trydjango/src/products/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class ProductsConfig(AppConfig): + name = 'products' diff --git a/trydjango/src/products/migrations/0001_initial.py b/trydjango/src/products/migrations/0001_initial.py new file mode 100644 index 00000000000..60498413b89 --- /dev/null +++ b/trydjango/src/products/migrations/0001_initial.py @@ -0,0 +1,24 @@ +# Generated by Django 2.1.7 on 2025-10-26 23:31 + +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(blank=True, null=True)), + ('price', models.DecimalField(decimal_places=2, max_digits=10000)), + ('summary', models.TextField()), + ], + ), + ] diff --git a/trydjango/src/products/migrations/0002_product_featured.py b/trydjango/src/products/migrations/0002_product_featured.py new file mode 100644 index 00000000000..7d2c55372c1 --- /dev/null +++ b/trydjango/src/products/migrations/0002_product_featured.py @@ -0,0 +1,19 @@ +# Generated by Django 2.1.7 on 2025-10-26 23:38 + +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, + ), + ] diff --git a/trydjango/src/products/migrations/__init__.py b/trydjango/src/products/migrations/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/trydjango/src/products/migrations/__pycache__/0001_initial.cpython-38.pyc b/trydjango/src/products/migrations/__pycache__/0001_initial.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8249e4b58b7ef3e86193c1db3dbfe71cd1a66818 GIT binary patch literal 810 zcmYjP&2H2%5VoCUcazPQ<>$Zy@T0vn<&LVNt_mDlAyF>5MA^(V^)`RlS?F?w>%IdV zIdSA&eC5P!xZDn0)Gbn4oLTC2r_Oj&<=;($F zvX}#l1@PF(S?r>>9M}>#T#kU#cEN+e#yt}-q&pu*;BPpgfKbpyj5mUCNO%kr*nvA8 zp5pLp@Qs~`+=IItk@Gl&dqnlV@sIy=JT=2Ns)kk88X@7xh}ZL(Yr=HZ)=8!?Z4u14 zQL;?cI=R5L@ii)$7V;CC@B^wvtud+65{=i&w!o`P>S)GEh4eBhu*%zWGX~U|l8x1b z1o9R|T3r~oS`~%yD0hZeGzBK7Pdfp305hsrBu$ZKsQXkPbJ=P$)T`1`p)_t+b#NxJ z0DUr>m{HOZNfHwz2?@U{ko+)7-mlWa1``^}O14Dbgn$iJfK?_@D_h=-54(Pk?Z}j4 zZ~PY|!;vju{KNB9ZQWD6YDACegfSGcarg?PYs_>^|=M_jvq myQmYIqTgrVg+#uoQ#Lbt-fOmRTh~^Rsq+tgBIq~( literal 0 HcmV?d00001 diff --git a/trydjango/src/products/migrations/__pycache__/0002_product_featured.cpython-38.pyc b/trydjango/src/products/migrations/__pycache__/0002_product_featured.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fd2fdccae835a3ea21f7d87b13b988d18d26eba6 GIT binary patch literal 606 zcmYjO!EV$r5Vd1xHydrG3JE>|X)l|FGeQMbv5(hg0^$gd317~i0 zkFT8g04^138GCotPUI&)&)9F~ z-Jknxjd~a@!o`C7Dd1X<&2YAm)M#ig`kg6T{DWq|0%AOaaM0yz#qT+9L_QW%06G#UL?G8BP?5yUSS{qp>x?BasN zJ;EsvXGm&p^xo04UBVaR2}S literal 0 HcmV?d00001 diff --git a/trydjango/src/products/models.py b/trydjango/src/products/models.py new file mode 100644 index 00000000000..64f80b34e79 --- /dev/null +++ b/trydjango/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) + description= models.TextField(blank=True, null=True) + price= models.DecimalField(decimal_places=2, max_digits=10000) + summary= models.TextField(blank=False, null=False) + featured= models.BooleanField() \ No newline at end of file diff --git a/trydjango/src/products/tests.py b/trydjango/src/products/tests.py new file mode 100644 index 00000000000..7ce503c2dd9 --- /dev/null +++ b/trydjango/src/products/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/trydjango/src/products/views.py b/trydjango/src/products/views.py new file mode 100644 index 00000000000..52190c123bd --- /dev/null +++ b/trydjango/src/products/views.py @@ -0,0 +1,6 @@ +from django.http import HttpResponse +from django.shortcuts import render + +# Create your views here. +def product_view(*args, **kwargs): + return HttpResponse("

These are my products

") \ No newline at end of file diff --git a/trydjango/src/trydjango/__pycache__/settings.cpython-38.pyc b/trydjango/src/trydjango/__pycache__/settings.cpython-38.pyc index e9c048b0f7e0f1895b6754319aaacbb2451e0a1d..55c0d479d3a43848a11ed3cf3911d463a31700d9 100644 GIT binary patch delta 215 zcmW-XJx&5q7y$QudB_HMEW7-QqN1P@doSP-49(XOhdkFt;!k2n;spqyu-O8SK)i>? z(Zm?zhAAdf%vZcf+}OENkn^_ryS-exp7~r}T+Jy{@u8M*REek&lTi0XEz{5nO&?%s z(Wb*LU2jvvUS_>f$G%qSaWFM^vW})Z9KH)jnWRQ*^f}JYJ||lbwjQR&Ta7u@gfp#U zwLxsPnMaFrZ6nvgXtepU5@|Slxaaxi=}`-_iU0VO*MfOj&BJa{#K^aGt1Q%i%P=ASuDaIC>SBch1CW2kG(MgwWbbs#s+)soi_Ap={Lk>V(N?V2^u3*F= j+~o&IWx+VNs=rn{=CUPK63m8I`A%; diff --git a/trydjango/src/trydjango/__pycache__/urls.cpython-38.pyc b/trydjango/src/trydjango/__pycache__/urls.cpython-38.pyc index cde3d8f3b1a810bc8009afbcf29516734ca908e0..c56767cbabadbc9634529e9317c3abf9d611d108 100644 GIT binary patch delta 281 zcmZ3$evm^ul$V!_0SIcg{>zxg%)sy%#6bpZK#l_t7bi^AmUl~GOkv4k&1H*XV`Kob zS##KPIiffi8B$qN*izY2*i$%qnSpH1RE`ubD4RQ#DT_0UtC=aCIf^@lCzwH#cVj{? zldmS@EzXSm+|>B8%+zuqho_(@KczIe1kAt1aEk>b2^43^OUzBJ;)Kc;>)+ylF{{`T zQ*tx&^!+q>CjVeEP>JF$NK8*H)&m(>T*Lx&bQB*