manage.py:コマンドセンター
manage.pyで実行する日常的なコマンドを学びます
「manage.py:コマンドセンター」はCoddyKit上の無料Django Academyレッスンです。 これはレッスン4/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはDjango Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Django Academyコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
Your Project's Remote Control
The manage.py file is the command center for your project. You run almost every Django task by calling it from the terminal. 🎮
It Knows Your Settings
Unlike the bare django-admin tool, manage.py already points at your settings.py. That is why commands just work inside your project.
The Basic Shape
Every command follows one pattern: python manage.py followed by the command name and any options you need.
python manage.py <command>Start the Dev Server
The runserver command launches a local server so you can view your site in the browser while you build.
python manage.py runserverPlan Schema Changes
The makemigrations command turns model edits into migration files that describe how your database should change.
python manage.py makemigrationsApply Those Changes
The migrate command runs your migrations against the database, actually creating or updating the tables.
python manage.py migrateCreate an Admin User
The createsuperuser command makes an account that can log into Django's admin site and manage your data.
python manage.py createsuperuserOpen the Live Shell
The shell command opens an interactive Python session with your project loaded, perfect for testing queries on the fly.
python manage.py shellMake a New App
You already met startapp, which also runs through manage.py. It scaffolds a fresh app folder inside your project.
python manage.py startapp shopDiscover Every Command
Run help to list all available commands, including ones added by your installed apps. It is a great way to explore.
python manage.py helpYou Can Add Your Own
Apps can define custom management commands too. Once added, they run through manage.py exactly like the built-in ones.
Quick Check
Which command actually applies migrations to the database?
Recap: Commands at Your Fingertips
You learned that manage.py drives your project: runserver, makemigrations, migrate, createsuperuser, shell, and more. It is your daily toolkit. 🚀
よくある質問
「manage.py:コマンドセンター」レッスンは無料ですか?
はい。「manage.py:コマンドセンター」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Django Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Django Academyコースには全4レッスンが含まれています。
「manage.py:コマンドセンター」で何を学びますか?
manage.pyで実行する日常的なコマンドを学びます ブラウザで直接実行するハンズオンコードでDjango Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
Django Academyを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのDjango Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン4/4です。
「manage.py:コマンドセンター」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このDjango Academyレッスンでコードを書いて実行できますか?
はい。すべてのDjango Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- startappとアプリフォルダーの構成
- INSTALLED_APPSにアプリを登録する
- settings.pyを見て回る
- manage.py:コマンドセンター