> Hi.
> You should take a read on the queryset api, that would help you a lot
> In the furture. For distinct values add .distinct() so you fx get
> ...filter(...).distinct()
>
> ~Jakob
Jakob -
I've read the docs and know about distinct. The issue here is that a
modelchoicefield returns the ID
Hi.
You should take a read on the queryset api, that would help you a lot
In the furture. For distinct values add .distinct() so you fx get
...filter(...).distinct()
~Jakob
On Jun 11, 7:28 pm, Bobby Roberts wrote:
> > The issue is the line:
> The issue is the line: WebPage.objects.filter(page_plaque!=''). The
> queryset syntax doens't use the != operator anywhere. To do != operations
> you need to instead do WebPage.objects.exclude(page_plaque='').
>
ok that got past the error but there are dupes in there. Is there a
way to pull
On Thu, Jun 11, 2009 at 12:13 PM, Bobby Roberts wrote:
>
> hi group
>
> i'm trying to create a drop box that is populated with a distinct list
> of values from a certain field (fieldname=page_plaque) in the table.
> Here is what i have in my forms.py
>
>
> class
hi group
i'm trying to create a drop box that is populated with a distinct list
of values from a certain field (fieldname=page_plaque) in the table.
Here is what i have in my forms.py
class PagePlaqueModelChoiceField (forms.ModelChoiceField):
def label_from_instance(self,obj):
5 matches
Mail list logo