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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message