from django.shortcuts import render_to_response def render(template): def render_view(view): def data_to_render(request, *args, **keys): return render_to_response(template.replace('.', '/') + '.html', view(request, *args, **keys)) return data_to_render return render_view # Example: # @render('blog.article_list') # The template to use # def article_list(request): # return { # The data to render # 'article': Article.objects.all(), # 'url': 'http://garetjax.info/', # }