这是我的setupproject.py自定义命令
from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand):
def handle(self, *args, **kwargs):
print 111111111111111
当我以django-admin setupproject
执行时,我收到以下错误:
django.core.exceptions.ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
我做错了什么?
答案 0 :(得分:0)
./manage.py setupproject
我想。
也许你的settings.py