diff options
Diffstat (limited to 'PYTHON/DJANGO.md')
| -rw-r--r-- | PYTHON/DJANGO.md | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/PYTHON/DJANGO.md b/PYTHON/DJANGO.md new file mode 100644 index 0000000..07d5ac8 --- /dev/null +++ b/PYTHON/DJANGO.md @@ -0,0 +1,36 @@ +```bash +python3 -V + +python3 -m venv venv + +. venv/bin/activate +# deactivate - выключить вирт окружение + +pip install --upgrade pip +pip install django + +django-admin startproject coolsite +cd coolsite +python3 manage.py runserver +# CTRL_C + +python3 manage.py startapp women +``` + +```python +# coolsite/settings.py +'women.apps.WomenConfig' + +# women/views.py +from django.http import HttpResponse + +def index(Request): #HttpRequest + return HttpResponse("Страница приложения women.") + +# coolsite/urls.py +from coolsite.women.views import index + +path('women/', index), + + +```
\ No newline at end of file |
