일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- error
- pie charts
- data distribution
- Text mining
- PROJECT
- MySQL
- machine learning
- __init__
- self parameter
- matplotlib.pyplot
- PANDAS
- break
- Else
- continue
- Default X points
- Github
- train/test
- start exercise
- iterates
- Python
- variables
- AS
- multiple lines
- matplotlib
- For loops
- Text Analytics
- SQL
- line width
- line color
- polynomial regression
- Today
- Total
Data Science Explorer
Django Common Command Words That You Must Know 본문
Django Project Set-up
- Create a new Django project
This command will create a new Django project with the given project name.
django-admin startproject <project_name>
- Create an app
This command will create a new Django application within the project directory.
django-admin startapp <app_name>
Development and Testing
- Run the development server
This command will start the development server for your Django project.
python manage.py runserver
Database Tasks
- Prepare the database for migrations
This command will prepare the database for migrations for your Django project.
python manage.py makemigrations
- Make the database migrations
This command will run any pending database migrations for your Django project.
python manage.py migrate
- Show previous migrations
This command will show you the list of previous migrations for each app within your project.
python manage.py showmigrations
- Unapply migrations
This command will help revert back to a previously migrated version.
- Tip: use the "showmigrations" command to see the previous migrations.
python manage.py migrate [app_name] [migration_name]
Admin tasks
- Create a superuser
This command will create a new superuser account for your Django project. If the password is too common, Django will give a prompt but allow you to override it.
python manage.py createsuperuser
- Change user password
This command will change the password of a given user.
python manage.py changepassword [username]
Testing
- Run test
This command will run the Django test suite based on tests defined in the test.py file within your project/app.
python manage.py runtests
'Django' 카테고리의 다른 글
How Django Works (0) | 2023.08.03 |
---|---|
What is Django? (0) | 2023.08.02 |