Re: [mezzanine-users] Re: registering new settings for templates

2015-10-15 Thread Nkansah Rexford
Yeah, I'm referring to that, but simply looking at that part makes little 
meaning *how *to use it, unless you see an example like this 
,
 
which imho, should be the most immediate thing following this 
section: http://mezzanine.jupo.org/docs/configuration.html#reading-settings

On Friday, October 16, 2015 at 3:02:58 AM UTC, Danny S wrote:
>
> I suspect Nkansah is referring to this setting:
>
>
> http://mezzanine.jupo.org/docs/configuration.html#template-accessible-settings
>
> But yes, perhaps TEMPLATE_ACCESSIBLE_SETTINGS should be referenced in the 
> docs at the point that talks about register_setting()
>
>
>
> On 16 October 2015 at 13:03, Ryne Everett  > wrote:
>
>> If something is missing please enlighten us. What did you learn?
>>
>> On Thu, Oct 15, 2015 at 9:28 PM, Nkansah Rexford > > wrote:
>>
>>> got it working. Yet another missing piece from the docs.
>>>
>>> -- 
>>> 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-use...@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-use...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> *Danny Sag*
> Chairperson
> Round World Events SA, Inc
> City of Small Gods Terry Pratchett Fan Club - 
> http://cityofsmallgods.org.au
>
> *Nullus Anxietas VI - The Australian Discworld Convention* - 
> http://ausdwcon.org
> "The Discworld Grand Tour" - Adelaide SA, August 4-6, 2017
>
>
>
>
>
>

-- 
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.


Re: [mezzanine-users] Re: registering new settings for templates

2015-10-15 Thread Nkansah Rexford
The documentation mezzanin.jupo.org/docs/configuration.html only mentions 
how to register a new setting, expose it to admin, and access/read via 
models etc. However, there's no mention how to expose the registered 
setting via templates, which to do, has to be done this way:

from mezzanine.conf import register_setting
from django.utils.translation import ugettext_lazy as _

register_setting(
name="TEMPLATE_ACCESSIBLE_SETTINGS",
append=True,
default=("FOOTER_TEXT", "ANOTHER_SETTING", "YET_ANOTHER_SETTING"),
)

register_setting(
name="FOOTER_TEXT",
label=_("Footer About Pesewa"),
description=_("Footer Info"),
editable=True,
default="footer",
)

register_setting(
name="ANOTHER_SETTING",
label=_("Another Setting"),
description=_("Footer Info"),
editable=True,
default="footer",
)




-- 
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.


Re: [mezzanine-users] Re: registering new settings for templates

2015-10-15 Thread Danny
I suspect Nkansah is referring to this setting:

http://mezzanine.jupo.org/docs/configuration.html#template-accessible-settings

But yes, perhaps TEMPLATE_ACCESSIBLE_SETTINGS should be referenced in the
docs at the point that talks about register_setting()



On 16 October 2015 at 13:03, Ryne Everett  wrote:

> If something is missing please enlighten us. What did you learn?
>
> On Thu, Oct 15, 2015 at 9:28 PM, Nkansah Rexford 
> wrote:
>
>> got it working. Yet another missing piece from the docs.
>>
>> --
>> 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.
>



-- 
*Danny Sag*
Chairperson
Round World Events SA, Inc
City of Small Gods Terry Pratchett Fan Club - http://cityofsmallgods.org.au

*Nullus Anxietas VI - The Australian Discworld Convention* -
http://ausdwcon.org
"The Discworld Grand Tour" - Adelaide SA, August 4-6, 2017

-- 
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.


Re: [mezzanine-users] Re: registering new settings for templates

2015-10-15 Thread Ryne Everett
If something is missing please enlighten us. What did you learn?

On Thu, Oct 15, 2015 at 9:28 PM, Nkansah Rexford 
wrote:

> got it working. Yet another missing piece from the docs.
>
> --
> 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: registering new settings for templates

2015-10-15 Thread Nkansah Rexford
got it working. Yet another missing piece from the docs.

-- 
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] registering new settings for templates

2015-10-15 Thread Nkansah Rexford
After registering a setting...

from mezzanine.conf import register_setting
from django.utils.translation import ugettext_lazy as _

register_setting(
name="FOOTER_TEXT",
label=_("Footer About"),
description=_("If present, about information about "
"would be displayed."),
editable=True,
default="Footer information here",
)

How do I get it to show in templates? Does it not append whatever is 
registered to templates context on the fly?

-- 
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.


Re: [mezzanine-users] Akismet spam filtering with Python 3

2015-10-15 Thread Stephen McDonald
Sounds like a bug, patch welcome.

On Fri, Oct 16, 2015 at 10:06 AM, Christian Hill  wrote:

> I have found that Akismet spam filtering isn't working for me with Python
> 3.3-- after a bit of investigating, the problem seems to be in
> mezzanine.utils.views.is_spam_akismet. The following Exception is always
> being raised:
>
> try:
> response = urlopen(Request(api_url, urlencode(data), headers)).read()
> except Exception:
> return False
>
> and is "POST data should be bytes or an iterable of bytes. It cannot be of
> type str" this seems to be a Python 3.3 thing, and it works if I
> (re-?)encode data as utf-8 after it has been urlencoded:
> urlencode(data).encode('utf-8').
>
> Is this a bug? Can anyone shed any light on this? With the Exception being
> silently caught, nothing gets classified as spam.
> Christian
>
> --
> 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.
>



