Django IPython sqlite complains about naive datetime

前端 未结 3 641
清酒与你
清酒与你 2021-02-04 05:48

I have a new project in Django 1.4, using sqlite db. Also using django_extenstions\' shell_plus with no problems.

When I installed IPython, both shell and <

3条回答
  •  遇见更好的自我
    2021-02-04 06:03

    I put this in my local_settings.py:

    #ignore the following error when using ipython:
    #/django/db/backends/sqlite3/base.py:50: RuntimeWarning:
    #SQLite received a naive datetime (2012-11-02 11:20:15.156506) while time zone support is active.
    
    import warnings
    import exceptions
    warnings.filterwarnings("ignore", category=exceptions.RuntimeWarning, module='django.db.backends.sqlite3.base', lineno=53)
    

提交回复
热议问题