Python论坛  - 讨论区

标题:[python-chinese] django中关于admin帐户问题

2007年02月27日 星期二 10:34

俊杰蔡 yzcaijunjie在gmail.com
星期二 二月 27 10:34:44 HKT 2007

Èç¹ûÔÚ¿ªÊ¼ python manage.py syncdb£¬Ã»Óд´½¨superuser£¬°´ÕÕ˵Ã÷¿ÉÒÔͨ¹ý
django/contrib/auth/create_superuser.pyÀ´´´½¨£¬µ«Óöµ½ÕâÑùµÄ´íÎó£º

Traceback (most recent call last):
>   File "/home/cjj/Python/Django-0.95.1/django/contrib/auth/create_superuser.py",
> line 8, in ?
>     from django.core import validators
>   File "/usr/lib/python2.4/site-packages/Django-0.95.1-py2.4.egg/django/core/validators.py",
> line 12, in ?
>     from django.utils.translation import gettext, gettext_lazy, ngettext
>   File "/usr/lib/python2.4/site-packages/Django-0.95.1-py2.4.egg/django/utils/translation/__init__.py",
> line 3, in ?
>     if settings.USE_I18N:
>   File "/usr/lib/python2.4/site-packages/Django-0.95.1-py2.4.egg/django/conf/__init__.py",
> line 27, in __getattr__
>     self._import_settings()
>   File "/usr/lib/python2.4/site-packages/Django-0.95.1-py2.4.egg/django/conf/__init__.py",
> line 52, in _import_settings
>     raise EnvironmentError, "Environment variable %s is undefined." %
> ENVIRONMENT_VARIABLE
> EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is
> undefined.


ÇëÎÊÓÐʲô°ì·¨ÄÜÖØÐÂÔö¼ÓadminÕÊ»§Ã´£¿
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070227/6e776a5f/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年02月27日 星期二 11:14

limodou limodou在gmail.com
星期二 二月 27 11:14:27 HKT 2007

> 请问有什么办法能重新增加admin帐户么?
>

manage.py shell
>>> from django.contrib.auth.create_superuser import createsuperuser
>>> createsuperuser()

-- 
I like python!
UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年02月27日 星期二 14:00

俊杰蔡 yzcaijunjie在gmail.com
星期二 二月 27 14:00:19 HKT 2007

·Ç³£¸Ðл£¬Ìí¼Ó³É¹¦

2007/2/27, limodou <limodou在gmail.com>:
>
> > ÇëÎÊÓÐʲô°ì·¨ÄÜÖØÐÂÔö¼ÓadminÕÊ»§Ã´£¿
> >
>
> manage.py shell
> >>> from django.contrib.auth.create_superuser import createsuperuser
> >>> createsuperuser()
>
> --
> I like python!
> UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad
> My Blog: http://www.donews.net/limodou
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070227/1a67a0bc/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号