[mezzanine-users] HOST_THEMES not working with imported themes

2016-07-21 Thread nikhil parmar
Hey I have been trying to enable the HOST_THEMES feature in my application. 


My directory structure is as follows 

flat and moderna are my themes.


and I have enabled them in my INSTALLED_APPS

INSTALLED_APPS = (
"flat",
"moderna",
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.redirects",
"django.contrib.sessions",
"django.contrib.sites",
"django.contrib.sitemaps",
"django.contrib.staticfiles",
"mezzanine.boot",
"mezzanine.conf",
"mezzanine.core",
"mezzanine.generic",
"mezzanine.pages",
"mezzanine.blog",
"mezzanine.forms",
"mezzanine.galleries",
"mezzanine.twitter",
# "mezzanine.accounts",
# "mezzanine.mobile",)
 

HOST_THEMES = [('localhost', 'moderna'),] 

I have also uncommented the - url("^$", mezzanine.pages.views.page, {"slug": 
> "/"}, name="home"), in main url.py


I think what I am missing  is I have imported the themes and they don't 
seem to have any models or admin.py and in them. Is it something related to 
it? 

-- 
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] install Cartridge 0.11.0 on windows (via cygwin)

2016-07-21 Thread Ryne Everett
As for issue (2) you need to downgrade to html5lib<=0.999. This is
pinned in bleach so I'm not sure why it wasn't constrained. (I had this
problem too.) You can fix it with `pip install -U bleach`.

On Thu, Jul 21, 2016 at 8:31 PM, Alain Turcotte 
wrote:

> I am trying to install Cartridge 0.11.0 on windows (via cygwin), and i
> have 2 bugs:
>
>
> 1)
>
> "mezzanine-project -a cartridge atcart" give me the error :
>
> CommandError: 'atcart' conflicts with the name of an existing Python
> module and cannot be used as a project name. Please try another name.
>
>
>
> 2)
>
> "python manage.py createdb --noinput" give me the error :
>
> erreur : No module named 'html5lib.sanitizer'
>
>
>
> the source of the problem is in the package "bleach" , in the __init__.py
> :
>
> import html5lib
>
> from html5lib.sanitizer import HTMLSanitizer
>
>
>
> any suggestion ?
>
>
>
> --
> 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] install Cartridge 0.11.0 on windows (via cygwin)

2016-07-21 Thread Alain Turcotte


I am trying to install Cartridge 0.11.0 on windows (via cygwin), and i have 
2 bugs: 


1)

"mezzanine-project -a cartridge atcart" give me the error : 

CommandError: 'atcart' conflicts with the name of an existing Python module 
and cannot be used as a project name. Please try another name.

 

2)

"python manage.py createdb --noinput" give me the error :

erreur : No module named 'html5lib.sanitizer' 

 

the source of the problem is in the package "bleach" , in the __init__.py  
: 

import html5lib

from html5lib.sanitizer import HTMLSanitizer

 

any suggestion ?



-- 
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] tel: being stripped from anchor href when saving a RichTextField. How do I allow it?

2016-07-21 Thread RandomDude
Yay! Happy customer.
:D

I just put your snippet in my models.py and it works.

from bleach import sanitizer

if "tel" not in sanitizer.BleachSanitizer.allowed_protocols:
sanitizer.BleachSanitizer.allowed_protocols += ["tel"]

I'm not in a position to upgrade Mezzanine due to formal procedures around 
pen testing.
Thanks.


