Hello all!
Few weeks ago I had got my Front-end and back-end fully connected on my CMS but now i'm trying to sort the navigation out, just simple links and despite I've read so many tutorials i'm sure i'm getting my wires crossed!
When I load up while in development, I can access admin fine but when i try to access the front-end, all its reading is a blank page and a module error which was not there before, unsure whether this could be due to the latest version upgrade of Django 2.2
My files are accessible on Github - github.com/bridgetsarah/CMS
Urls (Main application) - Does this serve as a way to include extra links such as (Home, about, contact etc)?
Urls (Application - Or does it need to be in here?
Urls.py (Application)
from django.urls import path, views
urlpatterns = [
path('index', views.index, name='Home'),
path('about', views.about, name='About'),
path('services', views.services, name='services'),
path('pricing', views.pricing, name='pricing')
]
Views.py (Application file) ```from django.shortcuts import render from django.http import HttpResponse, response, request
def index(request): return HttpResponse('Home Page')
def about(request): return HttpResponse('About')
def services(request): return HttpResponse('Services')
def pricing(request): return HttpResponse('Pricing')
```
Mark
What's the error?
I checked out the code but I got this error:
File "hubtree/cms/urls.py", line 6, in <module> from django.urls import path, views ImportError: cannot import name 'views'Which seems to be correct (there's no 'views' in 'django.urls')