Attribute value of one class being called by another class

19 views
Skip to first unread message

Richard Jackson

unread,
Oct 26, 2016, 5:26:49 AM10/26/16
to Mezzanine Users
Hi all,

I apologies for my complete lack of technical knowledge with this question - I haven't dealt with Mezzanine/Django/Python for about a year.

I have defined a class ('homepage') and have defined an attribute ('content'). When making a page based on the 'homepage' class, I can fill in the text for 'content' through the admin, with the template looking like:

<p>{{ page.homepage.content }}</p>

Is there a way that I can refer to what I'd stored as {{ page.homepage.content }} from another page (i.e. a 'biography' page)?

For example, say I wanted to make the same text appear in both the 'homepage' and the 'biography'. I'd store this through the admin page via 'homepage' but I'd also like some way of referring to this in the 'biography' template.

Is this possible, and if so how? My understanding has become excessively poor so I hope the above makes some sort of sense.

Thanks,

Rich

Joseph Mohan

unread,
Oct 26, 2016, 7:56:51 AM10/26/16
to Mezzanine Users

Richard Jackson

unread,
Oct 27, 2016, 12:27:12 PM10/27/16
to mezzani...@googlegroups.com
Thanks for this Joseph, I'll take a look and see if I can make sense of it!

Much appreciated,

Rich
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mezzanine Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mezzanine-users/wJ8gv7rAJwc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> mezzanine-use...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Freelance Composer - Richard Jackson Music
Email: ri...@richardjacksonmusic.com
Site: www.richardjacksonmusic.com
Twitter: @rjmusic87
Reply all
Reply to author
Forward
0 new messages