Hi Daniel,
> However, calling foo.bar_set multiple times does *not* get the same
> queryset each time.
Okay, that was new to me :-)... Do you know what the reason for that
is?
> I discuss this a little in a blog
> entry
> here:http://blog.roseman.org.uk/2010/01/11/django-patterns-part-2-efficie
> > isEditable=0
> > login=0
>
> Assuming these two previous lines are at the top-level of you class
> statement, both attributes will be class-attributes (that is "shared
> by all instances"). I don't think this is what you want.
Yes but that's what I intended. They should (and do) not all
On Monday, December 13, 2010 11:20:21 AM UTC, Scoox wrote:Hi Daniel,
thanks for your answer. Sorry, cmp should be c. I tried to only give
the import parts to make it more readable, but I made a mistake there.
The model code is pretty standard, except for one function:
isEditable=0
login=0
def edit
On 13 déc, 12:20, Scoox wrote:
> Hi Daniel,
> thanks for your answer. Sorry, cmp should be c. I tried to only give
> the import parts to make it more readable, but I made a mistake there.
> The model code is pretty standard, except for one function:
>
> isEditable=0
> login=0
Assuming the
Hi Daniel,
thanks for your answer. Sorry, cmp should be c. I tried to only give
the import parts to make it more readable, but I made a mistake there.
The model code is pretty standard, except for one function:
isEditable=0
login=0
def editable(self):
if self.login==0: return F
On Monday, December 13, 2010 10:22:32 AM UTC, Scoox wrote:Hi guys,
I have a (probably easy) question.
I need to pass the logged in user to my objects.
I have the objects company and offer.
I tried the following on the project's index / start view:
c = Company.objects.all()
cmp.login=request.use
Hi guys,
I have a (probably easy) question.
I need to pass the logged in user to my objects.
I have the objects company and offer.
I tried the following on the project's index / start view:
c = Company.objects.all()
cmp.login=request.user
for j in cmp.offer_set.all():
j.comp
7 matches
Mail list logo