Wednesday, April 18, 2012

Re: cannot import name current_datetime

I have a feeling you want to do:
Import datetime not import current_datetime

On 4/18/12, asherakhet06 <francisco.demiranda@gmail.com> wrote:
> H all!
>
> I am fairly new to programming (went over LPTHW) and now going through the
> Djangobook on the internet. Quick beginners question: In Chapter 3, where
> I am looking at a dynamic webpage in the 2nd example I am running into some
> problems with the current_datetime function I am trying to set up. When, in
> views.py I insert the "datetime.datetime.now()" statement and "import
> current_datetime" into my urls.py file, I get the following error message
> when I try to call up the webpage via runserver. It seems like my pure
> python script is not being picked up by the server:
>
> "ImportError cannot import name current_datetime".
>
> I know this is most likely an easy question for most of you, but it's been
> a real puzzle for me to be honest:/ Anybody have any tips on how to solve
> this error? I know it is really important to be careful to copy EXACTLY as
> mentioned in the programming book(s), so I am pretty sure I am not making
> any spelling/character errors. I am using windows btw. I also have python
> 2.7 and django 1.4 installed on my computer. Anybody kind enough to help
> me out? Much appreciated!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/K5CG719gkDoJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

--
Sent from my mobile device

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate