-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheat-sheet.txt
More file actions
103 lines (84 loc) · 1.76 KB
/
cheat-sheet.txt
File metadata and controls
103 lines (84 loc) · 1.76 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Documentation : https://docs.djangoproject.com/en/4.0/
Tutorial: https://docs.djangoproject.com/en/4.0/intro/tutorial01/
- Creating a new project
django-admin startproject projectname
- Add an app to a project
python manage.py startapp appname
- Starting the Server
python manage.py runserver
- Creating migrations
python manage.py makemigrations
- Migrate the database
python manage.py migrate
- Creating a super user for the admin panel
python manage createsuperuser
- Collecting static files into one folder
python manage.py collectstatic
- Check Available commands from django-admin
$ django-admin --help
Type 'django-admin help <subcommand>' for help on a specific subcommand.
Available subcommands:
[django]
check
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
makemigrations
migrate
runserver
sendtestemail
shell
showmigrations
sqlflush
sqlmigrate
sqlsequencereset
squashmigrations
startapp
startproject
test
testserver
- Check Available commands from django project
$ python manage.py help
Type 'manage.py help <subcommand>' for help on a specific subcommand.
Available subcommands:
[auth]
changepassword
createsuperuser
[contenttypes]
remove_stale_contenttypes
[django]
check
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
makemigrations
migrate
sendtestemail
shell
showmigrations
sqlflush
sqlmigrate
sqlsequencereset
squashmigrations
startapp
startproject
test
testserver
[sessions]
clearsessions
[staticfiles]
collectstatic
findstatic
runserver