On Tue, Aug 22, 2006 at 06:20:14AM -0700, Tim Shaffer wrote:
> It looks like some of your views are very simple and could use generic
> views, if you wanted.
>
> def home(request):
> return render_to_response('home.html')
>
> could use django.views.generic.simple.direct_to_template
I was leaving room for making that a more complex view later, but I may
never get to that.
> def entry(request, entry_id):
> e = get_object_or_404(Entry, pk=entry_id)
> return render_to_response('blog/entry.html', { 'entry': e })
>
> could use django.views.generic.list_detail.object_detail
I do. I probably can remove all of those views.
Nate
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---