Re: got unexpected keyword argument 'widget'

2008-01-06 Thread Steve Bergman
Never mind. Clearly, I was confusing my models with my forms. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe

got unexpected keyword argument 'widget'

2008-01-06 Thread Steve Bergman
I have a model field that I want to change the attrs on when displayed by newforms. I thought I could do something like: class Timesheet(models.Model): date = DateField(widget=forms.TextInput()) and then define my attrs in the widget. But syncdb is complaining: TypeError: __init__() got

Re: got unexpected keyword argument

2006-04-29 Thread Glenn Tenney
On Sat, Apr 29, 2006 at 08:20:30PM -0500, James Bennett wrote: > In the tutorial, the field on the Choice model ('poll') is the same as > the name of the model it's being related to ('poll'), which is why it > looks that way. Whenever they're different, you want to use the name > of the field on

Re: got unexpected keyword argument

2006-04-29 Thread James Bennett
On 4/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > This is not what I understood from reading and practicing the tutorial > 1: In the tutorial, the field on the Choice model ('poll') is the same as the name of the model it's being related to ('poll'), which is why it looks that way.

Re: got unexpected keyword argument

2006-04-29 Thread Adrian Holovaty
gt; from within a view, I get: > > TypeError at /cadastro/pesquisa/ > got unexpected keyword argument 'servicos__id__exact' Hi Luis, When using the Django database API, you use the field names, not the model names. So you want this: cadastros.get_list(serv_clientes__id__exa

Re: got unexpected keyword argument

2006-04-29 Thread [EMAIL PROTECTED]
This is not what I understood from reading and practicing the tutorial 1: # The API automatically follows relationships as far as you need. # Use double underscores to separate relationships. # This works as many levels deep as you want. There's no limit. # Find all Choices for any poll whose

Re: got unexpected keyword argument

2006-04-28 Thread Ivan Sagalaev
Luis P. Mendes wrote: >As _django models_: >class Servico(meta.Model): >~codigo = meta.TextField(maxlength=4) >~nome = meta.CharField(maxlength=80) > >~def __repr__(self): >~return self.nome > >class Cadastro(meta.Model): >~serv_clientes =

got unexpected keyword argument

2006-04-28 Thread Luis P. Mendes
_(self): ~return self.nome class Cadastro(meta.Model): ~serv_clientes = meta.ForeignKey(Servico) ~nome = meta.CharField(maxlength=200) ~ (...) ~ def __repr__(self): ~return self.nome when I try: lista_sps = cadastros.get_li