[問題] Django如何創立superuser
Django 1.3, Python 2.7
第一次要Installed APP時有跑出提示來,那時我按no
現在需要建一個了,Django網站提供兩個方法,我都失敗
https://docs.djangoproject.com/en/dev/topics/auth/#creating-superusers
http://www.djangobook.com/en/2.0/chapter06/
第一個是在Installed APP裡輸入'django.contrib.auth'
==> manage.py syncdb ==> manage.py createsuperuser
但我在manage.py syncdb後,manage.py 裡面也沒有出現createsuperuser這個指令
,也當然就無法啟用
第二個是說到指定目錄運行
/path/to/django/contrib/auth/create_superuser.py
我照做了,但出現下面錯誤
Traceback (most recent call last): File
"C:\Python27\Lib\site-packages\django\contrib\auth\create_superuser.py", line
8, in <module> call_command("createsuperuser") File
"C:\Python27\lib\site-packages\django\core\management\__init__.py", line 155,
in call_command raise CommandError("Unknown command: %r" % name)
django.core.management.base.CommandError: Unknown command: 'createsuperuser'
看了很多網站,還是找不到方法,><,還請各位幫幫忙,感謝!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.32.115.169
→
09/07 23:08, , 1F
09/07 23:08, 1F
→
09/07 23:08, , 2F
09/07 23:08, 2F
→
09/07 23:09, , 3F
09/07 23:09, 3F
※ 編輯: Jason1122 來自: 114.32.115.169 (09/07 23:09)
→
09/07 23:13, , 4F
09/07 23:13, 4F
→
09/07 23:13, , 5F
09/07 23:13, 5F
→
09/07 23:14, , 6F
09/07 23:14, 6F
推
02/27 15:45, , 7F
02/27 15:45, 7F
Python 近期熱門文章
PTT數位生活區 即時熱門文章