Malcom is absolutely right, apologies for sending untested code to the
list.
--Derek
On Jan 20, 4:53 pm, Malcolm Tredinnick
wrote:
> On Tue, 2009-01-20 at 11:00 -0800, Derek Payton wrote:
> > The issue is that CLIENT_CHOICES is only evaluated once, when the
> > server is started an all the code
On Tue, 2009-01-20 at 11:00 -0800, Derek Payton wrote:
> The issue is that CLIENT_CHOICES is only evaluated once, when the
> server is started an all the code is loaded into memory. Try wrapping
> it all in a function, thusly:
>
> def CLIENT_CHOICES()
> choices = [
> ('', 'Select Clie
That makes perfect sense. Unfortunately, it's not working. I tried your
suggestion verbatim -- except added : after the CLIENT_CHOICES() function
definition. Values only refresh when the server is restarted.
On Tue, Jan 20, 2009 at 11:00 AM, Derek Payton wrote:
>
> The issue is that CLIENT_CHO
The issue is that CLIENT_CHOICES is only evaluated once, when the
server is started an all the code is loaded into memory. Try wrapping
it all in a function, thusly:
def CLIENT_CHOICES()
choices = [
('', 'Select Client'),
]
clients = CustomerMaster.objects.all().order_by('cust
Hi Malcolm,
I'm building my forms in a file called forms.py. This is how I populate the
choice list:
CLIENT_CHOICES = [
('', 'Select Client'),
]
clients = CustomerMaster.objects.all().order_by('customer_name')
for client in clients:
CLIENT_CHOICES.extend([(client.id, client.cust
On Fri, 2009-01-16 at 16:26 -0800, raji wrote:
> Hey django-users,
>
> I've got a form in my django app that contains a select box that is
> dynamically generated from a db object. In this case, it's a list of
> clients.
>
> When a user adds to the client list (via another django app), the
> 'c
Hey django-users,
I've got a form in my django app that contains a select box that is
dynamically generated from a db object. In this case, it's a list of
clients.
When a user adds to the client list (via another django app), the
'client' select box isn't updated with the new value(s) the next
7 matches
Mail list logo