I have update my django to 1.5 and I have one problem: in urls.py I have
urlpatterns += patterns('django.views.generic.simple',
(r'^$','direct_to_template', {'template': 'index.html'}),)
In 1.4 it works nice, but today it wrotes
"Could not import django.views.generic.simple.direct_to_template. Parent module django.views.generic.simple does not exist."
I searched in google - I find this, but it the same I have in code. Please, help
That direct_to_template()
function doesn't exist anymore.
Try this with a generic template view:
from django.conf.urls import patterns
from django.views.generic import TemplateView
urlpatterns = patterns('',
(r'^$', TemplateView.as_view(template_name="index.html")),
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With