Create render_to_reponse and use it everywhere.

Just a shortcut for Response(render_template(...))
This commit is contained in:
Elrond
2011-06-05 15:25:45 +02:00
parent 99619a625b
commit 1c63ad5d35
6 changed files with 39 additions and 47 deletions

View File

@@ -15,9 +15,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from webob import Response, exc
from webob import exc
from mediagoblin.util import render_template
from mediagoblin.util import render_to_response
from mediagoblin.edit import forms
from mediagoblin.edit.lib import may_edit_media
from mediagoblin.decorators import require_active_login, get_user_media_entry
@@ -57,8 +57,7 @@ def edit_media(request, media):
user=media.uploader()['username'], media=media['slug']))
# render
return Response(
render_template(
return render_to_response(
request, 'mediagoblin/edit/edit.html',
{'media': media,
'form': form}))
'form': form})