diff --git a/get_together/templates/get_together/base.html b/get_together/templates/get_together/base.html
index d347319..dc2fec3 100644
--- a/get_together/templates/get_together/base.html
+++ b/get_together/templates/get_together/base.html
@@ -49,20 +49,28 @@ form {
{% if request.user.is_authenticated %}
- - Welcome {{ request.user.username }}
+ -
+
+
+
{% else %}
- Signup or Login
{% endif %}
diff --git a/get_together/urls.py b/get_together/urls.py
index fa4c9e9..9ef3018 100644
--- a/get_together/urls.py
+++ b/get_together/urls.py
@@ -25,6 +25,7 @@ from . import views
urlpatterns = [
path('', views.home, name='home'),
path('admin/', admin.site.urls),
+ path('logout/', views.logout, name='logout'),
path('searchables/', event_views.searchable_list, name='searchables'),
path('api/places/', event_views.places_list),
diff --git a/get_together/views.py b/get_together/views.py
index 07034c2..ffa6ecc 100644
--- a/get_together/views.py
+++ b/get_together/views.py
@@ -1,6 +1,7 @@
from django.utils.translation import ugettext_lazy as _
from django.contrib import messages
+from django.contrib.auth import logout as logout_user
from django.shortcuts import render, redirect
from django.http import HttpResponse, JsonResponse
@@ -14,6 +15,11 @@ import simplejson
# Create your views here.
+def logout(request):
+ if request.user.is_authenticated:
+ logout_user(request)
+ return redirect('home')
+
def home(request, *args, **kwards):
if request.user.is_authenticated:
user_teams = Team.objects.filter(owner_profile=request.user.profile)