move about into context
This commit is contained in:
parent
f129e7abb0
commit
cca5833541
6 changed files with 60 additions and 28 deletions
|
|
@ -7,6 +7,7 @@ import django.contrib.auth
|
|||
from django.contrib.auth import get_user_model
|
||||
|
||||
from ..item.utils import render_to_json
|
||||
from ..utils import default_context
|
||||
|
||||
from brake.decorators import ratelimit
|
||||
|
||||
|
|
@ -34,13 +35,13 @@ def register(request):
|
|||
response['user'] = user.username
|
||||
return render_to_json(response)
|
||||
else:
|
||||
context = {'settings': settings}
|
||||
context = default_context(request)
|
||||
return render(request, 'register.html', context)
|
||||
|
||||
|
||||
@ratelimit(method="POST", block=True, rate="5/m")
|
||||
def login(request):
|
||||
context = {'settings': settings}
|
||||
context = default_context(request)
|
||||
response = {}
|
||||
request_type = 'json'
|
||||
if request.method == "POST":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue