python:django:create_table_superuser

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
python:django:create_table_superuser [2016/01/11 11:37] – [スーパーユーザーの作成 (manage.py createsuperuser)] ともやんpython:django:create_table_superuser [2020/03/29 17:13] (現在) ともやん
行 1: 行 1:
 +<html>
 +  <style>
 +    #result pre, #mincode pre {
 +      /*height: 300px;*/
 +      overflow: scroll;
 +      overflow-x: hidden;
 +      font-size: 10px;
 +    }
 +    #mintbl table {
 +      font-size: 12px;
 +    }
 +    .dokuwiki .plugin_wrap table {
 +      width: auto;
 +    }
 +  </style>
 +</html>
 ====== テーブルとスーパーユーザーの作成 (manage.py migrate, createsuperuser) ====== ====== テーブルとスーパーユーザーの作成 (manage.py migrate, createsuperuser) ======
  
行 6: 行 22:
 $ python manage.py migrate $ python manage.py migrate
 </code> </code>
 +<WRAP prewrap 100% #result>
 <code> <code>
 Operations to perform: Operations to perform:
-  Apply all migrations: admin, contenttypes, auth, sessions+  Apply all migrations: admin, auth, contenttypes, sessions
 Running migrations: Running migrations:
-  Rendering model states... DONE 
   Applying contenttypes.0001_initial... OK   Applying contenttypes.0001_initial... OK
   Applying auth.0001_initial... OK   Applying auth.0001_initial... OK
   Applying admin.0001_initial... OK   Applying admin.0001_initial... OK
   Applying admin.0002_logentry_remove_auto_add... OK   Applying admin.0002_logentry_remove_auto_add... OK
 +  Applying admin.0003_logentry_add_action_flag_choices... OK
   Applying contenttypes.0002_remove_content_type_name... OK   Applying contenttypes.0002_remove_content_type_name... OK
   Applying auth.0002_alter_permission_name_max_length... OK   Applying auth.0002_alter_permission_name_max_length... OK
行 22: 行 39:
   Applying auth.0006_require_contenttypes_0002... OK   Applying auth.0006_require_contenttypes_0002... OK
   Applying auth.0007_alter_validators_add_error_messages... OK   Applying auth.0007_alter_validators_add_error_messages... OK
 +  Applying auth.0008_alter_user_username_max_length... OK
 +  Applying auth.0009_alter_user_last_name_max_length... OK
 +  Applying auth.0010_alter_group_name_max_length... OK
 +  Applying auth.0011_update_proxy_permissions... OK
   Applying sessions.0001_initial... OK   Applying sessions.0001_initial... OK
 </code> </code>
 +</WRAP>
  
 ===== スーパーユーザーの作成 (manage.py createsuperuser) ===== ===== スーパーユーザーの作成 (manage.py createsuperuser) =====
行 29: 行 51:
 $ python manage.py createsuperuser $ python manage.py createsuperuser
 </code> </code>
 +<WRAP prewrap 100% #result>
 <code> <code>
-Username (leave blank to use 'tomoyan'): <- ユーザー名 or Enter を入力 +ユーザー名 (leave blank to use 'tomoyan'): <- ユーザー名 or Enter を入力 
-Email address: tomoyan@tomoyan.net <- Eメールアドレスを入力+メールアドレス: tomoyan@tomoyan.net <- Eメールアドレスを入力
 Password: <- パスワードを入力 Password: <- パスワードを入力
 Password (again): <- 確認パスワードを入力 Password (again): <- 確認パスワードを入力
 Superuser created successfully. Superuser created successfully.
 </code> </code>
 +</WRAP>
  
 ===== 管理サイトの動作確認 ===== ===== 管理サイトの動作確認 =====
行 42: 行 66:
 $ python manage.py runserver $ python manage.py runserver
 </code> </code>
-http://127.0.0.1:8000/admin/ にアクセスしてログイン画面が表示される。 +<WRAP prewrap 100% #result> 
-{{:python:django:django_login_001.png?300|}}+<code> 
 +Watching for file changes with StatReloader 
 +Performing system checks... 
 + 
 +System check identified no issues (0 silenced). 
 +March 29, 2020 - 17:05:57 
 +Django version 3.0.4, using settings 'django_project.settings' 
 +Starting development server at http://127.0.0.1:8000/ 
 +Quit the server with CTRL-BREAK. 
 +</code> 
 +</WRAP> 
 +\\ 
 +http://127.0.0.1:8000/admin/ にアクセスしてログイン画面が表示される。\\ 
 +{{:python:django:django_3.0_login_001.png?250|Django 3.0 ログイン}}\\ 
 +\\ 
 +スーパーユーザーでログインすると管理サイトが表示される。\\ 
 +{{:python:django:django_3.0_manage_site_001.png?600|Django 3.0 管理サイト}}\\
  
  • python/django/create_table_superuser.1452479875.txt.gz
  • 最終更新: 2019/05/18 02:23
  • (外部編集)