diff --git a/authentication/urls.py b/authentication/urls.py index bd9a729..9a21225 100644 --- a/authentication/urls.py +++ b/authentication/urls.py @@ -9,7 +9,7 @@ urlpatterns = [ ), url(r'^logout/$', logout, - {'next_page': 'blog_home'}, + {'next_page': 'home'}, name='auth_logout' ), ] diff --git a/refunds/settings.py b/refunds/settings.py index 9f09166..5b1c84c 100644 --- a/refunds/settings.py +++ b/refunds/settings.py @@ -48,6 +48,7 @@ X_FRAME_OPTIONS = 'DENY' # Application definition INSTALLED_APPS = [ + 'authentication', 'crispy_forms', 'django.contrib.admin', 'django.contrib.auth', @@ -153,8 +154,8 @@ STATICFILES_DIRS = ( STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage' -# LOGIN_URL = 'auth_login' -# LOGOUT_URL = 'auth_logout' -# LOGIN_REDIRECT_URL = 'blog_home' +LOGIN_URL = 'auth_login' +LOGOUT_URL = 'auth_logout' +LOGIN_REDIRECT_URL = 'home' CRISPY_TEMPLATE_PACK = 'bootstrap3' diff --git a/refunds/templates/blog/home.html b/refunds/templates/blog/home.html index 265000d..64fe360 100644 --- a/refunds/templates/blog/home.html +++ b/refunds/templates/blog/home.html @@ -2,8 +2,6 @@ {% block title %}Home{% endblock %} {% block content %} -

Gab's thoughts

-

Welcome to my blog. I hope you will enjoy your journey here.

-

This blog is about creating websites with Django, a Python framework designed for web.

-

Feel free to start by exploring my latest blog entries.

+

Refunds

+

Welcome to my website. I hope you will enjoy your journey here.

{% endblock %} diff --git a/refunds/urls.py b/refunds/urls.py index 88243b4..ced4b23 100644 --- a/refunds/urls.py +++ b/refunds/urls.py @@ -13,9 +13,13 @@ Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ -from django.conf.urls import url +from django.conf.urls import url, include from django.contrib import admin +from refunds.views import home, about urlpatterns = [ url(r'^admin/', admin.site.urls), + url(r'^auth/', include('authentication.urls')), + url(r'^$', home, name='home'), + url(r'^about/$', about, name='about'), ] diff --git a/refunds/views.py b/refunds/views.py new file mode 100644 index 0000000..745672c --- /dev/null +++ b/refunds/views.py @@ -0,0 +1,9 @@ +from django.shortcuts import render + + +def home(request): + return render(request, "blog/home.html") + + +def about(request): + return render(request, "blog/about.html") diff --git a/templates/base.html b/templates/base.html index 6d5f16a..d0ded91 100644 --- a/templates/base.html +++ b/templates/base.html @@ -2,7 +2,7 @@ - Gab's thoughts • {% block title %}{% endblock %} + Refunds • {% block title %}{% endblock %} diff --git a/templates/navbar.html b/templates/navbar.html index 5320ec7..be57d74 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -9,14 +9,13 @@ - Gab's thoughts + Refunds