[Answer]-How to direct to a webpage in urls.py without using a view

1👍

As per Django documentation:

This would be a proper way of doing it:

from django.conf.urls import patterns
from django.views.generic import TemplateView

urlpatterns = patterns('',
    (r'^about/', TemplateView.as_view(template_name="about.html")),
)

Leave a comment