Re: override django's rear-end validation for dynamic model field (AJAX)

2009-12-24 Thread Maksymus007
On Thu, Dec 24, 2009 at 5:24 PM, hotani wrote: > I have close to 600 users split by 20 or so offices. We have a > helpdesk form (using ModelForm) which displays an initial user list > based on the office, or no users if an office is not selected. > > An AJAX function on the front end dynamically c

Re: override django's rear-end validation for dynamic model field (AJAX)

2009-12-24 Thread Daniel Roseman
On Dec 24, 4:24 pm, hotani wrote: > I have close to 600 users split by 20 or so offices. We have a > helpdesk form (using ModelForm) which displays an initial user list > based on the office, or no users if an office is not selected. > > An AJAX function on the front end dynamically changes users

override django's rear-end validation for dynamic model field (AJAX)

2009-12-24 Thread hotani
I have close to 600 users split by 20 or so offices. We have a helpdesk form (using ModelForm) which displays an initial user list based on the office, or no users if an office is not selected. An AJAX function on the front end dynamically changes users in the drop-down based on the office selecti

Re: dynamic model field assignments

2009-04-29 Thread Dennis Schmidt
thanks, that was just what I was looking for :-) never used this**thing before On 29 Apr., 14:02, Daniel Roseman wrote: > On Apr 29, 12:09 pm, Dennis Schmidt > wrote: > > > > > > > Hi Mike, > > > thanks a lot but that was unfortunately not what I ment. Your > > assignmements are static

Re: dynamic model field assignments

2009-04-29 Thread Karen Tracey
On Wed, Apr 29, 2009 at 7:09 AM, Dennis Schmidt wrote: > > Hi Mike, > > thanks a lot but that was unfortunately not what I ment. Your > assignmements are static in > > In [2]: n = TestFun(name="mike", description="Testing is always > fun.") > > but I need them to be dynamic. So in the above case N

Re: dynamic model field assignments

2009-04-29 Thread Daniel Roseman
On Apr 29, 12:09 pm, Dennis Schmidt wrote: > Hi Mike, > > thanks a lot but that was unfortunately not what I ment. Your > assignmements are static in > > In [2]: n = TestFun(name="mike", description="Testing is always > fun.") > > but I need them to be dynamic. So in the above case NAME wouldn't

Re: dynamic model field assignments

2009-04-29 Thread Dennis Schmidt
Hi Mike, thanks a lot but that was unfortunately not what I ment. Your assignmements are static in In [2]: n = TestFun(name="mike", description="Testing is always fun.") but I need them to be dynamic. So in the above case NAME wouldn't be hardcoded but come from a dictionary. {'name': 'mike'} l

Re: dynamic model field assignments

2009-04-29 Thread Mike Ramirez
On Wednesday 29 April 2009 03:24:48 am Dennis Schmidt wrote: > Hi there, > > this might be a trivial question but my search within the django > documentation and google didn't give me any helpful results. > In Ruby on Rails you can simply do this > > x = Model.new({:param_x => 'x', :param_y => 'y'}

dynamic model field assignments

2009-04-29 Thread Dennis Schmidt
Hi there, this might be a trivial question but my search within the django documentation and google didn't give me any helpful results. In Ruby on Rails you can simply do this x = Model.new({:param_x => 'x', :param_y => 'y'}) where the params are some model fields. The hash you can provide ther

Re: Dynamic model field

2008-12-27 Thread sergioh
Maybe a better approach for this, can be override the save method for your model and also exclude that field on your forms. Actually there is a post from James Bennett at: http://www.b-list.org/weblog/2008/dec/24/admin/ hope it helps, regards, Sergio Hinojosa On Dec 26, 6:32 pm, eldonp2 wrot

Dynamic model field

2008-12-26 Thread eldonp2
I'm writing a library app - would like to find out if it is possible to have a dynamically updating (returndate) field in a model? class Loan... ... borrowdate = models.DateTimeField(auto_now_add = True) returndate = models.DateTimeField(timediff(borrowdate+ timedelta (days=2)) ... --~--~--