diff options
| author | vlapa <vlapa@ya.ru> | 2026-06-13 20:33:26 +0300 |
|---|---|---|
| committer | vlapa <vlapa@ya.ru> | 2026-06-13 20:33:26 +0300 |
| commit | e5abc1fe99340b979b18864d978179f71fe8f5c5 (patch) | |
| tree | 98fd0ad7c6d0744894d6e74e446daacd9e6dd1b5 /PYTHON/DJANGO.md | |
First
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 |
