CMD Operations Flashcards

1
Q

creating a new project

A

django-admin startproject projectname

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

starting the server

A

python manage.py runserver

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

creating a new app

A

python3 manage.py startapp appname

then add the app into setting.py
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'new_app',
]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

database related

A

python manage.py makemigrations

python manage.py migrate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

admin create

A

python manage.py createsuperuser
username
email
pw

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

admin change pw

A

python manage.py changepassword

How well did you know this?
1
Not at all
2
3
4
5
Perfectly