From baf6d399716e520e994e5ad5078d0d2c01f2a42e Mon Sep 17 00:00:00 2001 From: RahafAldauiji Date: Sun, 24 Jul 2022 16:47:58 +0300 Subject: [PATCH] First Commit --- djangoProject/.idea/.gitignore | 8 ++ djangoProject/.idea/djangoProject.iml | 30 +++++ .../inspectionProfiles/Project_Default.xml | 7 + .../inspectionProfiles/profiles_settings.xml | 6 + djangoProject/.idea/misc.xml | 4 + djangoProject/.idea/modules.xml | 8 ++ djangoProject/.idea/vcs.xml | 6 + djangoProject/FirstApp/__init__.py | 0 .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 189 bytes .../__pycache__/admin.cpython-310.pyc | Bin 0 -> 230 bytes .../FirstApp/__pycache__/apps.cpython-310.pyc | Bin 0 -> 472 bytes .../__pycache__/models.cpython-310.pyc | Bin 0 -> 227 bytes .../__pycache__/views.cpython-310.pyc | Bin 0 -> 475 bytes djangoProject/FirstApp/admin.py | 3 + djangoProject/FirstApp/apps.py | 6 + djangoProject/FirstApp/migrations/__init__.py | 0 .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 200 bytes djangoProject/FirstApp/models.py | 3 + djangoProject/FirstApp/tests.py | 3 + djangoProject/FirstApp/views.py | 8 ++ djangoProject/db.sqlite3 | 0 djangoProject/djangoProject/__init__.py | 0 .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 194 bytes .../__pycache__/settings.cpython-310.pyc | Bin 0 -> 2365 bytes .../__pycache__/urls.cpython-310.pyc | Bin 0 -> 1047 bytes .../__pycache__/wsgi.cpython-310.pyc | Bin 0 -> 609 bytes djangoProject/djangoProject/asgi.py | 16 +++ djangoProject/djangoProject/settings.py | 125 ++++++++++++++++++ djangoProject/djangoProject/urls.py | 24 ++++ djangoProject/djangoProject/wsgi.py | 16 +++ djangoProject/manage.py | 22 +++ 31 files changed, 295 insertions(+) create mode 100644 djangoProject/.idea/.gitignore create mode 100644 djangoProject/.idea/djangoProject.iml create mode 100644 djangoProject/.idea/inspectionProfiles/Project_Default.xml create mode 100644 djangoProject/.idea/inspectionProfiles/profiles_settings.xml create mode 100644 djangoProject/.idea/misc.xml create mode 100644 djangoProject/.idea/modules.xml create mode 100644 djangoProject/.idea/vcs.xml create mode 100644 djangoProject/FirstApp/__init__.py create mode 100644 djangoProject/FirstApp/__pycache__/__init__.cpython-310.pyc create mode 100644 djangoProject/FirstApp/__pycache__/admin.cpython-310.pyc create mode 100644 djangoProject/FirstApp/__pycache__/apps.cpython-310.pyc create mode 100644 djangoProject/FirstApp/__pycache__/models.cpython-310.pyc create mode 100644 djangoProject/FirstApp/__pycache__/views.cpython-310.pyc create mode 100644 djangoProject/FirstApp/admin.py create mode 100644 djangoProject/FirstApp/apps.py create mode 100644 djangoProject/FirstApp/migrations/__init__.py create mode 100644 djangoProject/FirstApp/migrations/__pycache__/__init__.cpython-310.pyc create mode 100644 djangoProject/FirstApp/models.py create mode 100644 djangoProject/FirstApp/tests.py create mode 100644 djangoProject/FirstApp/views.py create mode 100644 djangoProject/db.sqlite3 create mode 100644 djangoProject/djangoProject/__init__.py create mode 100644 djangoProject/djangoProject/__pycache__/__init__.cpython-310.pyc create mode 100644 djangoProject/djangoProject/__pycache__/settings.cpython-310.pyc create mode 100644 djangoProject/djangoProject/__pycache__/urls.cpython-310.pyc create mode 100644 djangoProject/djangoProject/__pycache__/wsgi.cpython-310.pyc create mode 100644 djangoProject/djangoProject/asgi.py create mode 100644 djangoProject/djangoProject/settings.py create mode 100644 djangoProject/djangoProject/urls.py create mode 100644 djangoProject/djangoProject/wsgi.py create mode 100644 djangoProject/manage.py diff --git a/djangoProject/.idea/.gitignore b/djangoProject/.idea/.gitignore new file mode 100644 index 000000000..73f69e095 --- /dev/null +++ b/djangoProject/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/djangoProject/.idea/djangoProject.iml b/djangoProject/.idea/djangoProject.iml new file mode 100644 index 000000000..dde40f1fd --- /dev/null +++ b/djangoProject/.idea/djangoProject.iml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/djangoProject/.idea/inspectionProfiles/Project_Default.xml b/djangoProject/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 000000000..c73d2199e --- /dev/null +++ b/djangoProject/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/djangoProject/.idea/inspectionProfiles/profiles_settings.xml b/djangoProject/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 000000000..105ce2da2 --- /dev/null +++ b/djangoProject/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/djangoProject/.idea/misc.xml b/djangoProject/.idea/misc.xml new file mode 100644 index 000000000..9d009ba15 --- /dev/null +++ b/djangoProject/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/djangoProject/.idea/modules.xml b/djangoProject/.idea/modules.xml new file mode 100644 index 000000000..5abfc2172 --- /dev/null +++ b/djangoProject/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/djangoProject/.idea/vcs.xml b/djangoProject/.idea/vcs.xml new file mode 100644 index 000000000..6c0b86358 --- /dev/null +++ b/djangoProject/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/djangoProject/FirstApp/__init__.py b/djangoProject/FirstApp/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/djangoProject/FirstApp/__pycache__/__init__.cpython-310.pyc b/djangoProject/FirstApp/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4eb4bb30f9b61a6b91e1a1b078fe006d299c7b1f GIT binary patch literal 189 zcmd1j<>g`kf(_nxlR)%i5P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;x_QvsFxJacWU< zOi^M+Vp@!UUaCt`W?5>COMY@`ZfaghaZE~9VqSWFKv8~HYH~@8TV_#li7t$XMb5FH jASOOOGcU6wK3=b&@)n0pZhlH>PO2Tq=3*uw!NLFl!k9Aq literal 0 HcmV?d00001 diff --git a/djangoProject/FirstApp/__pycache__/admin.cpython-310.pyc b/djangoProject/FirstApp/__pycache__/admin.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b0b13addad466ec704908d2fbb5adbac8010a1e7 GIT binary patch literal 230 zcmd1j<>g`kf(_nxlbnF`V-N=!FabFZKwK;UBvKes7;_kM8KW2(8B&;n88n$+0!0}# z8E>&BrsQVk`Drpm@ug%X=B4NBCFkdr6lEqAfecv5P{a(Rz{IauXRDad;?$zzn4-jt z#IzXyyi}K>%(B!Nm;B_?+|<01;uwe#0Y&*)smUcVZka{JCAu&k7CFa)f*7#Qndz-h7^b zCr`eDCnwt$dvIVTGnp@6zDdenuS3v2u0CgPxPG}}*L*An=;jy$5TF^!X-p}(B;Wyi zCBPJYVX+7PEeTuSh$11i?cr)QDvKmt%-zneQ7i`NrjJ39m;%AmG-lw%J}_kQ?ZG6~ zrjlEZ=Ob9kVo^pgi}DgwW}=I9F|4a{lBx{ipn>C+)39X&Aqtr*A#6toMAw7(M~a$e`Es0?50 zy3yrQ%`4u>IN4VJ^iU$lsZ6wb(hTo$uWR-&1jMHSZT6-iv-_KQ9aeizkVF4TTW9X) RY;d-o@!Y+uafDscXTQhWdfxy5 literal 0 HcmV?d00001 diff --git a/djangoProject/FirstApp/__pycache__/models.cpython-310.pyc b/djangoProject/FirstApp/__pycache__/models.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..13da5f88449934272a62ed35d3e3c688f1d2b0c8 GIT binary patch literal 227 zcmd1j<>g`kf(_nxlWc(WV-N=!FabFZKwK;UBvKes7;_kM8KW2(8B&;n88n$+0!0}# z8E>)W=BK3Q6#Hp1-QrBiO3X{o*Gow%0%=~!P{abHz{IaOXRDad;?$zzn4-jt#IzXy zyi}K>%(B!Nm;B_?+|<01;uwhTfTH}Y)Z~&Fx6GpA5?vS%i=1OYK@7xhy@JYH95z69 QX-=vgBhboXko5u#0PGPxm;e9( literal 0 HcmV?d00001 diff --git a/djangoProject/FirstApp/__pycache__/views.cpython-310.pyc b/djangoProject/FirstApp/__pycache__/views.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..71b95ae39f9bcc277e0cce85a22e34cbeb9219af GIT binary patch literal 475 zcmZut%}T>S5Y8rPT5Su(Cy3qx+6NF3rBw=IEB+vac!=4lNlCJCcGFVPlfI0v6!7H9 zix1$**|tIt4m;n>H@hD*JEGm*G{`>BKJLGD)MVW(B1h!1OTZ1zQX^wNV>&leGqZdv zvwfSm1=iT)Hm|+eevLa3~f?+ zCe|oaP7z}$;oZPG(Vx5CesCiJWq@HEj)PGSeN3hh^hH!=kSiJRNti!~3ltNGRB)Q0 zRC|BypS$Ct2&M_lWVe`Cb}TZ`eWjkkHX95#C>eT=-&tzAG8U+!Qc2W5t(vQHOq)Wz g{>AhQ)nei`Xz2HigG}%;g+skJ=@7Jx4%@PR0iG3hZvX%Q literal 0 HcmV?d00001 diff --git a/djangoProject/FirstApp/admin.py b/djangoProject/FirstApp/admin.py new file mode 100644 index 000000000..8c38f3f3d --- /dev/null +++ b/djangoProject/FirstApp/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/djangoProject/FirstApp/apps.py b/djangoProject/FirstApp/apps.py new file mode 100644 index 000000000..3c551b98e --- /dev/null +++ b/djangoProject/FirstApp/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class FirstappConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'FirstApp' diff --git a/djangoProject/FirstApp/migrations/__init__.py b/djangoProject/FirstApp/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/djangoProject/FirstApp/migrations/__pycache__/__init__.cpython-310.pyc b/djangoProject/FirstApp/migrations/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0037765163fb94ae537ee5bbcb5af92dd50f7ef5 GIT binary patch literal 200 zcmd1j<>g`kf(_nxlR)%i5P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;x_^vsFxJacWU< zOi^M+Vp@!UUaCt`W?5>COMY@`ZfaghaZE~9VqSWFKv8~HYH~@8TV_#li7t$XMb5FH uASO36y(qCHGe565CO$qhFS8^*Uaz3?7Kcr4eoARhsvXD?#Y{kgg#iFag`kf@bf#Ng(<$h(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o11?*(xTqIJKxa zrYJEZF)hYFFV&?evn(~nB|o_|H#M)MI3^`4F)uwopeR2pHMu0lEwiY&L>I16g0p1SD7(0K<_q^Z)<= literal 0 HcmV?d00001 diff --git a/djangoProject/djangoProject/__pycache__/settings.cpython-310.pyc b/djangoProject/djangoProject/__pycache__/settings.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..69ebe57fcb41e99f88cc0603a2ba365d34268092 GIT binary patch literal 2365 zcmb7GNpIUm6eekEv0^2Tovm>f0%;Z{HPtLl(x6C9i?pLgmIRZETfzWAX-4uW+`<{! zF|Yj_IkdeM=&`?sKu-A9$hh)Am%bW7tjahMRe7?gjRH}@}Yf?=eUwOw7r2Z zQOp?e22|?%p@cG7JM@RR$E0BNmP@5g?BUR67)jkj>E_64)kZGyB+BfNjV*6V5d|!1 z4E;d=-;>~TD^nAC9 zy($1!nIDiItxnRej^NoImim$7NDiS)^83fzvONTWFbSo7+les!Ke0mGp9=H`95h$q z6R~Zxy?A}h0`VyBMIm0j-n}(^dF^%dXzkwXXxKZryXMpQi~VbZFK^#@jI0|E@FUcX zZiL*ddm)9TRpa>*>~EvUQ}3AI!pz z6OpI<^^t7Kt8y|3oVn|JaxHuPhbayFat($T1RqS9KAOqJ1{$aHP+$!Vl3rGlQ;xHn zn29xO;?{W zp4gyH*f354T$MM&~mbF<#m60xal zY2iGye*A1E{j8h62x1Z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@wvyI8-opJs zbhFfr_|48v(<=koq?#>Qkxmp0v{*wrz4nh79{=6Xf4<$whEiPLx`S8k VW?uUbL`(zSB?ph5gipgL`~zf3!)O2i literal 0 HcmV?d00001 diff --git a/djangoProject/djangoProject/asgi.py b/djangoProject/djangoProject/asgi.py new file mode 100644 index 000000000..a02c55c58 --- /dev/null +++ b/djangoProject/djangoProject/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for djangoProject project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoProject.settings') + +application = get_asgi_application() diff --git a/djangoProject/djangoProject/settings.py b/djangoProject/djangoProject/settings.py new file mode 100644 index 000000000..fff25ada1 --- /dev/null +++ b/djangoProject/djangoProject/settings.py @@ -0,0 +1,125 @@ +""" +Django settings for djangoProject project. + +Generated by 'django-admin startproject' using Django 4.0.6. + +For more information on this file, see +https://docs.djangoproject.com/en/4.0/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/4.0/ref/settings/ +""" + +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-%b(jk#xu7@2xujcw1@osz5v#g9*+8d_&4e7dbu&rb%p-dg8$df' + +# 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', + 'FirstApp' +] + +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 = 'djangoProject.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [BASE_DIR / 'templates'] + , + '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 = 'djangoProject.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/4.0/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/4.0/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/4.0/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/4.0/howto/static-files/ + +STATIC_URL = 'static/' + +# Default primary key field type +# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/djangoProject/djangoProject/urls.py b/djangoProject/djangoProject/urls.py new file mode 100644 index 000000000..5531385ed --- /dev/null +++ b/djangoProject/djangoProject/urls.py @@ -0,0 +1,24 @@ +"""djangoProject URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/4.0/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 + +import FirstApp.views + +urlpatterns = [ + path('admin/', admin.site.urls), + path('home/', FirstApp.views.home) +] diff --git a/djangoProject/djangoProject/wsgi.py b/djangoProject/djangoProject/wsgi.py new file mode 100644 index 000000000..8952caaab --- /dev/null +++ b/djangoProject/djangoProject/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for djangoProject 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/4.0/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoProject.settings') + +application = get_wsgi_application() diff --git a/djangoProject/manage.py b/djangoProject/manage.py new file mode 100644 index 000000000..503f50e9a --- /dev/null +++ b/djangoProject/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoProject.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) + + +if __name__ == '__main__': + main()