0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[メモ] Django Admin 管理者作成のワンライナー

Last updated at Posted at 2021-08-16
本シリーズのトップページ
https://qiita.com/robozushi10/items/4559a281d0319eb62c6c

内容

python manage.py createsuperuser」での登録処理のワンライナー.

「参考サイト」のそのまま転載となり申し訳ない.
が、echo で送り付ける内容を変更してやれば応用が利く.

$ echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'admin@example.com', 'admin')" | python manage.py shell"

参考サイト

URL
https://stackoverflow.com/questions/6244382/how-to-automate-createsuperuser-on-django
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?