Forums

Set up mezzanine help

I've got to the stage where I have installed django on a virtualenv and installed MySql and mezzanine, now do I need to activate either in the wgsi file? and how do I now go about setting up a database and getting my webapp to be like the mezzanine page? Thanks

There is a guide to using a virtualenv with Django that includes the changes to the wsgi file.

Ive done all that tutorial fine, I'm not at the stage where I have intstalled mezzanine and MySql and not gone any further, I'm trying to follow this post but am unsure exactly how to follow it, https://www.pythonanywhere.com/forums/topic/251/

Ok, then I'm not sure where you are. Have you started a mezzanine project (the first step on that forum topic)?

Ive done the first three steps up to now

It looks like the next step is to set up static files. @dscapuano, in his guide, did it by copying everything into /var/www/static, but there is a simpler way nowadays, with our static files section in the web tab. Basically there's three steps:

  1. Choose a folder to store static files in
  2. Tell PythonAnywhere where that folder is, and what URL you want static files on
  3. Tell Django where that folder is, and what URL static files are served at.

For step 2, you go to the Web tab, and set up a Static Files entry, with the URL and path to the directory you've chosen. Don't forget to hit "Reload Web App" when you're done.

For step 3, you should edit your settings.py, set up the variables STATIC_ROOT (the path to the static folder) and STATIC_URL, and then run a management command,

python manage.py collectstatic

That's the django command the collects up all your static files and copies them into a single folder. There's more info in the django docs on static files

I've been working on some end-to-end instructions for Mezzanine. Let me know what you think? https://www.pythonanywhere.com/forums/topic/1178/

Ive started over and following your guide harry however after the step for changing the WSGI file and I copied your code exactly and reloaded my web app however the web app just gives an unhandled exception error, any help? http://teamjjsl.pythonanywhere.com/

Hi @TeamJJSL -- the best way to debug this is probably to look at your error log files, which are linked to from the Web tab. If you can't find anything obvious, then just post what you see here and we can take a closer look.

Thanks giles, you were right, it was obvious, a directory I had copied into the WSGI file needed to be changed where I had named my project something slightly different thanks

Excellent, glad I could help :-)