Skip to content
This repository
Browse code

Login required decorators

  • Loading branch information...
commit 8edadd12423424e1a83eb9d832a8c5d4bbbfde54 1 parent 7d692da
Matjaž Horvat authored

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. +4 1 apps/pontoon/views.py
5 apps/pontoon/views.py
@@ -15,9 +15,10 @@
15 15
16 16 from django_browserid import verify as browserid_verify
17 17 from django_browserid import get_audience
18   -from django.http import (HttpResponse, HttpResponseBadRequest, HttpResponseForbidden)
  18 +from django.http import (HttpResponseBadRequest, HttpResponseForbidden)
19 19 from django.contrib import auth
20 20 from django.views.decorators.http import require_POST
  21 +from django.contrib.auth.decorators import login_required
21 22
22 23
23 24 log = commonware.log.getLogger('playdoh')
@@ -30,6 +31,7 @@ def home(request, template=None):
30 31 log.debug("I'm alive!")
31 32 return render(request, template, data)
32 33
  34 +@login_required(login_url='/')
33 35 def download(request, template=None):
34 36 """Download translations in appropriate form."""
35 37 log.debug("Download translations")
@@ -49,6 +51,7 @@ def download(request, template=None):
49 51 response['Content-Disposition'] = 'attachment; filename=' + locale + '.' + type
50 52 return response
51 53
  54 +@login_required(login_url='/')
52 55 def transifex(request, template=None):
53 56 """Save translations to Transifex."""
54 57 log.debug("Save to Transifex")

0 comments on commit 8edadd1

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