On Thursday, July 21, 2016 at 5:58:34 PM UTC+12, Stephen McDonald wrote:
>
> I did a bit of digging and it's a known issue with the "bleach" library we 
> use to sanitize HTML:
>
> https://github.com/mozilla/bleach/issues/102
>
> I've added the patch mentioned in the issue and it appears to work:
>
>
> https://github.com/stephenmcd/mezzanine/commit/a50da71da521b3fb03f8b089736eca9656e71bbb
>
> Prior to upgrading, you might be able to do the same in your project's 
> code somewhere, possibly its settings.py module.
>
> On Thu, Jul 21, 2016 at 12:18 PM, RandomDude  > wrote:
>
>> Version: Mezzanine (4.0.1)
>>
>>
>> Mailto before save:
>>
>> mailto:som...@example.com 
>> ?Subject=Hello%20again">Send 
>> Mail
>>
>> After save: (works!)
>>
>> mailto:som...@example.com 
>> ?Subject=Hello%20again">Send 
>> Mail
>>
>> Click to call tel before save:
>>
>> +1 (303) 499-7111
>>
>> After save: (href stripped out)
>>
>> +1 (303) 499-7111
>>
>> Here are my rich text settings:
>>
>> RICHTEXT_ALLOWED_TAGS = 
>> ('p','h1','h2','h3','h4','h5','h6','ol','ul','li','strong','table','caption','thead','tbody','tr','th','td','br','a',
>>  
>> 'em')
>> RICHTEXT_ALLOWED_ATTRIBUTES = ('href')
>>
>> The following are not in used in my settings.py file.
>>
>> RICHTEXT_ALLOWED_STYLES
>> RICHTEXT_FILTER
>> RICHTEXT_FILTERS
>> RICHTEXT_FILTER_LEVEL
>> RICHTEXT_WIDGET_CLASS
>>
>> How do I prevent tel: from being stripped out please?
>>
>> -- 
>> 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.
>>
>
>
>
> -- 
> 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.


Re: [mezzanine-users] Need some help with assigning user site permission in a view

2016-07-21 Thread zruu
Thank you man! This helped me out A LOT! 

Cheers!

Den torsdag 21 juli 2016 kl. 23:20:24 UTC+2 skrev Ryne Everett:
>
> Ah, that makes sense. I guess you can't pass ManyToManyField's in the 
> constructor. Try:
>
> siteperms = SitePermissions.objects.create(user=user)
> siteperms.sites.add(site)
>
> On Thu, Jul 21, 2016 at 5:15 PM, zruu  
> wrote:
>
>> Hi Ryne,
>>
>> Thanks for the quick reply. That was what I was looking for. I have a 
>> form on the front end that a user can create a site, and a user account at 
>> the same time. I want to automate this to minimize the administration as 
>> possible.
>>
>> However I tried that, and I got the error:
>>
>> 'sites' is an invalid keyword argument for this function
>>
>>
>>
>> Den torsdag 21 juli 2016 kl. 23:07:40 UTC+2 skrev Ryne Everett:
>>>
>>> SitePermission.objects.create(user=user, sites=(site,))
>>>
>>> I question whether this is really what you want to do, but without a 
>>> better idea what your goal is it's all I can offer.
>>>
>>> On Thu, Jul 21, 2016 at 4:56 PM, zruu  wrote:
>>>
 Hey guys,

 I really need your help. I'm stuck at the moment. Maybe is too late. 
 However. I need to in my class view add site permission instead of using 
 through the admin. I have no clue how to do this.

 I looked through the Mezzanine code and all I found was this piece of 
 code that looks something of value:

 sites = user.sitepermissions.sites.all() 

 *What I want to accomplish is to first to create the site object in my 
 view:*

 site = Site.objects.create(name=name, domain=domain)

 Then set permission for my user to that site. How could I do this?



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

-- 
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] Need some help with assigning user site permission in a view

2016-07-21 Thread Ryne Everett
Ah, that makes sense. I guess you can't pass ManyToManyField's in the
constructor. Try:

siteperms = SitePermissions.objects.create(user=user)
siteperms.sites.add(site)

On Thu, Jul 21, 2016 at 5:15 PM, zruu  wrote:

> Hi Ryne,
>
> Thanks for the quick reply. That was what I was looking for. I have a form
> on the front end that a user can create a site, and a user account at the
> same time. I want to automate this to minimize the administration as
> possible.
>
> However I tried that, and I got the error:
>
> 'sites' is an invalid keyword argument for this function
>
>
>
> Den torsdag 21 juli 2016 kl. 23:07:40 UTC+2 skrev Ryne Everett:
>>
>> SitePermission.objects.create(user=user, sites=(site,))
>>
>> I question whether this is really what you want to do, but without a
>> better idea what your goal is it's all I can offer.
>>
>> On Thu, Jul 21, 2016 at 4:56 PM, zruu  wrote:
>>
>>> Hey guys,
>>>
>>> I really need your help. I'm stuck at the moment. Maybe is too late.
>>> However. I need to in my class view add site permission instead of using
>>> through the admin. I have no clue how to do this.
>>>
>>> I looked through the Mezzanine code and all I found was this piece of
>>> code that looks something of value:
>>>
>>> sites = user.sitepermissions.sites.all()
>>>
>>> *What I want to accomplish is to first to create the site object in my
>>> view:*
>>>
>>> site = Site.objects.create(name=name, domain=domain)
>>>
>>> Then set permission for my user to that site. How could I do this?
>>>
>>>
>>>
>>> --
>>> 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-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.


