Re: Templates and URL Mappings

2018-04-03 Thread Will Burchell
Daniel, thank you so much! I had been eyeing my regex with suspicion by was looking at the wrong pattern. Many thanks again, all appeas to be working fine now :) On Monday, 2 April 2018 12:27:56 UTC+1, Daniel Roseman wrote: > > On Monday, 2 April 2018 12:00:31 UTC+1, Will Burchell wrote: > >

Re: Templates and URL Mappings

2018-04-02 Thread Daniel Roseman
On Monday, 2 April 2018 12:00:31 UTC+1, Will Burchell wrote: > from django.conf.urls import url > from . import views > > app_name = 'stock' # Referenced by template, ie item in index.html > > urlpatterns = [ > # /stock/ > url(r'^$', views.index, name="index"), > # /stock/nnn/ >

Templates and URL Mappings

2018-04-02 Thread Will Burchell
Hi all, I'm having some trouble understanding fairly basic URL mappings and how they rout through to templates. I have an app "stock" which is registered in my base admin.py. I have three classes in my app, stock\models.py listed below: from django.db import models class