Can you reply with the actual NameError Exception? Like: NameError: globalname 'datetime' is not defined, or whatever it is. From the module that is throwing this error are you importing anything else that is importing an overridden date method or datetime object?
You can also try this (instead of "import datetime"): from datetime import date On Wed, Feb 15, 2012 at 7:48 PM, Scott <hacktori...@gmail.com> wrote: > Hello, > I'm having a strange issue and have already spent an hour trying to > figure it out. > > I created a python app called mn. Then I setup all my models and > stuff to work under mn.hcp. Everything has been working fine until I > tried to use date time in a py file in the hcp directory. > > I've imported datetime, with import date time at the top of my py > file. Then within the file I have a class with an internal method > trying to use some date functions. > > datetime.date(2003,11,11) > > For some reason I am getting a NameError on the datetime object. I > don't understand why this is happening after I've imported datetime. > Any help would be appreciated. Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.