Skip to content

Commit

Permalink
Make a review view login required
Browse files Browse the repository at this point in the history
  • Loading branch information
holdenk committed Jan 19, 2013
1 parent 4157e23 commit 97803c9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frontend/unicorn/templates/index.html
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
...
<html>
<head>
<title>Holden's Magical Unicorn Review Board</title>
</head>
<body>
Welcome to Holden's Magical Unicorn's Review Board, here you can review pull requests generated by <a href="https://github.com/holdenk/holdensmagicalunicorn">the magical unicorn</a>. Get started <a href="/review">here!</a>
</body>
</html>
2 changes: 2 additions & 0 deletions frontend/unicorn/unicorn/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
url(r'^$', 'verify.views.index'),
url(r'^review', 'verify.views.review'),

)
7 changes: 7 additions & 0 deletions frontend/unicorn/verify/views.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# Create your views here.
from django.http import HttpResponse
from django.template import Context, loader
from django.contrib.auth.decorators import login_required

def index(request):
t = loader.get_template("index.html")
c = Context()
return HttpResponse(t.render(c))

@login_required
def review(request):
t = loader.get_template("review.html")
c = Context()
return HttpResponse(t.render(c))

0 comments on commit 97803c9

Please sign in to comment.