Re: FW: Select models based on m2m relationship.

2009-09-17 Thread Will Matos
Leon, Use ajax and json. Create a view method that returns a json list of actors and their ids, then populate your list with this. > > > -Original Message- > > From: django-users@googlegroups.com > > [mailto:django-us...@googlegroups.com] On Behalf Of Léon Dignòn > > Sent: Wednesday,

RE: How do I override __unicode__ for User?

2009-05-20 Thread Will Matos
If you're using the most recent version of django you can use a Proxy Model: (I think this will work but I've never tried it) class Author(User): class Meta: proxy = True #Here you redefine the default behavior of #of the __unicode__ function def __unicode__(self):

RE: Dynamic ForeignKey using or how ?

2009-05-19 Thread Will Matos
You can use model inheritance class SomeCommonNameHere(models.Model): title = models.CharField(max_length=100) body = models.TextField() class Casts(SomeCommonNameHere): somecastfield = models class Articles(SomeCommonNameHere): somearticlefield = models... class Fa

RE: Need help for nested list in template

2009-05-19 Thread Will Matos
In this case a dictionary would not be necessary if he is indeed adding the model object itself: > user_status_list = UserStatus.objects.filter(id =20,time__gte > = somelist[val], time__lte = somelist[val+1)) > for item in user_status_list: >testing_list.append(item

RE: Parsing the arguments in HTTP GET

2009-05-19 Thread Will Matos
You wouldn't match this using a url pattern. The rest of the query string will be in the request.GET list. So you can do the following: ui=request.GET['ui'] shva=request.GET['shva'] name=request.GET['name'] you'll probably want to check that it exists first by doing: if 'ui' in request.GET:

RE: Need help for nested list in template

2009-05-19 Thread Will Matos
{%for item in final_list%} {%for val in item%} {{val.id}}, {{val.val}}, {{val.msg}} {%endfor%} {%endfor%} -Original Message- From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] On Behalf Of laspal Sent: Tuesday, May 19, 2009 9:47 AM To: D

RE: Linked Comboboxes

2009-02-13 Thread Will Matos
Nathalia, I believe you have a number of options here. 1.You can overide the template for that model by creating your own tempate and providing your custom javascript/ajax calls that match the behaviour you're looking for. To do this you have to replicate the adm

Re: Autogenerate a Model on Save

2009-02-02 Thread Will Matos
, Feb 2, 2009 at 9:09 PM, Will Matos wrote: Agreed. Your class is being saved in a view method. Upon successful saves create a new one. From: django-users@googlegroups.com To: django-users@googlegroups.com Sent: Mo

Re: Autogenerate a Model on Save

2009-02-02 Thread Will Matos
Agreed. Your class is being saved in a view method. Upon successful saves create a new one. From: django-users@googlegroups.com To: django-users@googlegroups.com Sent: Mon Feb 02 15:07:48 2009 Subject: Re: Autogenerate a Model on Save generally you should k

Re: trouble with Django and javascript

2009-02-01 Thread Will Matos
Sent: Sun Feb 01 21:07:28 2009 Subject: Re: trouble with Django and javascript Not working. Still the same problem( when button is clicked, the text of "This is a test" will display in the iframe for one second, and then disappear.). On Feb 2, 12:55 pm, "Will Matos" wrote: >

Re: trouble with Django and javascript

2009-02-01 Thread Will Matos
Onclick="test();submit();" Will Matos TCDI Dir. of Tech. Sales - Original Message - From: django-users@googlegroups.com To: Django users Sent: Sun Feb 01 20:54:32 2009 Subject: Re: trouble with Django and javascript If I use Onclick="submit();", how to add the

Re: trouble with Django and javascript

2009-02-01 Thread Will Matos
Onclick="submit();" Will Matos TCDI Director of Technical Sales 4510 Weybridge Lane Greensboro, NC 27407 336.232.5832 office 336.232.5850 fax 336.414.0467 mobile - Original Message - From: django-users@googlegroups.com To: Django users Sent: Sun Feb 01 19:52:49 2009 S