Filtering Data Based On Foreign Key

2019-05-21 Thread Gavin Boyle
Hi all, I am having an issue dynamically populating form data based on the previous selected field. In my case I have two models one which contains different types of memberships associated to different clubs. Then I have another model which handles registrations for individual clubs. My problem

Suggested model structure to achieve users selection of services/package

2019-04-30 Thread Gavin Boyle
I am building an application that offers different services, a user can select and purchase specific needed packages. I want to know the best way to create the model so that our users can select and once paid it sets the service to active. I have one model that holds information about each

Filtering choices in a form based on previous field selection

2019-04-07 Thread Gavin Boyle
Hi all, Just quickly to summarize I have an app, which allows clubs to sign up and carry out different tasks. One of the features is a scheduling / rosters. Currently I have a form to add times to the roster. The club pages work off a session key based on the initially selected club. My form

Using sessions key variables as a url argument

2019-03-10 Thread Gavin Boyle
Hi all, I am not sure if this is possible as I could find nothing online but would appreciate any alternative solution. - In my view I obtain a pk which is set as a session key - I need to pass that session key variable into the url argument. e.g. http://127.0.0.1:8000/club_home//teams/

Using signals to populate another model based on new registered user

2019-03-09 Thread Gavin Boyle
Hi all, I am new to working with signals and triggers, what I am trying to accomplish is: 1. When a new user registers, I have another model to deal with subscriptions. 2. I want to create an instance for that subscription model with all the default values based on the new user.

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

Re: Working with pk arguments within an included URL

2019-02-18 Thread Gavin Boyle
this is just a field in the database that gets retrieved > whenever you want. > > # set a session variable > self.request.session['key'] = 'value' > > # get a session variable > self.request.session.get('key', None) > > On Mon, Feb 18, 2019 at 3:10 PM Gavin Boyle > wr

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,

Re: Passing pk arguments from a URL into another view

2019-02-04 Thread Gavin Boyle
Hi Pooya, Once I’ve done the include, how can I then pass that PK into the view of the included urls? Thanks Gavin On Mon, 4 Feb 2019 at 08:15, Ivan Martić wrote: > Can you elaborate a bit, i have the same issue with noreverse error > > ned, 3. velj 2019. u 15:08 poOya mOsaddegh > napisao