Thanks, Josh-- I think you were right. At any rate, I found the 'pythonpath' option (uWSGI is a bit of a monster--it has literally hundreds of options), so my uwsgi.ini now contains:
pythonpath = /srv/http/salixmedia.com/test/salix_site However, the urlconf problem I mentioned was a different story. That seems to be caused by the debug toolbar, and I found a workaround in this StackOverflow post: http://tinyurl.com/nsqfucc DEBUG_TOOLBAR_PATCH_SETTINGS = False Anyway, appreciate the tip. On Tue, Jul 8, 2014 at 7:38 AM, Josh Cartmell <[email protected]> wrote: > Hey Matt, I don't have experience with uWSGI, it does seem like a python > path issue. Is salix_site definitely on the Python path in the scope of > uWSGI running? The django runserver command automatically adds your project > to the python path, but that isn't necessarily the case with other server > setups. > > > On Mon, Jul 7, 2014 at 11:54 PM, Matt Gushee <[email protected]> wrote: >> >> Hi, all-- >> >> I have a Mezzanine site under development that I've been hacking on >> for about a week. I'm getting close to being able to deploy the first >> version, and I would like to run it under uWSGI. But uWSGI is having >> trouble finding certain components. >> >> I created the project in a virtualenv, using the simple command: >> >> mezzanine-project salix_site >> >> so the directory structure looks like: >> >> .../test/ >> pyenv/ >> [VIRTUALENV FILES] >> salix_site/ >> __init__.py >> local_settings.py >> manage.py >> settings.py >> urls.py >> wsgi.py >> >> Actually, there's some additional stuff I've added, but I'm just >> trying to show that AFAIK the essential components are all there. I >> think I have only modified INSTALLED_APPS in settings.py, and added >> the SECRET_KEY, NEVERCACHE_KEY, and DATABASES variables in >> local_settings.py. >> >> My current uwsgi.ini file looks like: >> >> > [uwsgi] >> > plugins = python2 >> > chdir = /srv/http/salixmedia.com/test >> > module = salix_site.wsgi >> > callable = application >> > virtualenv = /srv/http/salixmedia.com/test/pyenv >> > master = true >> > processes = 4 >> > socket = /tmp/salix-test.sock >> > chmod-socket = 666 >> > vacuum = true >> >> And when I run 'uwsgi --ini uwsgi.ini', it appears to be finding the >> wsgi module, but then when I attempt to visit the site in my browser, >> I get this error: >> >> > django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must >> > not be empty. >> >> But, as I mentioned above, I did set SECRET_KEY in local_settings.py. >> This error suggests that the local settings are not available. So I >> tried modifying the local settings import statement in settings.py to >> read: >> >> try: >> from salix_site.local_settings import * >> >> Then I get a new error: >> >> > django.core.exceptions.ImproperlyConfigured: The included urlconf >> > salix_site.urls doesn't have any patterns in it >> >> Well, I don't know what to make of that. I didn't create any URL >> patterns, but my urls.py seems to import the default patterns from >> Mezzanine - and anyway, it works fine when I run the site directly >> with './manage.py runserver'. >> >> It appears to me that mezzanine is doing some kind of path/package >> name manipulation that uWSGI doesn't know about. Any idea what I can >> do about this? >> >> -- >> Matt Gushee >> >> -- >> 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 [email protected]. >> 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 [email protected]. > 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
