offline  committed 67df27d

removed unneeded staff

  • Participants
  • Parent commits 5f5af4d
  • Branches default

Comments (0)

Files changed (1)

File openauth/

-import time
-from datetime import datetime, timedelta, date
-from django.conf import settings
 from django.contrib.auth.models import User
 from django.core.urlresolvers import reverse
-from django.contrib.auth.decorators import login_required
 from django.contrib import auth 
-from django.shortcuts import get_object_or_404, redirect
+from django.shortcuts import get_object_or_404
 from django.utils.translation import ugettext as _
-from django.http import HttpResponseRedirect
-from django.db.models import Q
-from annoying.decorators import ajax_request, render_to
+from annoying.decorators import render_to
 import openauth
-from openauth.forms import ResetPasswordForm, NewPasswordForm, LoginForm, NewEmailForm, EditUserForm
+from openauth.forms import ResetPasswordForm, NewPasswordForm, LoginForm, EditUserForm
 from openauth.utils import email_template, build_redirect_url, str_to_class, \
     generate_hash, activation_required, message
 from openauth.models import Confirmation
     return {'form': form}
 def logout(request):
-    request.flash['notice'] = "You have been logged out"
-    return redirect("index")
+    return message(request, _('You have been logged out'), 'notice', '/')
         form = EditUserForm(user, request.POST, request.FILES)
         if form.is_valid():
-            request.flash['notice'] = "User details successfully changed"
-            return HttpResponseRedirect(reverse('openauth-show-user', args=[]))
+            return message(request, _('User details successfully changed'), 'success', 'openauth-show-user', args=[])
         initial = {'username': user.username,