Re: [mezzanine-users] Overriding status in class Displayable.

2016-10-13 Thread Eduardo Rivas
Thinking out loud, but maybe you can override the admin form for PageAdmin to set the default there instead of at the model level. -- 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

[mezzanine-users] Overriding status in class Displayable.

2016-10-13 Thread Andrew Selzer
I'm just trying to set up my project using Mezzanine so when a user attempts to create a new page the default is the page will be saved as a draft and not published. I tried a monkeypatch of Displayable._meta.get_field('status').default=1 which worked for overriding BlogPost but it doesn't

Re: [mezzanine-users] mezzanine.core.middleware.SSLRedirectMiddleware Depricated 1600?

2016-10-13 Thread Akhlaq Rao
oh ok got you. Thanks On Thu, Oct 13, 2016 11:47 AM, Ryne Everett ryneever...@gmail.com wrote: If you want your configuration to more closely resemble the default nginx template you can uncomment those ssl lines and use the django ssl middleware instead. On Thu, Oct 13, 2016 at 11:33 AM,

Re: [mezzanine-users] mezzanine.core.middleware.SSLRedirectMiddleware Depricated 1600?

2016-10-13 Thread Ryne Everett
If you want your configuration to more closely resemble the default nginx template you can uncomment those ssl lines and use the django ssl middleware instead. On Thu, Oct 13, 2016 at 11:33 AM, Akhlaq Rao wrote: > ok so nginx template for SSL entries no good anymore, were

Re: [mezzanine-users] mezzanine.core.middleware.SSLRedirectMiddleware Depricated 1600?

2016-10-13 Thread Akhlaq Rao
ok so nginx template for SSL entries no good anymore, were they directly connected to SSLRedirectMiddleWare? Thanks,A On Thu, Oct 13, 2016 11:23 AM, Ryne Everett ryneever...@gmail.com wrote: SSLRedirectMiddleware would not solve that problem, all it does is redirect to https. The way I

Re: [mezzanine-users] mezzanine.core.middleware.SSLRedirectMiddleware Depricated 1600?

2016-10-13 Thread Ryne Everett
SSLRedirectMiddleware would not solve that problem, all it does is redirect to https. The way I handle this is having a line like ` return 301 https://$host$request_uri; ` in my server block listening on port 80, and another server block listening on port 443 that actually proxies to django. On

Re: [mezzanine-users] mezzanine.core.middleware.SSLRedirectMiddleware Depricated 1600?

2016-10-13 Thread Akhlaq Rao
Hi Ryne, I totally get it, but if I do not useSSLRedirectMiddleware then I don't see SSL Enable form in the Admin Settings. Do you know how do I enable SSL without usingSSLRedirectMiddleware? if I go to my frontend nginx all the SSL related entries are commented out. server { listen 80;    #

Re: [mezzanine-users] I'm not able to install Cartridge

2016-10-13 Thread Ryne Everett
My recommendation is to `pip install html5lib<=0.999`. Although this is pinned in bleach, in the context of installing from a requirements file I've yet to see pip resolve it correctly. On Thu, Oct 13, 2016 at 7:46 AM, Ken Bolton wrote: > Hi Ahmad, > > Can you show us

Re: [mezzanine-users] mezzanine.core.middleware.SSLRedirectMiddleware Depricated 1600?

2016-10-13 Thread Ryne Everett
Whoops. I just pushed a fix for that bug. However, you still shouldn't be using that middleware. If you're going to use an SSL middleware, use django's ( https://docs.djangoproject.com/en/1.10/ref/middleware/#module-django.middleware.security). However, my recommendation is to handle the redirect

Re: [mezzanine-users] I'm not able to install Cartridge

2016-10-13 Thread Ken Bolton
Hi Ahmad, Can you show us what you tried? Saying, "it didn't work", is not an adequate request for assistance. It should be as simple as `pip uninstall html5` followed by `pip install bleach`. -ken On Thu, Oct 13, 2016 at 5:16 AM, ahmad almashni wrote: > Hi , I tried to

Re: [mezzanine-users] I'm not able to install Cartridge

2016-10-13 Thread ahmad almashni
Hi , I tried to reinstall bleach but it didnt work , I don't know how to downgrade html5 library . can you tell me how please thanks On Wednesday, October 12, 2016 at 3:50:43 PM UTC+3, Akhlaq Rao wrote: > > I had to reinstall bleach to downgrade html5 lib. I am not sure if it will > solve your