diff --git a/api/api/settings.py b/api/api/settings.py
index 1066560..a3bcbc4 100644
--- a/api/api/settings.py
+++ b/api/api/settings.py
@@ -11,7 +11,6 @@ https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib import Path
-import environ
import os
import environ
@@ -51,6 +50,7 @@ INSTALLED_APPS = [
'rest_framework',
'rest_framework.authtoken',
'django_filters',
+ 'accounts',
]
@@ -185,3 +185,7 @@ STATICFILES_DIRS = [
BASE_DIR / "api/static",
("assets", BASE_DIR / "api/static/assets"),
]
+
+
+LOGIN_REDIRECT_URL = "index"
+LOGOUT_REDIRECT_URL = "index"
diff --git a/api/api/templates/base.html b/api/api/templates/base.html
new file mode 100644
index 0000000..c07b1a7
--- /dev/null
+++ b/api/api/templates/base.html
@@ -0,0 +1,65 @@
+{% load static %}
+
+
+
+
+
+ Bootstrap demo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% if user.is_authenticated %}
+
Logout
+ {% else %}
+
Login
+
Sign-up
+ {% endif %}
+
+
+
+
+
+
+
+
+
+
+
+ {% block content %}
+{{ section.title }}
+
+{% for story in story_list %}
+
+{{ story.tease|truncatewords:"100" }}
+{% endfor %}
+{% endblock %}
+
+
+
+
+
+
diff --git a/api/api/templates/home.html b/api/api/templates/home.html
new file mode 100644
index 0000000..d949451
--- /dev/null
+++ b/api/api/templates/home.html
@@ -0,0 +1,13 @@
+
+{% extends 'base.html' %}
+
+{% block title %}Home{% endblock %}
+
+{% block content %}
+{% if user.is_authenticated %}
+ Hi {{ user.username }}!
+{% else %}
+ You are not logged in
+ Log In
+{% endif %}
+{% endblock %}
\ No newline at end of file
diff --git a/api/api/templates/index.html b/api/api/templates/index.html
index ed54fda..fb89941 100644
--- a/api/api/templates/index.html
+++ b/api/api/templates/index.html
@@ -28,8 +28,14 @@
-
-
+ {% if user.is_authenticated %}
+
Logout
+ {% else %}
+
Login
+
Sign-up
+ {% endif %}
+
+
@@ -39,6 +45,7 @@
+
Bills
Quickly and easily start adding your bills and service costs to get a better understanding of your operational expenses.
@@ -74,8 +81,11 @@
+{% block base %}
+{% endblock %}
+