Skip to content
Browse files

Move profile view to config

  • Loading branch information...
1 parent af2276a commit 8e3561a4bd35694eed50bbcc8ff31d61be5158d7 @klen committed Sep 30, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 base/auth/views.py
View
7 base/auth/views.py
@@ -1,4 +1,4 @@
-from flask import request, render_template, flash, redirect, url_for
+from flask import request, render_template, flash, redirect, url_for, current_app
from flaskext.babel import lazy_gettext as _
from ..ext import db
@@ -60,8 +60,11 @@ def register():
# flash will display a message to the user
flash(_('Thanks for registering'))
+
# redirect user to the 'home' method of the user module.
- return redirect(url_for('auth.profile'))
+ redirect_name = current_app.config.get('AUTH_PROFILE_VIEW', 'auth.profile')
+ return redirect(url_for(redirect_name))
+
return render_template("auth/register.html", form=form)

0 comments on commit 8e3561a

Please sign in to comment.
Something went wrong with that request. Please try again.