-
Notifications
You must be signed in to change notification settings - Fork 0
/
help_cmd.txt
45 lines (31 loc) · 918 Bytes
/
help_cmd.txt
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
37
38
39
40
41
42
43
44
45
- Create venv command:
python -m venv venv
- Activate venv:
Linux: source venv/bin/activate
Mac: source venv/bin/activate
Win: source venv/Scripts/activate
- Install Django:
pip install Django==4.2.3
- Check Django version:
python -m django --version
- Create Django project:
django-admin startproject config .
- Create new Django aplication:
python manage.py startapp app_name
- Create requirements.txt automatically:
pip freeze > requirements.txt
- Install all packages using requirements.txt:
pip install -r requirements.txt
- Start server in local host:
python manage.py runserver
- Apply the migrations for apps
python manage.py migrate
- Open python file using terminal:
python manage.py shell
- Create super user:
python manage.py createsuperuser
- Create model:
python manage.py makemigrations my_app
Install all models:
- Django: pip install Django
- django-cleanup: pip install django-cleanup