diff --git a/confirmation/views.py b/confirmation/views.py index 9cf20d24b4..c61ed4ba60 100644 --- a/confirmation/views.py +++ b/confirmation/views.py @@ -5,12 +5,11 @@ __revision__ = '$Id: views.py 21 2008-12-05 09:21:03Z jarek.zgoda $' -from django.shortcuts import render_to_response from django.template import RequestContext from django.conf import settings from confirmation.models import Confirmation - +from zephyr.lib.response import render_to_response def confirm(request, confirmation_key): confirmation_key = confirmation_key.lower() diff --git a/zephyr/lib/response.py b/zephyr/lib/response.py index 59ce47c13c..5bf887e7a2 100644 --- a/zephyr/lib/response.py +++ b/zephyr/lib/response.py @@ -1,6 +1,7 @@ from __future__ import absolute_import from django.http import HttpResponse, HttpResponseNotAllowed +import django.shortcuts import simplejson class HttpResponseUnauthorized(HttpResponse): @@ -28,3 +29,6 @@ def json_success(data={}): def json_error(msg, data={}, status=400): return json_response(res_type="error", msg=msg, data=data, status=status) + +def render_to_response(template, *args, **kwargs): + return django.shortcuts.render_to_response(template, *args, **kwargs) diff --git a/zephyr/views.py b/zephyr/views.py index 691c08d6af..7642444fc4 100644 --- a/zephyr/views.py +++ b/zephyr/views.py @@ -5,7 +5,7 @@ from django.contrib.auth import authenticate, login from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect -from django.shortcuts import render_to_response, redirect +from django.shortcuts import redirect from django.template import RequestContext, loader from django.utils.timezone import now from django.core.exceptions import ValidationError @@ -46,7 +46,8 @@ from zephyr.decorator import require_post, \ authenticated_rest_api_view, process_as_post, REQ from zephyr.lib.query import last_n from zephyr.lib.avatar import gravatar_hash -from zephyr.lib.response import json_success, json_error, json_response, json_method_not_allowed +from zephyr.lib.response import json_success, json_error, json_response, json_method_not_allowed, \ + render_to_response from zephyr.lib.timestamp import datetime_to_timestamp from zephyr.lib.cache import cache_with_key, cache_get_many, cache_set_many from zephyr.lib.unminify import SourceMap