Commit 8c7dc054 authored by Julien Enselme's avatar Julien Enselme
Browse files

Add basic views to create basic pages

parent bce959ca
from django.shortcuts import render
# Create your views here.
def offline(request):
return render(request, 'pwa/offline.html')
def my_page(request):
return render(request, 'pwa/my_page.html')
......@@ -54,7 +54,9 @@ ROOT_URLCONF = 'djangopwa.urls'
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [
os.path.join(BASE_DIR, 'djangopwa/templates'),
'APP_DIRS': True,
'context_processors': [
<title>Test PWA site – A page</title>
<h1>A page</h1>
<p>This is a very small and uninteresting page of a test site for Django and PWA</p>
<title>Test PWA site – Offline</title>
<h1>You are now offline</h1>
<p>It's sad, but that's how it is.</p>
......@@ -16,6 +16,12 @@ Including another URLconf
from django.contrib import admin
from django.urls import path
from .apps.pwa import views as pwa_views
urlpatterns = [
path('', pwa_views.my_page),
path('offline/', pwa_views.offline),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment