Re: [mezzanine-users] How to add extra attributes to RICHTEXT_ALLOWED_ATTRIBUTES in settings.py

2016-10-26 Thread John Barham
That does the trick. Many thanks!

John


On Wed, Oct 26, 2016 at 11:58 AM, Ryne Everett wrote:

> I'd do this in an app's `defaults.py`:
>
> from mezzanine.conf import register_setting
>
> register_setting(
> name='RICHTEXT_ALLOWED_ATTRIBUTES',
> editable=False,
> append=True,
> default=('placeholder', 'required'),
> )
>
> On 10/23/2016 08:19 PM, John Barham wrote:
> > I want to *add* the attributes ['placeholder', 'required'] to the
> > default RICHTEXT_ALLOWED_ATTRIBUTES list. How do I do that in my
> > settings.py?
> >
> > I'm running Mezzanine 4.2.0 and Django 1.10.2.
> >
> > Thanks, John
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Mezzanine Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to mezzanine-users+unsubscr...@googlegroups.com
> > .
> > For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Attribute value of one class being called by another class

2016-10-26 Thread Joseph Mohan
Have a look 
SiteRelated: 
https://github.com/stephenmcd/mezzanine/blob/b7a7b00ef8fc99ce2584fc003c8ea8cbceffee7b/mezzanine/core/models.py

Here's a blog on using 
it: 
http://bitofpixels.com/blog/on-singletonadmins-and-sitewidecontent-editing-sitewide-content-in-mezzanines-admin/

On Wednesday, 26 October 2016 10:26:49 UTC+1, Richard Jackson wrote:
>
> 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:
>
> {{ page.homepage.content }}
>
> 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
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Attribute value of one class being called by another class

2016-10-26 Thread Richard Jackson
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:

{{ page.homepage.content }}

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

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.