diff --git a/bookmarks/urls.py b/bookmarks/urls.py index 2b6b8ca..216b571 100644 --- a/bookmarks/urls.py +++ b/bookmarks/urls.py @@ -2,6 +2,7 @@ from django.urls import path from . import views +app_name = 'bookmarks' urlpatterns = [ path('', views.BookmarkListView.as_view(), name='bookmark-list') ] \ No newline at end of file diff --git a/forgetmenot/templates/base.html b/forgetmenot/templates/base.html index c6afe66..fcfe2da 100644 --- a/forgetmenot/templates/base.html +++ b/forgetmenot/templates/base.html @@ -1,2 +1,8 @@ -{% block content %} -{% endblock %} \ No newline at end of file + + + Forget me not + + + {% block content %} {% endblock %} + + diff --git a/forgetmenot/templates/home/index.html b/forgetmenot/templates/home/index.html new file mode 100644 index 0000000..f9195b7 --- /dev/null +++ b/forgetmenot/templates/home/index.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block content %} +

This is the home page.

+

+ Links
+

+

+{% endblock %} \ No newline at end of file diff --git a/forgetmenot/urls.py b/forgetmenot/urls.py index 7ed22b8..250479a 100644 --- a/forgetmenot/urls.py +++ b/forgetmenot/urls.py @@ -16,7 +16,10 @@ Including another URLconf from django.contrib import admin from django.urls import include, path +from . import views + urlpatterns = [ + path('', views.home, name='home'), path('bookmarks/', include('bookmarks.urls')), path('admin/', admin.site.urls), path('accounts/', include('django.contrib.auth.urls')) diff --git a/forgetmenot/views.py b/forgetmenot/views.py new file mode 100644 index 0000000..c0fc0ab --- /dev/null +++ b/forgetmenot/views.py @@ -0,0 +1,6 @@ +from django.shortcuts import render +from django.views.decorators.http import require_safe + +@require_safe +def home(request): + return render(request, 'home/index.html')