From 1e0b7a31bc41e72455e3447d78150ad0d7a44d7b Mon Sep 17 00:00:00 2001 From: EngReem <86748540+EngReem@users.noreply.github.com> Date: Mon, 25 Jul 2022 19:55:42 +0300 Subject: [PATCH 1/4] Create a.md --- a.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 a.md diff --git a/a.md b/a.md new file mode 100644 index 000000000..9c558e357 --- /dev/null +++ b/a.md @@ -0,0 +1 @@ +. From 10cdc89a9dff062f7284ed198f72890995583aa7 Mon Sep 17 00:00:00 2001 From: EngReem Date: Tue, 26 Jul 2022 10:10:47 +0300 Subject: [PATCH 2/4] test upload file --- txt.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 txt.txt diff --git a/txt.txt b/txt.txt new file mode 100644 index 000000000..e69de29bb From 5b8cd8ba86617b3884bf5cb43dc49d596b546b4e Mon Sep 17 00:00:00 2001 From: EngReem Date: Tue, 26 Jul 2022 10:13:09 +0300 Subject: [PATCH 3/4] deleted txt file --- a.md | 1 - txt.txt | 0 2 files changed, 1 deletion(-) delete mode 100644 a.md delete mode 100644 txt.txt diff --git a/a.md b/a.md deleted file mode 100644 index 9c558e357..000000000 --- a/a.md +++ /dev/null @@ -1 +0,0 @@ -. diff --git a/txt.txt b/txt.txt deleted file mode 100644 index e69de29bb..000000000 From 32ba8d81b9beaf21dc14d262bd961be5ad3caa7b Mon Sep 17 00:00:00 2001 From: EngReem Date: Tue, 26 Jul 2022 10:45:04 +0300 Subject: [PATCH 4/4] solved --- .gitignore | 1 + labProject/db.sqlite3 | 0 labProject/hello/__init__.py | 0 .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 174 bytes .../hello/__pycache__/admin.cpython-310.pyc | Bin 0 -> 215 bytes .../hello/__pycache__/apps.cpython-310.pyc | Bin 0 -> 451 bytes .../hello/__pycache__/models.cpython-310.pyc | Bin 0 -> 212 bytes .../hello/__pycache__/views.cpython-310.pyc | Bin 0 -> 447 bytes labProject/hello/admin.py | 3 + labProject/hello/apps.py | 6 + labProject/hello/migrations/__init__.py | 0 .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 185 bytes labProject/hello/models.py | 3 + labProject/hello/tests.py | 3 + labProject/hello/views.py | 9 ++ labProject/labProject/__init__.py | 0 .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 179 bytes .../__pycache__/settings.cpython-310.pyc | Bin 0 -> 2321 bytes .../__pycache__/urls.cpython-310.pyc | Bin 0 -> 1035 bytes .../__pycache__/wsgi.cpython-310.pyc | Bin 0 -> 588 bytes labProject/labProject/asgi.py | 16 +++ labProject/labProject/settings.py | 124 ++++++++++++++++++ labProject/labProject/urls.py | 23 ++++ labProject/labProject/wsgi.py | 16 +++ labProject/manage.py | 22 ++++ 25 files changed, 226 insertions(+) create mode 100644 .gitignore create mode 100644 labProject/db.sqlite3 create mode 100644 labProject/hello/__init__.py create mode 100644 labProject/hello/__pycache__/__init__.cpython-310.pyc create mode 100644 labProject/hello/__pycache__/admin.cpython-310.pyc create mode 100644 labProject/hello/__pycache__/apps.cpython-310.pyc create mode 100644 labProject/hello/__pycache__/models.cpython-310.pyc create mode 100644 labProject/hello/__pycache__/views.cpython-310.pyc create mode 100644 labProject/hello/admin.py create mode 100644 labProject/hello/apps.py create mode 100644 labProject/hello/migrations/__init__.py create mode 100644 labProject/hello/migrations/__pycache__/__init__.cpython-310.pyc create mode 100644 labProject/hello/models.py create mode 100644 labProject/hello/tests.py create mode 100644 labProject/hello/views.py create mode 100644 labProject/labProject/__init__.py create mode 100644 labProject/labProject/__pycache__/__init__.cpython-310.pyc create mode 100644 labProject/labProject/__pycache__/settings.cpython-310.pyc create mode 100644 labProject/labProject/__pycache__/urls.cpython-310.pyc create mode 100644 labProject/labProject/__pycache__/wsgi.cpython-310.pyc create mode 100644 labProject/labProject/asgi.py create mode 100644 labProject/labProject/settings.py create mode 100644 labProject/labProject/urls.py create mode 100644 labProject/labProject/wsgi.py create mode 100644 labProject/manage.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..b694934fb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.venv \ No newline at end of file diff --git a/labProject/db.sqlite3 b/labProject/db.sqlite3 new file mode 100644 index 000000000..e69de29bb diff --git a/labProject/hello/__init__.py b/labProject/hello/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/labProject/hello/__pycache__/__init__.cpython-310.pyc b/labProject/hello/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..40b111e3db57df199a6331405298f45e0d889a00 GIT binary patch literal 174 zcmd1j<>g`kfT*Dauyi}K>%(B!Nm(=3ylKg@gm#oCR^!ymN%%b8F-GHL}tkmR^n4H8U7&9X^ lCnrB9K0Y%qvm`!Vub}c4hfQvNN@-529muL;CLqDW008}PEmr^l literal 0 HcmV?d00001 diff --git a/labProject/hello/__pycache__/admin.cpython-310.pyc b/labProject/hello/__pycache__/admin.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..49d3d3675d96990b39043a7112c51d28f8812906 GIT binary patch literal 215 zcmd1j<>g`kf#~=v@#i>QbF-2u% zxrQtmJ}xrc2Wsecm%{d@Jd-2 zn0N)mz&Rp0TsXMTu7yK zBk;5@Ryr7qHVsMD*=*;y#&Z)m_WvwR)PY(R QoHR?Fx)WL_*hPKv3sZM literal 0 HcmV?d00001 diff --git a/labProject/hello/__pycache__/models.cpython-310.pyc b/labProject/hello/__pycache__/models.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..90100cf5e7d490d8e0b11c25dedce5f9d7840225 GIT binary patch literal 212 zcmd1j<>g`kfv@#i>QbF-2u%xrQS5YFbOEw+W?6GU$T4R{q1p;daZ6@L)IUfS+zQj=_)*{0O1K7_B}E5(Bc zPriaDXVVHDcIKOJ*qQxyRJXfhk%jMH(@(;0L$=K!az>6J1z`!6S{aKNGr67GnG-pg z8@a?C={(rN72ca0d7^P+1w{#K;}Y1U{~#-*2T4aUP#ncXHBqBIm)UD>++15 zu8o=8ChwDDi-INzuZ)Jmre0lEg1q@v3BJc=4 zENBq?j{3*^4kaLmvdoV7IF|!RO34QjpR_9YU_Qwo6~9OT_2Ct$xtwX9PNx59Y#!!i zB9|BztIDf+lSZQv+p@t(9R-c3C+bNd#tQUop%Ki5s=X=4v<)yTu2t4uwZg4nrdF+! TOo>G*Pt88i{Gns@*sk{nEp}_S literal 0 HcmV?d00001 diff --git a/labProject/hello/admin.py b/labProject/hello/admin.py new file mode 100644 index 000000000..8c38f3f3d --- /dev/null +++ b/labProject/hello/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/labProject/hello/apps.py b/labProject/hello/apps.py new file mode 100644 index 000000000..bfc55f030 --- /dev/null +++ b/labProject/hello/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class HelloConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'hello' diff --git a/labProject/hello/migrations/__init__.py b/labProject/hello/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/labProject/hello/migrations/__pycache__/__init__.cpython-310.pyc b/labProject/hello/migrations/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c762cc8e82cff63a2720f77ecaf75e8e4dfd95d6 GIT binary patch literal 185 zcmd1j<>g`kfT*Dauyi}K>%(B!Nm(=3ylKg@gm#oCR^!ymN%%b8F-GHL}tkmR^n4H8U7&9X^ wCnrB9H#5B`u_QA;uQ(TZlX-=vg$kt*eAi=@_07VNi`v3p{ literal 0 HcmV?d00001 diff --git a/labProject/hello/models.py b/labProject/hello/models.py new file mode 100644 index 000000000..71a836239 --- /dev/null +++ b/labProject/hello/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/labProject/hello/tests.py b/labProject/hello/tests.py new file mode 100644 index 000000000..7ce503c2d --- /dev/null +++ b/labProject/hello/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/labProject/hello/views.py b/labProject/hello/views.py new file mode 100644 index 000000000..d9707cea0 --- /dev/null +++ b/labProject/hello/views.py @@ -0,0 +1,9 @@ +from django.shortcuts import render +from django.http import HttpRequest, HttpResponse + +# Create your views here. + + +def hello(request : HttpRequest): + + return HttpResponse("Hello World, This is my new HOME !") \ No newline at end of file diff --git a/labProject/labProject/__init__.py b/labProject/labProject/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/labProject/labProject/__pycache__/__init__.cpython-310.pyc b/labProject/labProject/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..83986516a503ebc539052a61253103458db14e69 GIT binary patch literal 179 zcmd1j<>g`kg8x(RCxPh4AOaaM0yz#qT+9L_QW%06G#UL?G8BP?5yY=BXRDad;?$zz zn4+?>T*Dauyi}K>%(B!Nm(=3ylKg@gm#oCR^!ymN%%b8F-GHL}tkmR^n4H8UEX?@$ f%)HE!_;|g7%3B;Zx%nxjIjMFa`-+)>1PcQI{2DJ% literal 0 HcmV?d00001 diff --git a/labProject/labProject/__pycache__/settings.cpython-310.pyc b/labProject/labProject/__pycache__/settings.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..90d63ff1dc561fc2461874e19c38813ed6804367 GIT binary patch literal 2321 zcmb7FOK;mo5GHBr5yeUzJFmuQ!5q?5X-(BgniN5ih8Af@jU);tWw(S7g3_+!RrpZ2 zOF8DXKcbf$+8he>FY(etPet!N6h+e^CEJ1=pe`luE_Y_Wnf-QVHz=1&96W#g@N2J9 z=D6R|kNGDLA5Y<>KSP5!i$gpTT;3Bbf#G@liCAaI6Y zacj|n!N&B{?Vwif0K0Ag;cd*6Jc5vm51kOp*>VXxl8toTFle60;s=YEvnb>_dt*8` zXH_}t1UB3Ye7Tl&|Dj65fn0-TkKn^O)kh1lIKbh29145`eWah|7Jx(O6q%% zQ?ldx3(6-%zQ^ELRuPlJmQs7JwNy(~>$^r$RN8Gj8x{1nS=U=eygtX-AsrIg8IOVM zY$KBb!UHFA*-3(<-YJFjl}i}DAD3WqHm(RsUTf{tTUsKvl%^IIq0HlF3$bU}Gj=FF z3_@hXQ9@AWPVP_~DlDzth+%_x#C6i5*qdquVf^I0NKN7sFY+4LAF_i}`>)SyKP{H_ zEXGrSr{@J|MIH`G|13fd`x_CpmO5rFF2I2gMN^GGoWTN4r7)}#+oR=w-v+K*LPKWPifRas6!5x z8%k@ZqwHvQO;-QKQi z4fPi;{0Lacn!omHkGp9C(QY`Ic$;0_$7)C>xT|9N5^lP#n$>!Dn}n2Yw5RuR_cZ(G zhsQUfJU&W_U%{3{E`9>HJV(EQM&y>4SC+(rxFib2T(KmU1X17xz9(zGDb}%be9rfM=Nz%W9|5zzefd6n)dAp#J+xO~4$sY}&dr8E z29Sq*>M=j_J!^MphXq-{!Yp*>fbL~o9H0>UtKRCtop0Bmwt|28#Ln+o8EBin}E#QXW zPbz_DLP91ahJ??BWG)1(C@vI+3gdAE&01<*sd1VjQK|&33ce84Hh)qImSUbhP9COO zRHRg?bxuusl}0Z=7tF*`Za~JVFIlwe&(4B>cDIP7#tpYJ#XL-yx#9WL6<}( literal 0 HcmV?d00001 diff --git a/labProject/labProject/__pycache__/wsgi.cpython-310.pyc b/labProject/labProject/__pycache__/wsgi.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..42202c4334ba8a048075597c88a4e07059b45d88 GIT binary patch literal 588 zcmYjP!EO^V5cO`-rYsay0&(^=65TBlrwSn|wvB>Hf=DZ*Xr+z2o@^Yvo|WxxX|H?( zMFMq!LxcC|n^0Rd|rR$wnewhQWIGGY2 z@K6TRz}t=ttIo6&5D1ptZ(F>}w{Ao4bv~2nHV-GHzkTDP50k-=7O3W;q;u3%vWs^b zmrz(*uWcMfLrdXPjRp+03!v*9CjDIrlo`rsh5S;&zJvxOZI~9TkYW{ZI-9Y&mZD%* zpqkBmy%P^qp$00H$E;QXipm!khR%hAr_=yM3u|k0m?Rtv6Z0igCI07BV3mMMp2r8t z0!`cJ4h0ABIu*7eVp6FaQ7m literal 0 HcmV?d00001 diff --git a/labProject/labProject/asgi.py b/labProject/labProject/asgi.py new file mode 100644 index 000000000..3dfc1900b --- /dev/null +++ b/labProject/labProject/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for labProject 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', 'labProject.settings') + +application = get_asgi_application() diff --git a/labProject/labProject/settings.py b/labProject/labProject/settings.py new file mode 100644 index 000000000..179f42be2 --- /dev/null +++ b/labProject/labProject/settings.py @@ -0,0 +1,124 @@ +""" +Django settings for labProject 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-a4og!pxzzx^vjmfz3emg*!%z1@5evm771augnnjapf1cu&^el%' + +# 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', + 'hello', +] + +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 = 'labProject.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 = 'labProject.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/labProject/labProject/urls.py b/labProject/labProject/urls.py new file mode 100644 index 000000000..afb0e80dc --- /dev/null +++ b/labProject/labProject/urls.py @@ -0,0 +1,23 @@ +"""labProject 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 +import hello.views +urlpatterns = [ + path('admin/', admin.site.urls), + path('home/', hello.views.hello), +] \ No newline at end of file diff --git a/labProject/labProject/wsgi.py b/labProject/labProject/wsgi.py new file mode 100644 index 000000000..5908776ee --- /dev/null +++ b/labProject/labProject/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for labProject 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', 'labProject.settings') + +application = get_wsgi_application() diff --git a/labProject/manage.py b/labProject/manage.py new file mode 100644 index 000000000..eb1898a7a --- /dev/null +++ b/labProject/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', 'labProject.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()