[mezzanine-users] Internal Server Error - could be due to static files?

2014-03-16 Thread Jesse Carrigan
I've been poking at static files on Mezzanine for several days trying to 
tease out what is wrong. Here's what I think I know:

I am using Fabric to deploy Mezzanine onto a Vagrant VM.

I have been getting an Internal Server Error message when setting DEBUG = 
False. When DEBUG = True, the site loads fine. Per the docs this appears to 
be due to the static files not being served in the first case.

Initially, I found in the ngnix error logs that there was a problem with 
permissions on the projectname/project/static folder where all the static 
files had been copied during the Fabric deploy. The server was denied 
permission to the favicon.ico file. It looked like the ngnix user did not 
have the appropriate permissions to the top-level /home folder (700 with 
root:root), and thus couldn't access the project folder. 

After looking at the staticfiles docs in Django it looked like the best 
thing to do was to move the static files into a location like 
/var/www/example.com/static and serve them from there. I created the 
directory, copied the static files, and changed the ngnix config file for 
the site to serve the static files from that location. I also set 
STATIC_ROOT in local_settings.py to that location.

However, I continued to get the same Internal Server Error message with 
DEBUG = False. However, the ngnix errors are no longer coming up, and 
nothing is showing up in the console of the browser either. Any suggestions 
on the next step? 

-- 
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] Multilingual website

2014-03-16 Thread Luc Milland
Hello,
Almost one year ago I achieved something usable
(http://www.gitedelaterrasse.fr) using Renyi's gist :
https://gist.github.com/renyi/3596248 .
This is discussed here :
https://github.com/stephenmcd/mezzanine/issues/106 and it seems that
some work has been done since this time.

regards,
Luc

Le dimanche 16 mars 2014 à 01:25 -0700, Cajoline a écrit :
 Hello, 
 for some time now I'm interested in the cms Mezzanine for my clients 
 to replace cms in PHP that I use. 
 But here the problem is that I still need to make multilingual websites and 
 I would like to know how to proced ?
 
 For example I would like to have this type of url: 
 
 -mysite.com/fr/pag 
 -mysite.com/es/page 
 - Etc. 
 
 How to achieve this? 
 
 Is it possible to copy pages to translate next? if yes how to ?
 
 Thank you for your reply and sorry for my English
 


-- 
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: Do I have a basic flaw in my Mezzanine configuration?

2014-03-16 Thread Ross Laird
Actually the site is not working with my S3 settings, so I'll think I'll 
just move along until this pathway becomes more clear.

On Friday, 14 March 2014 15:51:15 UTC-7, Ross Laird wrote:

 Well, my site is working now, with the S3 settings and with compression 
 on, but I'm not sure it's actually loading the files from S3. (The 
 Transfers list on S3 is empty.)
 I'm not sure where to take this next, but for now I'm just going to leave 
 things alone. The site is working, at least.

 On Friday, 14 March 2014 14:44:58 UTC-7, Ross Laird wrote:

 Thanks for the tip. I have also seen the incompressible error due to 
 offsite files, but in my current situation I have not changed any templates 
 and the compression works without errors if I deactivate S3.  

 On Friday, 14 March 2014 14:38:57 UTC-7, Josh Cartmell wrote:

 Hey Ross, I don't have experience with S3, so I don't know if this 
 applies, but in the past I have seen the incompressible file error if I 
 accidentally include something within the compress templatetags that isn't 
 on the same local filesystem as the site.  Someone with more experience may 
 know how to get it working.


 On Fri, Mar 14, 2014 at 2:24 PM, Ross Laird ro...@rosslaird.com wrote:

 Without really knowing exactly how it happened, I got S3 file storage 
 working. I turned compression off, for now, and will try to debug that 
 next. As for the basic S3 setup, here are some of the things I did, in 
 case 
 it helps someone else:

 1. I added the following two lines to my S3 settings:

 from S3 import CallingFormat
 AWS_CALLING_FORMAT = CallingFormat.SUBDOMAIN

 I don't really understand the above line, so I can't comment on why it 
 might be useful. It is from the django-storages documentation.

 2. I tweaked my wsgi file a bit. It now reads as follows:

 from __future__ import unicode_literals

 import os
 import sys
 import site

 # Virtual environment on Python path

 site.addsitedir('/home/rosslaird/.virtualenvs/mezzanine3/lib/python2.6/site-packages')

 sys.path.insert(1, '/home/rosslaird/m3')
 sys.path.append('/home/rosslaird')

 PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
 settings_module = %s.settings % PROJECT_ROOT.split(os.sep)[-1]
 os.environ.setdefault(DJANGO_SETTINGS_MODULE, settings_module)

 from django.core.wsgi import get_wsgi_application
 application = get_wsgi_application()
   
 I did not change my Apache settings. So, the two changes above are 
 pretty much all I did.
 Now onto the compression issues.
 (I still don't know if my wsgi settings reflect some basic 
 configuration issue with Mezzanine, even with S3 now working.)


 On Friday, 14 March 2014 09:59:16 UTC-7, Ross Laird wrote:

 I have been trying for quite some time to get my static files onto 
 Amazon S3, and I just keep running into show-stopping issues. And I think 
 that my problems with S3 have revealed a flaw in my basic Mezzanine 
 configuration. Once I activate the S3 setup for static files, I get an 
 error like this:

 UncompressableFileError: 'css/animate.css' could not be found in the 
 COMPRESS_ROOT '/home/rosslaird/static' or with staticfiles.

 The folder 'rosslaird/static' does not exist and should not be part of 
 my Mezzanine configuration. On the other hand, my site runs just fine 
 (until I add the S3 configuration). I expect that 'static' is being 
 appended at runtime, and that '/home/rosslaird' is the offending part. It 
 does appear in my wsgi file:

 from __future__ import unicode_literals
 # Virtual environment on Python path
 import site
 site.addsitedir('/home/rosslaird/.virtualenvs/
 mezzanine3/lib/python2.6/site-packages')
 import os, sys
 sys.path.insert(0, '/home/rosslaird/m3/zeni_core')
 sys.path.insert(1, '/home/rosslaird/m3')
 sys.path.append('/home/rosslaird')
 os.environ['DJANGO_SETTINGS_MODULE'] = 'm3.settings'
 import django.core.handlers.wsgi
 PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
 from django.core.wsgi import get_wsgi_application
 application = get_wsgi_application()

 The offending folder also appears in my apache configuration, but I 
 think that the actual problem may be in the wsgi settings above. Or, at 
 least I should find out if the above is broken first, before looking at 
 Apache as the culprit. 

 Whatever the cause, this issue also results (with the S3 settings 
 activated) in django-compressor looking for files in one folder above the 
 place where the files actually are. For example, I've received various 
 error messages in which django-compressor looks for 'css/whatever.css' 
 rather than 'static/css/whatever.css'. But every way that I've tried to 
 change the paths for djangoo-compressor to search the proper path seems 
 not 
 to work. And my S3 paths and settings seem correct:

 AWS_SECRET_ACCESS_KEY = 'my_key'
 AWS_ACCESS_KEY_ID = 'my_other_key'
 AWS_STORAGE_BUCKET_NAME = 'ral_mezzanine'
 AWS_QUERYSTRING_AUTH = False
 STATICFILES_STORAGE = 

[mezzanine-users] Fab Script ImportError: No module named future.builtins

2014-03-16 Thread Ziwei Zhou
Hi

Is the current fabfile.py working in python 3 environment? I tried to run 
fab under python 2.7 and got the error about 

Traceback (most recent call last):

  File /usr/local/lib/python2.7/dist-packages/fabric/main.py, line 632, 
in main

docstring, callables, default = load_fabfile(fabfile)

  File /usr/local/lib/python2.7/dist-packages/fabric/main.py, line 164, 
in load_fabfile

imported = importer(os.path.splitext(fabfile)[0])

  File /sites/trip/code/tour/fabfile.py, line 3, in module

from future.builtins import input, open

*ImportError: No module named future.builtins*

After I upgrade to python 3.3, fab through out the same error message.  It 
seems fabric is still not python 3.3 compatible. 

Anyone has the same issue? 

Regards,

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