Re: [mezzanine-users] Need some help with assigning user site permission in a view

2016-07-21 Thread zruu
Hi Ryne,

Thanks for the quick reply. That was what I was looking for. I have a form 
on the front end that a user can create a site, and a user account at the 
same time. I want to automate this to minimize the administration as 
possible.

However I tried that, and I got the error:

'sites' is an invalid keyword argument for this function



Den torsdag 21 juli 2016 kl. 23:07:40 UTC+2 skrev Ryne Everett:
>
> SitePermission.objects.create(user=user, sites=(site,))
>
> I question whether this is really what you want to do, but without a 
> better idea what your goal is it's all I can offer.
>
> On Thu, Jul 21, 2016 at 4:56 PM, zruu  
> wrote:
>
>> Hey guys,
>>
>> I really need your help. I'm stuck at the moment. Maybe is too late. 
>> However. I need to in my class view add site permission instead of using 
>> through the admin. I have no clue how to do this.
>>
>> I looked through the Mezzanine code and all I found was this piece of 
>> code that looks something of value:
>>
>> sites = user.sitepermissions.sites.all() 
>>
>> *What I want to accomplish is to first to create the site object in my 
>> view:*
>>
>> site = Site.objects.create(name=name, domain=domain)
>>
>> Then set permission for my user to that site. How could I do this?
>>
>>
>>
>> -- 
>> 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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Need some help with assigning user site permission in a view

2016-07-21 Thread Ryne Everett
SitePermission.objects.create(user=user, sites=(site,))

I question whether this is really what you want to do, but without a better
idea what your goal is it's all I can offer.

On Thu, Jul 21, 2016 at 4:56 PM, zruu  wrote:

> Hey guys,
>
> I really need your help. I'm stuck at the moment. Maybe is too late.
> However. I need to in my class view add site permission instead of using
> through the admin. I have no clue how to do this.
>
> I looked through the Mezzanine code and all I found was this piece of code
> that looks something of value:
>
> sites = user.sitepermissions.sites.all()
>
> *What I want to accomplish is to first to create the site object in my
> view:*
>
> site = Site.objects.create(name=name, domain=domain)
>
> Then set permission for my user to that site. How could I do this?
>
>
>
> --
> 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] Need some help with assigning user site permission in a view

2016-07-21 Thread zruu
Hey guys,

I really need your help. I'm stuck at the moment. Maybe is too late. 
However. I need to in my class view add site permission instead of using 
through the admin. I have no clue how to do this.

I looked through the Mezzanine code and all I found was this piece of code 
that looks something of value:

sites = user.sitepermissions.sites.all() 

*What I want to accomplish is to first to create the site object in my 
view:*

site = Site.objects.create(name=name, domain=domain)

Then set permission for my user to that site. How could I do this?



-- 
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] Bad Gateway

2016-07-21 Thread Ryne Everett
A couple causes of gunicorn timeouts I've seen is larger files that don't
transfer within the default --timeout (30 seconds). This isn't necessarily
your problem but if it is you can increase the timeout. I've also seen it
when streaming files, in which case the solution is to make the workers
asynchronous (-k gevent). Going from memory here so no promises.

On Thu, Jul 21, 2016 at 12:08 PM, loevdav 
wrote:

> Hi Ken,
>
> Thanks.
>
> Yes I can but I'm not sure where do you want to get because the issuet
> happens on different sites and on different actions (sometimes just loading
> the home page and other time isnide the admin).
>
> I have been looking on the web and it looks like some people solved it by
> increasing the number of workers for gunicorn. But these sites have very
> very  low traffic and do not have any complex queries or operations.
>
> The more complex sites are on a server of their own and I have no issue.
>
> Anyway thanks and let me know what you want to try with runserver.
>
> Thanks
> David
>
>
> On Thursday, July 21, 2016 at 4:16:39 PM UTC+2, Kenneth Bolton wrote:
>>
>> Are you able to use the django runserver? It is very hard for me to tell
>> where the problem might be, so I would step through each piece until I find
>> the root cause, starting with the django runserver.
>>
>> hth,
>>
>> ken
>>
>> On Thu, Jul 21, 2016 at 6:06 AM, loevdav  wrote:
>>
>>> Hi Ken,
>>>
>>> Thanks a lot for the reply:
>>>
>>> Here are the logs:
>>>
>>>
>>> *Error log*
>>>
>>> [2016-07-01 10:30:43 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:1105)
>>> [2016-07-01 10:30:49 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:6783)
>>> [2016-07-01 10:35:53 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:7129)
>>> [2016-07-01 10:41:32 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:7317)
>>> [2016-07-01 11:25:37 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:7802)
>>> [2016-07-01 11:30:44 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:8969)
>>> [2016-07-01 12:45:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:11499)
>>> [2016-07-01 15:25:46 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:17183)
>>> [2016-07-01 15:30:43 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:17363)
>>> [2016-07-06 23:00:35 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:27959)
>>> [2016-07-08 09:25:56 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13078)
>>> [2016-07-08 09:30:50 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13287)
>>> [2016-07-08 09:40:54 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13675)
>>> [2016-07-08 09:45:52 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13876)
>>> [2016-07-08 10:45:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:14081)
>>> [2016-07-08 10:55:52 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:16225)
>>> [2016-07-13 11:05:51 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:23348)
>>> [2016-07-13 11:15:53 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:24537)
>>> [2016-07-13 11:20:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:24786)
>>> [2016-07-13 12:00:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:28216)
>>> [2016-07-15 12:30:44 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:29462)
>>> [2016-07-20 12:05:40 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:19347)
>>> [2016-07-20 12:35:37 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:25708)
>>> [2016-07-20 12:55:42 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:30319)
>>> [2016-07-21 09:10:45 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:15845)
>>>
>>>
>>> *nginx error log*
>>>
>>> 2016/04/27 21:17:00 [info] 30913#0: *266 client 79.44.98.211 closed
>>> keepalive connection
>>> 2016/04/27 21:17:00 [info] 30913#0: *268 client 79.44.98.211 closed
>>> keepalive connection
>>> 2016/04/27 21:17:00 [info] 30912#0: *270 client 79.44.98.211 closed
>>> keepalive connection
>>> 2016/04/27 21:17:00 [info] 30912#0: *272 client 79.44.98.211 closed
>>> keepalive connection
>>> 2016/04/27 21:17:00 [info] 30912#0: *274 client 79.44.98.211 closed
>>> keepalive connection
>>> 2016/04/27 21:17:00 [info] 30912#0: *276 client 79.44.98.211 closed
>>> keepalive connection
>>> 2016/04/27 21:17:00 [info] 30912#0: *278 client 79.44.98.211 closed
>>> keepalive connection
>>> 2016/04/27 21:17:00 [info] 30912#0: *280 client 79.44.98.211 closed
>>> keepalive connection
>>> 2016/04/27 21:17:00 [info] 30912#0: *282 client 79.44.98.211 closed
>>> keepalive connection
>>> 2016/04/27 21:17:42 [info] 30912#0: *295 client 79.44.98.211 closed
>>> keepalive connection
>>> 2016/04/27 21:17:42 [info] 30912#0: *301 client 79.44.98.211 closed
>>> keepalive connection
>>>
>>> *Supervisor log*
>>>
>>> /home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/pages/templatetags/pages_tags.py:134:
>>> RemovedInDjango110Warning: render() must be called with a dict, not a
>>> Context.
>>>   return t.render(Context(context))
>>>
>>> /home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/django/template/defaulttags.py:499:
>>> RemovedInDjango110Warning: Reversing by 

Re: [mezzanine-users] Bad Gateway

2016-07-21 Thread loevdav
Hi Ken,

Thanks.

Yes I can but I'm not sure where do you want to get because the issuet 
happens on different sites and on different actions (sometimes just loading 
the home page and other time isnide the admin).

I have been looking on the web and it looks like some people solved it by 
increasing the number of workers for gunicorn. But these sites have very 
very  low traffic and do not have any complex queries or operations.

The more complex sites are on a server of their own and I have no issue. 

Anyway thanks and let me know what you want to try with runserver.

Thanks
David


On Thursday, July 21, 2016 at 4:16:39 PM UTC+2, Kenneth Bolton wrote:
>
> Are you able to use the django runserver? It is very hard for me to tell 
> where the problem might be, so I would step through each piece until I find 
> the root cause, starting with the django runserver.
>
> hth,
>
> ken
>
> On Thu, Jul 21, 2016 at 6:06 AM, loevdav  > wrote:
>
>> Hi Ken,
>>
>> Thanks a lot for the reply:
>>
>> Here are the logs:
>>
>>
>> *Error log*
>>
>> [2016-07-01 10:30:43 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:1105)
>> [2016-07-01 10:30:49 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:6783)
>> [2016-07-01 10:35:53 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:7129)
>> [2016-07-01 10:41:32 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:7317)
>> [2016-07-01 11:25:37 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:7802)
>> [2016-07-01 11:30:44 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:8969)
>> [2016-07-01 12:45:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:11499)
>> [2016-07-01 15:25:46 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:17183)
>> [2016-07-01 15:30:43 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:17363)
>> [2016-07-06 23:00:35 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:27959)
>> [2016-07-08 09:25:56 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13078)
>> [2016-07-08 09:30:50 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13287)
>> [2016-07-08 09:40:54 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13675)
>> [2016-07-08 09:45:52 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13876)
>> [2016-07-08 10:45:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:14081)
>> [2016-07-08 10:55:52 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:16225)
>> [2016-07-13 11:05:51 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:23348)
>> [2016-07-13 11:15:53 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:24537)
>> [2016-07-13 11:20:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:24786)
>> [2016-07-13 12:00:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:28216)
>> [2016-07-15 12:30:44 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:29462)
>> [2016-07-20 12:05:40 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:19347)
>> [2016-07-20 12:35:37 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:25708)
>> [2016-07-20 12:55:42 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:30319)
>> [2016-07-21 09:10:45 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:15845)
>>
>>
>> *nginx error log*
>>
>> 2016/04/27 21:17:00 [info] 30913#0: *266 client 79.44.98.211 closed 
>> keepalive connection
>> 2016/04/27 21:17:00 [info] 30913#0: *268 client 79.44.98.211 closed 
>> keepalive connection
>> 2016/04/27 21:17:00 [info] 30912#0: *270 client 79.44.98.211 closed 
>> keepalive connection
>> 2016/04/27 21:17:00 [info] 30912#0: *272 client 79.44.98.211 closed 
>> keepalive connection
>> 2016/04/27 21:17:00 [info] 30912#0: *274 client 79.44.98.211 closed 
>> keepalive connection
>> 2016/04/27 21:17:00 [info] 30912#0: *276 client 79.44.98.211 closed 
>> keepalive connection
>> 2016/04/27 21:17:00 [info] 30912#0: *278 client 79.44.98.211 closed 
>> keepalive connection
>> 2016/04/27 21:17:00 [info] 30912#0: *280 client 79.44.98.211 closed 
>> keepalive connection
>> 2016/04/27 21:17:00 [info] 30912#0: *282 client 79.44.98.211 closed 
>> keepalive connection
>> 2016/04/27 21:17:42 [info] 30912#0: *295 client 79.44.98.211 closed 
>> keepalive connection
>> 2016/04/27 21:17:42 [info] 30912#0: *301 client 79.44.98.211 closed 
>> keepalive connection
>>
>> *Supervisor log*
>>
>> /home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/pages/templatetags/pages_tags.py:134:
>>  
>> RemovedInDjango110Warning: render() must be called with a dict, not a 
>> Context.
>>   return t.render(Context(context))
>>
>> /home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/django/template/defaulttags.py:499:
>>  
>> RemovedInDjango110Warning: Reversing by dotted path is deprecated 
>> (mezzanine.pages.views.page).
>>   url = reverse(view_name, args=args, kwargs=kwargs, 
>> current_app=current_app)
>>
>> /home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/template/__init__.py:122:
>>  
>> RemovedInDjango110Warning: render() must be called with a dict, not a 
>> Context.
>>   return self.template.render(context)
>>
>> /home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/pages/templatetags/pages_tags.py:134:
>>  
>> 

Re: [mezzanine-users] Bad Gateway

2016-07-21 Thread Ken Bolton
Are you able to use the django runserver? It is very hard for me to tell
where the problem might be, so I would step through each piece until I find
the root cause, starting with the django runserver.

hth,

ken

On Thu, Jul 21, 2016 at 6:06 AM, loevdav 
wrote:

