Commit d433b393 authored by Behr, Svenja's avatar Behr, Svenja
Browse files

- Kosmetik

parent 4920c63e
......@@ -102,8 +102,6 @@ def save_comment(request):
def user_login(request):
"""User login
"""
blogs = get_all_blogs(request)
if request.method == 'POST':
# Process the POST Data
username = request.POST['username']
......@@ -117,10 +115,11 @@ def user_login(request):
else:
# Throw Error if credentials are wrong
return render(request, 'blog/login.html',
{'error_message': 'Falscher Username und / oder Passwort.', 'blogs': blogs})
{'error_message': 'Falscher Username und / oder Passwort.',
'blogs': (get_all_blogs(request))})
else:
# No POST data -> then show the page again
return render(request, 'blog/login.html', {'blogs': blogs})
return render(request, 'blog/login.html', {'blogs': (get_all_blogs(request))})
def user_logout(request):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment