Re: Runtime warning about a naive datetime when running the test command

2014-11-17 Thread Daniel Grace
On Monday, 17 November 2014 11:33:40 UTC, Bruno Barcarol Guimarães wrote: > > > $ python -W error manage.py test > > Hi Bruno, I get another warning / error with that command: >python -W error manage.py test flow Traceback (most recent call last): File "manage.py", line 8, in from django.c

Re: Runtime warning about a naive datetime when running the test command

2014-11-17 Thread André Castilho Manzano
Daniel, I remember doing a function to handle naive date, it was something like that. def ConvertDateFormat(date): hour = " 00:00:00" NaiveDate = str(date) + hour NewDate = datetime.strptime(NaiveDate , '%d/%m/%Y %H:%M:%S').replace(tzinfo=utc) return NewDate PS: I also noticed th

Re: Runtime warning about a naive datetime when running the test command

2014-11-17 Thread Bruno Barcarol Guimarães
Hi Daniel. The problem is you're probably generating a naive datetime at some point in your code. The best way to solve this is to run the tests with $ python -W error manage.py test That way an exception will be raised instead of a warning. From there you can probably figure out where it is co

Re: Runtime warning about a naive datetime when running the test command

2014-11-16 Thread Daniel Grace
Is this a bug in the Django tester? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email

Re: Runtime warning about a naive datetime when running the test command

2014-11-16 Thread Daniel Grace
I understand the problem. Why doesn't the Django tester provide time zone aware date times? I know if I set "USE_TZ = False" the warnings will disappear. I was looking for another solution. Could I conditionally set "USE_TZ = False" only when testing? -- You received this message because y

Re: Runtime warning about a naive datetime when running the test command

2014-11-15 Thread André Castilho Manzano
be used in another country (different timezone) you could disable it. On 15 Nov 2014 12:22, "Daniel Grace" wrote: > Hi, > I get a runtime warning about a naive datetime when running the test > command: > >python manage.py test flow > > Creating test database for alias

Re: Runtime warning about a naive datetime when running the test command

2014-11-15 Thread Aliane Abdelouahab
i think it is the same problem here (which has the solution) http://stackoverflow.com/a/20106079/861487 Le samedi 15 novembre 2014 15:22:18 UTC+1, Daniel Grace a écrit : > > Hi, > I get a runtime warning about a naive datetime when running the test > command: > >python m

Runtime warning about a naive datetime when running the test command

2014-11-15 Thread Daniel Grace
Hi, I get a runtime warning about a naive datetime when running the test command: >python manage.py test flow Creating test database for alias 'default'... C:\landy\lib\site-packages\django\db\models\fields\__init__.py:1278: RuntimeWarn ing: DateTimeField Flow.created received a n