diff --git a/profiles/context.py b/profiles/context.py index 9ee71e9..3472399 100644 --- a/profiles/context.py +++ b/profiles/context.py @@ -1,7 +1,11 @@ import models +import forms def random_quote(request): quote = models.Quote.objects.order_by('?') if len(quote) > 0: return {'quote': quote[0]} return {} + +def login_form(request): + return {'login_form': forms.LoginForm()} diff --git a/templates/base.html b/templates/base.html index 31e8fe1..dbeb565 100644 --- a/templates/base.html +++ b/templates/base.html @@ -23,9 +23,8 @@
-

Epicenter

{% if user.is_authenticated %} -

Welcome, {{ user.username }}

+

{{user.username}}

{% else %} +

Login

Welcome! Do you have an invite? Claim it!

+

+ {%csrf_token%} + {{login_form.as_p}} + +
{% endif %}