On 31-7-2012 22:45, Lachlan Musicman wrote:
> Yes, I was doing that originally (when there was no Compensation objects),
> but I was struggling with only rendering when a set existed - for example,
> in my person_detail.html I was rendering from the wrong direction - via the
> non-Person object vi
On Wed, Aug 1, 2012 at 8:45 AM, Lachlan Musicman wrote:
> On Wed, Aug 1, 2012 at 12:43 AM, Melvyn Sopacua wrote:
>
>> On 31-7-2012 6:17, Lachlan Musicman wrote:
>>
>> > I have Person, Certificate, Job and Compensation objects. The last three
>> > all
>> > have an FK (or M2M) back to a (or some) P
On Wed, Aug 1, 2012 at 12:43 AM, Melvyn Sopacua wrote:
> On 31-7-2012 6:17, Lachlan Musicman wrote:
>
> > I have Person, Certificate, Job and Compensation objects. The last three
> > all
> > have an FK (or M2M) back to a (or some) Person(s).
> >
>
> So reverse relations.
>
Yep, thanks - with Djan
On Tue, Jul 31, 2012 at 11:15 PM, Karl Sutt wrote:
> So, in conclusion, Lachlan, you would want to do something like:
>
> def get_context_data(self,**kwargs):
>> #Call the base implementation first to get a context
>> context = super(PersonDetailView, self).get_context_data(**kwa
On 31-7-2012 6:17, Lachlan Musicman wrote:
> I have Person, Certificate, Job and Compensation objects. The last three
> all
> have an FK (or M2M) back to a (or some) Person(s).
>
So reverse relations.
> def get_context_data(self,**kwargs):
> #Call the base implementation first to ge
So, in conclusion, Lachlan, you would want to do something like:
def get_context_data(self,**kwargs):
> #Call the base implementation first to get a context
> context = super(PersonDetailView, self).get_context_data(**kwargs)
> #Add in a querysets
> context['job_li
Hi,
I just started to convert my small hobby-project into class-based views and
struggled with similar things (but with a ListView instead).
The person object is in the context dictionary, so you need to refer to it
by context['person'].
More generally, it is instructive to print context, kwar
Hola,
I'm confused about adding extra content to a class based Generic View. I've
read
the docs at
file:///home/datakid/src/django-docs/topics/class-based-views.html
and have written the code accordingly.
I have Person, Certificate, Job and Compensation objects. The last three
all
have an FK (or
8 matches
Mail list logo