> Hi Ken,
>
> Thanks a lot for the reply:
>
> Here are the logs:
>
>
> *Error log*
>
> [2016-07-01 10:30:43 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:1105)
> [2016-07-01 10:30:49 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:6783)
> [2016-07-01 10:35:53 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:7129)
> [2016-07-01 10:41:32 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:7317)
> [2016-07-01 11:25:37 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:7802)
> [2016-07-01 11:30:44 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:8969)
> [2016-07-01 12:45:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:11499)
> [2016-07-01 15:25:46 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:17183)
> [2016-07-01 15:30:43 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:17363)
> [2016-07-06 23:00:35 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:27959)
> [2016-07-08 09:25:56 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13078)
> [2016-07-08 09:30:50 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13287)
> [2016-07-08 09:40:54 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13675)
> [2016-07-08 09:45:52 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13876)
> [2016-07-08 10:45:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:14081)
> [2016-07-08 10:55:52 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:16225)
> [2016-07-13 11:05:51 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:23348)
> [2016-07-13 11:15:53 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:24537)
> [2016-07-13 11:20:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:24786)
> [2016-07-13 12:00:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:28216)
> [2016-07-15 12:30:44 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:29462)
> [2016-07-20 12:05:40 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:19347)
> [2016-07-20 12:35:37 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:25708)
> [2016-07-20 12:55:42 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:30319)
> [2016-07-21 09:10:45 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:15845)
>
>
> *nginx error log*
>
> 2016/04/27 21:17:00 [info] 30913#0: *266 client 79.44.98.211 closed
> keepalive connection
> 2016/04/27 21:17:00 [info] 30913#0: *268 client 79.44.98.211 closed
> keepalive connection
> 2016/04/27 21:17:00 [info] 30912#0: *270 client 79.44.98.211 closed
> keepalive connection
> 2016/04/27 21:17:00 [info] 30912#0: *272 client 79.44.98.211 closed
> keepalive connection
> 2016/04/27 21:17:00 [info] 30912#0: *274 client 79.44.98.211 closed
> keepalive connection
> 2016/04/27 21:17:00 [info] 30912#0: *276 client 79.44.98.211 closed
> keepalive connection
> 2016/04/27 21:17:00 [info] 30912#0: *278 client 79.44.98.211 closed
> keepalive connection
> 2016/04/27 21:17:00 [info] 30912#0: *280 client 79.44.98.211 closed
> keepalive connection
> 2016/04/27 21:17:00 [info] 30912#0: *282 client 79.44.98.211 closed
> keepalive connection
> 2016/04/27 21:17:42 [info] 30912#0: *295 client 79.44.98.211 closed
> keepalive connection
> 2016/04/27 21:17:42 [info] 30912#0: *301 client 79.44.98.211 closed
> keepalive connection
>
> *Supervisor log*
>
> /home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/pages/templatetags/pages_tags.py:134:
> RemovedInDjango110Warning: render() must be called with a dict, not a
> Context.
>   return t.render(Context(context))
>
> /home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/django/template/defaulttags.py:499:
> RemovedInDjango110Warning: Reversing by dotted path is deprecated
> (mezzanine.pages.views.page).
>   url = reverse(view_name, args=args, kwargs=kwargs,
> current_app=current_app)
>
> /home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/template/__init__.py:122:
> RemovedInDjango110Warning: render() must be called with a dict, not a
> Context.
>   return self.template.render(context)
>
> /home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/pages/templatetags/pages_tags.py:134:
> RemovedInDjango110Warning: render() must be called with a dict, not a
> Context.
>   return t.render(Context(context))
>
> /home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/django/template/defaulttags.py:499:
> RemovedInDjango110Warning: Reversing by dotted path is deprecated
> (mezzanine.pages.views.page).
>   url = reverse(view_name, args=args, kwargs=kwargs,
> current_app=current_app)
>
> /home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/template/__init__.py:122:
> RemovedInDjango110Warning: render() must be called with a dict, not a
> Context.
>   return self.template.render(context)
>
> /home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/pages/templatetags/pages_tags.py:134:
> RemovedInDjango110Warning: render() must be called with a 

Re: [mezzanine-users] Bad Gateway

2016-07-21 Thread loevdav
Hi Ken,

Thanks a lot for the reply:

Here are the logs:


*Error log*

