Django Tutorial - ImproperlyConfigured exception (pytz isn't installed)

后端 未结 4 1494
礼貌的吻别
礼貌的吻别 2021-02-13 23:55

I\'m currently working through the official Django tutorial using version 1.6.1 and version 2.7.5 of python on OSX. I\'m working on part 2, which is the admin interface. When I

相关标签:
4条回答
  • 2021-02-14 00:25

    After continuing to search for django and pytz, I found the 1.6 Django release notes, which mention that you must now install pytz to work with Sqlite3 if USE_TZ=True in your settings.py.

    I don't know what effect USE_TZ has on your application, but setting that value to False allows me to proceed in the tutorial. I would hope that the Django tutorial is updated to reflect this change.

    0 讨论(0)
  • 2021-02-14 00:27

    The solution is very simple..

    pip install pytz
    

    and then stop and restart your server

    0 讨论(0)
  • 2021-02-14 00:37

    I was also getting the same error. I installed pytz

    $ pip install pytz
    

    and then i restarted the server. The exception is no more now.

    0 讨论(0)
  • 2021-02-14 00:46

    I had same error, then I installed pytz with pip install pytz and again had same error until I restarted WSGI instance. (eg. touching wsig.py (touch wsgi.py) or restarting apache (apache2ctl restart)

    0 讨论(0)
提交回复
热议问题