class EvalState(models.Model,AtlasBaseHelper):
"""
Represents Eval State:
ACTIVE
INACTIVE
DELETE
NA
"""
name = models.CharField(max_length=32, unique=True)
friendly_name = models.CharField(max_length=32, unique=True)
description = models.CharField(max_length=
you didn't show me a model structure, you just showed another model, so I
can't give you example without picture of what's going on there
On Monday, August 7, 2017 at 1:39:49 PM UTC+3, Arun S wrote:
>
> Can you just give an Example for this taking a Query.
>
>
>
> On Monday, August 7, 2017 at 3:3
Can you just give an Example for this taking a Query.
On Monday, August 7, 2017 at 3:37:04 PM UTC+5:30, lemme smash wrote:
>
> i meant EvalState model
> if name attribute on it is a ForeignKey you should get corresponding
> queryset of model it links to
> if it's charfield, you should use text
i meant EvalState model
if name attribute on it is a ForeignKey you should get corresponding
queryset of model it links to
if it's charfield, you should use text choices
On Monday, August 7, 2017 at 6:22:50 AM UTC+3, Arun S wrote:
>
> The Models Look like this :
>
> stage_state = models.ForeignK
The Models Look like this :
stage_state = models.ForeignKey(EvalState, verbose_name="Eval State")
class Bundle(AtlasAuditModel, AtlasBaseHelper):^M
"""^M
Represents the bundle purchased by the customer. The bundle^M
contains a reference identifier which remains the same if the^M
th
so, you can maybe show you models structure here?
also, if it is a ForeignKey, why you trying to filter qs by string values?
I mean Q(name = 'ACTIVE')
it's shouldn't work
On Sunday, August 6, 2017 at 5:22:21 AM UTC+3, Arun S wrote:
>
> Yes, name is a foreign key here.
--
You received this mess
Yes, name is a foreign key here.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to
name is a ForeignKey field? If not, you shouldn't use queryset attribute
there. Use choices instead.
If you want to render all available choices from db, you can get it like
Model.objects.filter(...).values_list('name', flat=True)
On Friday, August 4, 2017 at 8:07:24 PM UTC+3, Arun S wrote:
>
>
8 matches
Mail list logo