On 3/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Like the commentor before, I could not get this example to run.
> However, applying what he suggested, ie. specifying current_datetime
> as a string instead, it runs now.
Using a function directly, instead of a string, is included in
I had the same problem. And I couldnt solve it by what MIke SPralding
or gordy suggested. But here I found the solution
#
Arvind Jan 22nd, 2007 3 p.m. √
Passing a function as the second argument does not work. In fact,
the example in the book till now does not work, even if used word for
I figured it out, I left off
from mysite.views import current_datetime
On Feb 3, 8:50 am, "gordyt" <[EMAIL PROTECTED]> wrote:
> Howdy Mike,
>
> > def current_datetime(request):
> > now = datetime.datetime.now()
> > html = "It is now %s." % now
> > return
Howdy Mike,
> def current_datetime(request):
> now = datetime.datetime.now()
> html = "It is now %s." % now
> return HttpResponse(html)
>
> - then edit your urls.py to contain
>
> from django.conf.urls.defaults import *
>
> urlpatterns = patterns('',
>
in
resolve
160. for pattern in self.urlconf_module.urlpatterns:
File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py" in
_get_urlconf_module
177. self._urlconf_module = __import__(self.urlconf_name, {}, {},
[''])
NameError at /now/
name 'current_datetime' is not defined
What am I
5 matches
Mail list logo