[2016-07-01 10:30:43 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:1105)
[2016-07-01 10:30:49 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:6783)
[2016-07-01 10:35:53 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:7129)
[2016-07-01 10:41:32 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:7317)
[2016-07-01 11:25:37 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:7802)
[2016-07-01 11:30:44 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:8969)
[2016-07-01 12:45:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:11499)
[2016-07-01 15:25:46 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:17183)
[2016-07-01 15:30:43 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:17363)
[2016-07-06 23:00:35 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:27959)
[2016-07-08 09:25:56 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13078)
[2016-07-08 09:30:50 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13287)
[2016-07-08 09:40:54 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13675)
[2016-07-08 09:45:52 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:13876)
[2016-07-08 10:45:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:14081)
[2016-07-08 10:55:52 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:16225)
[2016-07-13 11:05:51 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:23348)
[2016-07-13 11:15:53 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:24537)
[2016-07-13 11:20:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:24786)
[2016-07-13 12:00:47 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:28216)
[2016-07-15 12:30:44 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:29462)
[2016-07-20 12:05:40 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:19347)
[2016-07-20 12:35:37 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:25708)
[2016-07-20 12:55:42 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:30319)
[2016-07-21 09:10:45 +] [3496] [CRITICAL] WORKER TIMEOUT (pid:15845)


*nginx error log*

2016/04/27 21:17:00 [info] 30913#0: *266 client 79.44.98.211 closed 
keepalive connection
2016/04/27 21:17:00 [info] 30913#0: *268 client 79.44.98.211 closed 
keepalive connection
2016/04/27 21:17:00 [info] 30912#0: *270 client 79.44.98.211 closed 
keepalive connection
2016/04/27 21:17:00 [info] 30912#0: *272 client 79.44.98.211 closed 
keepalive connection
2016/04/27 21:17:00 [info] 30912#0: *274 client 79.44.98.211 closed 
keepalive connection
2016/04/27 21:17:00 [info] 30912#0: *276 client 79.44.98.211 closed 
keepalive connection
2016/04/27 21:17:00 [info] 30912#0: *278 client 79.44.98.211 closed 
keepalive connection
2016/04/27 21:17:00 [info] 30912#0: *280 client 79.44.98.211 closed 
keepalive connection
2016/04/27 21:17:00 [info] 30912#0: *282 client 79.44.98.211 closed 
keepalive connection
2016/04/27 21:17:42 [info] 30912#0: *295 client 79.44.98.211 closed 
keepalive connection
2016/04/27 21:17:42 [info] 30912#0: *301 client 79.44.98.211 closed 
keepalive connection

*Supervisor log*

/home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/pages/templatetags/pages_tags.py:134:
 
RemovedInDjango110Warning: render() must be called with a dict, not a 
Context.
  return t.render(Context(context))

/home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/django/template/defaulttags.py:499:
 
RemovedInDjango110Warning: Reversing by dotted path is deprecated 
(mezzanine.pages.views.page).
  url = reverse(view_name, args=args, kwargs=kwargs, 
current_app=current_app)

/home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/template/__init__.py:122:
 
RemovedInDjango110Warning: render() must be called with a dict, not a 
Context.
  return self.template.render(context)

/home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/pages/templatetags/pages_tags.py:134:
 
RemovedInDjango110Warning: render() must be called with a dict, not a 
Context.
  return t.render(Context(context))

/home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/django/template/defaulttags.py:499:
 
RemovedInDjango110Warning: Reversing by dotted path is deprecated 
(mezzanine.pages.views.page).
  url = reverse(view_name, args=args, kwargs=kwargs, 
current_app=current_app)

/home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/template/__init__.py:122:
 
RemovedInDjango110Warning: render() must be called with a dict, not a 
Context.
  return self.template.render(context)

/home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/mezzanine/pages/templatetags/pages_tags.py:134:
 
RemovedInDjango110Warning: render() must be called with a dict, not a 
Context.
  return t.render(Context(context))

/home/mars/.virtualenvs/domus/local/lib/python2.7/site-packages/django/template/defaulttags.py:499:
 
RemovedInDjango110Warning: Reversing by dotted path is deprecated 
(mezzanine.pages.views.page).
  url = reverse(view_name, args=args, kwargs=kwargs, 
current_app=current_app)


On this server I have 10 low traffic website and 4GB RAM.

Here is the RAM usage: