Re: Working with pk arguments within an included URL

2019-02-21 Thread Gavin Boyle
Hi Simon. Worked perfectly appreciate all your help, such a weight off my shoulders now. Thanks Gavin On Mon, 18 Feb 2019 at 09:39, Gavin Boyle wrote: > Perfect Simon. I’ll give it a go. > > Appreciate your help. > > Gavin > > On Mon, 18 Feb 2019 at 08:10, Simon A wrote: > >> Hi Gavin, >> >>

Re: Working with pk arguments within an included URL

2019-02-18 Thread Gavin Boyle
Perfect Simon. I’ll give it a go. Appreciate your help. Gavin On Mon, 18 Feb 2019 at 08:10, Simon A wrote: > Hi Gavin, > > Please see this one. > https://docs.djangoproject.com/en/2.1/topics/http/sessions/. It first > needs to be setup in your settings.py. > > Basically, this is just a field i

Re: Working with pk arguments within an included URL

2019-02-18 Thread Simon A
Hi Gavin, Please see this one. https://docs.djangoproject.com/en/2.1/topics/http/sessions/. It first needs to be setup in your settings.py. Basically, this is just a field in the database that gets retrieved whenever you want. # set a session variable self.request.session['key'] = 'value' # get

Re: Working with pk arguments within an included URL

2019-02-17 Thread Gavin Boyle
Hi Simon, That’s a great idea, I’ve only ever worked with built in sessions for logging in. Would you have a link to some documentation or an example that would help me as I’m relatively new to Django and this has been holding me back months now. Thanks Gavin On Mon, 18 Feb 2019 at 04:11, Simon

Re: Working with pk arguments within an included URL

2019-02-17 Thread Simon A
I think I had a similar scenario a few weeks ago. One option that you have is to store the originally selected PK to the session object. Whenever you load a page, for you can retrieve the PK from the session object. Most likely you'll do this on the get_queryset function On Sunday, February 17,

Working with pk arguments within an included URL

2019-02-17 Thread GavinB841
Hi, To briefly explained: - I have a main site which provides links to multiple sports club pages. - Currently once clicked it opens the club home page and displays information based on that club by passing in the pk. - I then have many other pages associated to the clubs. e.g. Teams