blob: 07d5ac8b4267b3b3dfb77086a64e21938577a376 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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),
```
|