-- 
Stephen McDonald
http://jupo.org

-- 
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] Akismet spam filtering with Python 3

2015-10-15 Thread Christian Hill
I have found that Akismet spam filtering isn't working for me with Python
3.3-- after a bit of investigating, the problem seems to be in
mezzanine.utils.views.is_spam_akismet. The following Exception is always
being raised:

try:
response = urlopen(Request(api_url, urlencode(data), headers)).read()
except Exception:
return False

and is "POST data should be bytes or an iterable of bytes. It cannot be of
type str" this seems to be a Python 3.3 thing, and it works if I
(re-?)encode data as utf-8 after it has been urlencoded:
urlencode(data).encode('utf-8').

Is this a bug? Can anyone shed any light on this? With the Exception being
silently caught, nothing gets classified as spam.
Christian

-- 
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.


Re: [mezzanine-users] Cannot edit content on Rich Text Page

2015-10-15 Thread Eduardo Rivas
Were you running a Mezzanine 3 site before? I have experienced a problem 
where the old tinymce files are cached by the browser. A cache reload 
(Ctrl + F5) does the trick.


--
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.


Re: [mezzanine-users] Cannot edit content on Rich Text Page

2015-10-15 Thread Ryne Everett
If you're using firefox you may need to go to 127.0.0.1 rather than
localhost.

On Thu, Oct 15, 2015 at 10:15 AM, Ilya Yakunin  wrote:

>
> 
> Hi all,
>
> I've just started a new mezzanine project using:
> * Mezzanine 4.0.1
> * Django 1.8.5
> * Python 2.7.10
> * SQLite 3.8.10.2
> * Linux 3.16.0-4-amd64
>
> with default config. Simply ran mezzanine-project, created a database and
> ran developement server.
>
> When I try to create a new Rich Text Page within admin interface I get no
> field for editing my content, it's just a gray div next to the "Content:"
> field. Server log gives several 404 errors linked with TinyMCE plugins:
>
> [15/Oct/2015 14:57:08] "GET
> /static/mezzanine/tinymce/themes/advanced/theme.min.js HTTP/1.1" 404 1751
> [15/Oct/2015 14:57:08] "GET
> /static/mezzanine/tinymce/plugins/advimage/plugin.min.js HTTP/1.1" 404 1757
> [15/Oct/2015 14:57:08] "GET
> /static/mezzanine/tinymce/plugins/inlinepopups/plugin.min.js HTTP/1.1" 404
> 1769
> [15/Oct/2015 14:57:08] "GET
> /static/mezzanine/tinymce/plugins/advlink/plugin.min.js HTTP/1.1" 404 1754
>
> My 'pip freeze' result:
> beautifulsoup4==4.4.0
> bleach==1.4.1
> chardet==2.3.0
> Django==1.8.5
> django-contrib-comments==1.6.1
> django-modeltranslation==0.10.1
> filebrowser-safe==0.4.0
> future==0.15.0
> grappelli-safe==0.4.0
> html5lib==0.99
> Mezzanine==4.0.1
> oauthlib==1.0.1
> Pillow==2.9.0
> pytz==2015.4
> requests==2.7.0
> requests-oauthlib==0.5.0
> six==1.9.0
> tzlocal==1.2
>
> I tried to collect static files using manage.py, but this doesn't return
> me lost plugins.
>
> Please, help me to figure out whats going on, any help would be
> appreciated.
>
> Cheers,
> Ilya
>
> --
> 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] Cannot edit content on Rich Text Page

2015-10-15 Thread Ilya Yakunin



Hi all,

I've just started a new mezzanine project using:
* Mezzanine 4.0.1
* Django 1.8.5
* Python 2.7.10
* SQLite 3.8.10.2
* Linux 3.16.0-4-amd64

with default config. Simply ran mezzanine-project, created a database and 
ran developement server.

When I try to create a new Rich Text Page within admin interface I get no 
field for editing my content, it's just a gray div next to the "Content:" 
field. Server log gives several 404 errors linked with TinyMCE plugins:

[15/Oct/2015 14:57:08] "GET 
/static/mezzanine/tinymce/themes/advanced/theme.min.js HTTP/1.1" 404 1751
[15/Oct/2015 14:57:08] "GET 
/static/mezzanine/tinymce/plugins/advimage/plugin.min.js HTTP/1.1" 404 1757
[15/Oct/2015 14:57:08] "GET 
/static/mezzanine/tinymce/plugins/inlinepopups/plugin.min.js HTTP/1.1" 404 
1769
[15/Oct/2015 14:57:08] "GET 
/static/mezzanine/tinymce/plugins/advlink/plugin.min.js HTTP/1.1" 404 1754

My 'pip freeze' result: 
beautifulsoup4==4.4.0
bleach==1.4.1
chardet==2.3.0
Django==1.8.5
django-contrib-comments==1.6.1
django-modeltranslation==0.10.1
filebrowser-safe==0.4.0
future==0.15.0
grappelli-safe==0.4.0
html5lib==0.99
Mezzanine==4.0.1
oauthlib==1.0.1
Pillow==2.9.0
pytz==2015.4
requests==2.7.0
requests-oauthlib==0.5.0
six==1.9.0
tzlocal==1.2

I tried to collect static files using manage.py, but this doesn't return me 
lost plugins.

Please, help me to figure out whats going on, any help would be appreciated.

Cheers,
Ilya

-- 
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.