From 6bacace1d376a784ba53c96bfc2491fe2f918357 Mon Sep 17 00:00:00 2001 From: Wissam_Zaidi Date: Sun, 24 Jul 2022 13:10:32 +0000 Subject: [PATCH] inite --- First_Project_LAB/__init__.py | 0 First_Project_LAB/asgi.py | 16 +++++ First_Project_LAB/settings.py | 124 ++++++++++++++++++++++++++++++++ First_Project_LAB/urls.py | 22 ++++++ First_Project_LAB/wsgi.py | 16 +++++ db.sqlite3 | Bin 0 -> 131072 bytes firstApp/__init__.py | 0 firstApp/admin.py | 3 + firstApp/apps.py | 6 ++ firstApp/migrations/__init__.py | 0 firstApp/models.py | 3 + firstApp/tests.py | 3 + firstApp/urls.py | 6 ++ firstApp/views.py | 7 ++ manage.py | 22 ++++++ 15 files changed, 228 insertions(+) create mode 100644 First_Project_LAB/__init__.py create mode 100644 First_Project_LAB/asgi.py create mode 100644 First_Project_LAB/settings.py create mode 100644 First_Project_LAB/urls.py create mode 100644 First_Project_LAB/wsgi.py create mode 100644 db.sqlite3 create mode 100644 firstApp/__init__.py create mode 100644 firstApp/admin.py create mode 100644 firstApp/apps.py create mode 100644 firstApp/migrations/__init__.py create mode 100644 firstApp/models.py create mode 100644 firstApp/tests.py create mode 100644 firstApp/urls.py create mode 100644 firstApp/views.py create mode 100755 manage.py diff --git a/First_Project_LAB/__init__.py b/First_Project_LAB/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/First_Project_LAB/asgi.py b/First_Project_LAB/asgi.py new file mode 100644 index 000000000..1f8191bad --- /dev/null +++ b/First_Project_LAB/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for First_Project_LAB 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', 'First_Project_LAB.settings') + +application = get_asgi_application() diff --git a/First_Project_LAB/settings.py b/First_Project_LAB/settings.py new file mode 100644 index 000000000..26e0a5b68 --- /dev/null +++ b/First_Project_LAB/settings.py @@ -0,0 +1,124 @@ +""" +Django settings for First_Project_LAB 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-ifu!=kgf^&7-nos!12$%+_@m@((ztqa&#symfgkf#8iitu1c=q' + +# 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 = 'First_Project_LAB.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 = 'First_Project_LAB.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/First_Project_LAB/urls.py b/First_Project_LAB/urls.py new file mode 100644 index 000000000..6aaf8390a --- /dev/null +++ b/First_Project_LAB/urls.py @@ -0,0 +1,22 @@ +"""First_Project_LAB 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,include + +urlpatterns = [ + path('admin/', admin.site.urls), + path('home/',include('firstApp.urls')) +] diff --git a/First_Project_LAB/wsgi.py b/First_Project_LAB/wsgi.py new file mode 100644 index 000000000..1b4f9c854 --- /dev/null +++ b/First_Project_LAB/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for First_Project_LAB 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', 'First_Project_LAB.settings') + +application = get_wsgi_application() diff --git a/db.sqlite3 b/db.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..f74d62706ed8ddb22b584c3e3bd0f1c0c7e3610d GIT binary patch literal 131072 zcmeI5TZ|*wS;t*=+3t(&)7PmcyEE-}Z|{uh?dkHh?O6ibJKLG*>}=2OT-c06RFv&% zPfdL3vE6e~B!oLN3EBV;M2Qq6SY9Fp!2=1PJS3422q8caKnW6;Ab46pN`gR;2Z+Qu zr%t)bWw*O`l9hH^fA7xeI_G@ntMB`rOVzo^zW&A)vtz_}o2|OuiD!IMK1uSu6p#CS zzBBY6`)hw*rWdjup?@XU^CnFh3imN@pft_mMv#pCc8r6#LuQFUDSu{vi6*=>2Fm@=oOK$WKS6C%-ZI zmc(0+ z8&72}sKpDJ+_;lgpsOx5JWRuID-zcQAxzyz_ zRbn?@)o#2_TRXbdP))g1E~{P+1$`@*Hr*H*Mas9{yw}64F}_^sFueI*WsZo7!$ouWIGnO|v|_vh$gos%AH3s)|w;s?v@sVHWMR zO{R93HMv5eP%Nkcs$!+5V#I)uJ)fgQbLn+IWlBr%0b$e#LJO#BUd?Vu6y1s!-N-v- zGnryhjgl|=Lgb#0{2Tcu`6{_bK23g=Jm?$J5CH)Y009sH0T2KI5C8!X009sH0T6g1 z0<)pOs>EjZt~I%Z=wx7Nj3@Hdwn!wfXhqp-4!zB+=T=HEkdZ2P^hUL5FFo$Y^=thRKv2GX9Hph`pJ(?0TD^5^95$=Atm&@?Q4IgItehU_O9J+R2zLHIMBeg|?~uPEe@4DW-lh?JKmY_l00ck)1V8`; zKmY_l00ck)1l}V8vmx1c`Wess|CyldTUmC^`P;7Rh%Ec&=h=w?Hvf+XXiQ--KL4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 zLu__;IukkF^r z-7TSKs@I~^L)$=4{K*;seXcYc8ryzzKN`jPBHC!1r8`Es!^ny^Fzcx)l3T_e-DR~O zyJ=5{rkjF|s-e~CORQd{`n|7kULelk!_GGSs0JRpWjNaH(^Kv{^j=K_#-j%`_DH7a zc58Yy5pUP^T8$phitjhtW|cmTdoL03i$(-482tRNIugcb#V% zH=!>jW+4u~>z%(y>KPkD@QN(bx5wY|@IEtS>trF@Mq2!H?xfB*=900@8p z2!H?xfWXsFAj({rdiwo<2Ot0fAOHd&00JNY0w4eaAOHd&00M^-VDtZl$j|!7Kaww# zUmzuNfka~e6#Ko{=VGncPV9VaCi)-Izl{D)^l|h?bUE@rk#9zRJMxGYzy}0C00ck) z1V8`;KmY_l00cY)5(`0}w6YeuXBzi4@iWsG^+ue<<0AgNLS>Sv5dA4pgZ}EaOUg>= z$(^#~#E%`i(&8*}eU=KR zUJMHJJmSK{z5+8=0b!@7fUwnFAURD7tmcBuV2?C2+AaF*6ct@OD|5@)FWL1>W|26d zxy!4vFxAc%HgbuWB_V9HC4^Bd`hh5wIK3h>W9)2Z1-m{Ip?OQm0KYr`5xL&&c`PwW z^HFt6 literal 0 HcmV?d00001 diff --git a/firstApp/__init__.py b/firstApp/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/firstApp/admin.py b/firstApp/admin.py new file mode 100644 index 000000000..8c38f3f3d --- /dev/null +++ b/firstApp/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/firstApp/apps.py b/firstApp/apps.py new file mode 100644 index 000000000..8ba0c2f55 --- /dev/null +++ b/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/firstApp/migrations/__init__.py b/firstApp/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/firstApp/models.py b/firstApp/models.py new file mode 100644 index 000000000..71a836239 --- /dev/null +++ b/firstApp/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/firstApp/tests.py b/firstApp/tests.py new file mode 100644 index 000000000..7ce503c2d --- /dev/null +++ b/firstApp/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/firstApp/urls.py b/firstApp/urls.py new file mode 100644 index 000000000..924316aac --- /dev/null +++ b/firstApp/urls.py @@ -0,0 +1,6 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.home, name='index'), +] diff --git a/firstApp/views.py b/firstApp/views.py new file mode 100644 index 000000000..1189c81dc --- /dev/null +++ b/firstApp/views.py @@ -0,0 +1,7 @@ +from django.shortcuts import render +from django.http import HttpResponse +# Create your views here. + +def home(request): + respon:str = "Hello World, This is my new HOME !" + return HttpResponse(respon) \ No newline at end of file diff --git a/manage.py b/manage.py new file mode 100755 index 000000000..75b1fc784 --- /dev/null +++ b/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', 'First_Project_LAB.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()