Sound good! Usually project is not so simple (only url.py + settings.py) 2012/4/4 Javier Guerra Giraldez <jav...@guerrag.com>: > On Wed, Apr 4, 2012 at 4:14 AM, Sergiy Khohlov <skhoh...@gmail.com> wrote: >> As result your views.py should be : >> >> from django.views.generic import TemplateView >> # Create your views here. >> class HomeView(TemplateView): >> template_name='home.html' >> >> Only three lines of the code ! >> You dont need more! > > if in urls.py you replace > > (r'^$', login_required(HomeView.as_view())), > > with > (r'^$', login_required(TemplateView(template_name='home.html').as_view())), > > > you don't need any HomeView class! > > > -- > Javier > > -- > 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. >
-- 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.