Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moved 'helper views' at the end of views file

  • Loading branch information...
commit cd3a9e9f17b389b607ed65a6d6ed0a6d70033e87 1 parent fd3f17d
Łukasz Fidosz authored
Showing with 15 additions and 13 deletions.
  1. +15 −13 shootout/views.py
28 shootout/views.py
View
@@ -229,14 +229,6 @@ def tag_view(request):
'ideas': ideas,
}
-def toolbar_view(request):
- viewer_username = authenticated_userid(request)
- return render(
- 'templates/toolbar.pt',
- {'viewer_username': viewer_username},
- request
- )
-
@view_config(permission='view', route_name='about',
renderer='templates/about.pt')
@@ -249,11 +241,6 @@ def about_view(context, request):
}
-def login_form_view(request):
- logged_in = authenticated_userid(request)
- return render('templates/login.pt', {'loggedin': logged_in}, request)
-
-
@view_config(permission='view', route_name='login')
def login_view(request):
main_view = request.route_url('main')
@@ -281,6 +268,21 @@ def logout_view(request):
return HTTPFound(location=request.route_url('main'),
headers=headers)
+
+def toolbar_view(request):
+ viewer_username = authenticated_userid(request)
+ return render(
+ 'templates/toolbar.pt',
+ {'viewer_username': viewer_username},
+ request
+ )
+
+
+def login_form_view(request):
+ logged_in = authenticated_userid(request)
+ return render('templates/login.pt', {'loggedin': logged_in}, request)
+
+
def latest_view(request):
latest = Idea.ideas_bunch(Idea.idea_id.desc())
return render('templates/latest.pt', {'latest': latest}, request)
Please sign in to comment.
Something went wrong with that request. Please try again.