Ok isolved with
projet = Projet.objects.filter(fact__isnull=False)
Everything 's back to normal :)
On 6 oct, 14:00, gregory semah <gregory.se...@gmail.com> wrote:
> Sorry my mistake again...
>
> I mean when i write "Projet.objects.filter(fact!=None)" instead of
> &quo
Sorry my mistake again...
I mean when i write "Projet.objects.filter(fact!=None)" instead of
"Projet.objects.filter(fact=None)"
Thanks
>
>
>
>
>
>
> > Hi All,
>
> > I'm dealing with really weird problem
>
> > My model
> > class Projet(models.Model):
> > ...
> > fact =
I mean when i write "Projet.objects.filter(fact!=None)" instead of
"Projet.objects.filter(fact!=None)"
The NameError appears
Thanks
On 6 oct, 13:54, gregory semah <gregory.se...@gmail.com> wrote:
> Hi All,
>
> I'm dealing with really weird problem
>
Hi All,
I'm dealing with really weird problem
My model
class Projet(models.Model):
...
fact = models.PositiveIntegerField('Numéro de
Facture',null=True,blank=True)
...
...
A simple view from this model is
def facture(request, id=None):
projet = Projet.objects.all()
Thanks for your answer!
I will check if it really fit my need
G.
On 3 oct, 15:58, Shawn Milochik wrote:
> That's what a custom manager is for:
>
> https://docs.djangoproject.com/en/1.3/topics/db/managers/#custom-mana...
>
> So you can replace your Book.objects with another
ttp://www.sebastienbillion.com/<http://www.sebastienbillion.com/>
>
> Le 03/10/2011 15:00, gregory semah a �crit :
>
>
>
>
>
>
>
> > Hi everyone,
>
> > I'm trying to create queryset of objects by adding for example a True/
> > False string f
Hi everyone,
I'm trying to create queryset of objects by adding for example a True/
False string for each objects
Example:
Normally a queryset of book in views could be
books = Book.objects.all()
I want to add in the books queryset, and for each book object a True/
False information in order to
Nobody has a quick answer ?
On Dec 20, 4:11 pm, gregory semah <gregory.se...@gmail.com> wrote:
> Hi all,
>
> I'm searching a simple way to generate xml from my models, and a
> simple use of serializers can do this for me.
> But my models are defined with ForeignKe
Hi all,
I'm searching a simple way to generate xml from my models, and a
simple use of serializers can do this for me.
But my models are defined with ForeignKey and ManyToManyField...
The xml generated shows me only key values of these field.
Is there a simple way to catch any other field value
9 matches
Mail list logo