On Wed, Feb 15, 2012 at 10: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 probably have some sort of namespace collision. Look for circular imports or import modules with the same name etc. -- 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.