2010/9/25 Daniel Roseman :
>
>
> On Sep 25, 9:51 am, ionut cristian cucu wrote:
>> I've tried to do something like that:
>> class Pacienti_manager(models.Manager):
>> def get_visible(self):
>> return(super(Pacienti_manager,
>> self).get_query_set().filter(pacient_id__exact=pacient_id)
>> but
On Sep 25, 9:51 am, ionut cristian cucu wrote:
> I've tried to do something like that:
> class Pacienti_manager(models.Manager):
> def get_visible(self):
> return(super(Pacienti_manager,
> self).get_query_set().filter(pacient_id__exact=pacient_id)
> but still no go, I tried
> def queryset(
I've tried to do something like that:
class Pacienti_manager(models.Manager):
def get_visible(self):
return(super(Pacienti_manager,
self).get_query_set().filter(pacient_id__exact=pacient_id)
but still no go, I tried
def queryset(self, request):
qs= super(Pacient, self).queryset(request)
r
Hi,
You may be interested in this:
http://stackoverflow.com/questions/2618893/how-to-filter-queryset-in-changelist-view-in-django-admin,
looks like a similar (solved) problem.
In short, it's about overriding the queryset() method of ModelAdmin.
On Thu, Sep 23, 2010 at 11:33 AM, ionut cristian cuc
On Tue, 2009-01-27 at 02:17 -0800, Andrew Ingram wrote:
> Hi All,
>
> I'm using something along the following lines to bulk add a bunch of
> objects to a model's reverse foreignkey relationship:
>
> foo.bar_set.add(*bars)
>
> where bars is a list of Bar objects.
>
> I've noticed that Django is
Hi Cathy,
Chris is right. User in entrystatus is a relation to User. This isnt't
the same as a 'normal' field like Name or Title. Look at these:
Entry.objects.filter(blog__id__exact=3) # Explicit form
Entry.objects.filter(blog__id=3) # __exact is implied
Entry.objects.filter(blog__pk=3) # __pk i
Chris Ryland wrote:
> One more stab:
>
> On Dec 19, 11:16 am, "Cathy Young" <[EMAIL PROTECTED]> wrote:
> > I'm having trouble with generating a QuerySet using a reverse
> > ForeignKey lookup, and I'm not sure why I'm getting an error.
> >
> > Here is my model, with only the relevant attributes sho
One more stab:
On Dec 19, 11:16 am, "Cathy Young" <[EMAIL PROTECTED]> wrote:
> I'm having trouble with generating a QuerySet using a reverse
> ForeignKey lookup, and I'm not sure why I'm getting an error.
>
> Here is my model, with only the relevant attributes shown:
>
> def EntryStatus(models.Mo
On Dec 19, 3:05 pm, "Chris Ryland" <[EMAIL PROTECTED]> wrote:
>>> Entry.entrystatus_set.filter(entrystatus__user=3)
> since the ForeignKey is on the EntryStatus model rather than the Entry
> model.
Nope, let me correct myself: according to the docs, what you want to do
should work. I officially d
Chris Ryland wrote:
> I'm a relative Django newbie, but I think you need to use something
> like
>
> >> Entry.entrystatus_set.filter(entrystatus__user=3)
>
> since the ForeignKey is on the EntryStatus model rather than the Entry
> model.
Thanks Chris, but as far as I know you can't use entrystat
On Dec 19, 2:08 pm, "Cathy Young" <[EMAIL PROTECTED]> wrote:
> class Entry(models.Model):
> guid = models.CharField(maxlength=250,primary_key=True)
> permalink = models.URLField()
> title = models.CharField(maxlength=300,default="Untitled entry")
> author = models.CharField(maxlen
Chris Ryland wrote:
> On Dec 19, 11:16 am, "Cathy Young" <[EMAIL PROTECTED]> wrote:
>
> > Here is my model, with only the relevant attributes shown:
> >
> > def EntryStatus(models.Model):
> > ...
> > user = models.ForeignKey(User)
> > entry = models.ForeignKey(Entry)
> >
> > where Entr
On Dec 19, 11:16 am, "Cathy Young" <[EMAIL PROTECTED]> wrote:
> Here is my model, with only the relevant attributes shown:
>
> def EntryStatus(models.Model):
> ...
> user = models.ForeignKey(User)
> entry = models.ForeignKey(Entry)
>
> where Entry is another of my models and User is D
13 matches
Mail list logo