2) I followed this way to install Mezzanine: here, at the bottom there are links to PythonAnywhere specific guides
3) So, initial state is: Mezzanine is deployed, empty, with default theme.
4) [optional] Basic templates are collected (~80 of them it was)
5) Static is collected via python manage.py collectstatic
1. Add moderna to project
That's a simple step.
You should go to site with theme (for moderna it's here ) and download it. It will be a Django App, probably zipped into archive.
If app is zipped, unzip it.
Move it to your Mezzanine project folder (the one, which got created by command mezzanine-project myproject)
Folder structure should become:
myproject/
+-deploy/
+-static/
+-templates/ [in case you chose to collect them]
+-moderna/ [our new theme]
|
+-__init__.py
+-settings.py
+-urls.py
+-manage.py
+-wsgi.py
|
+-[some other things]
2. Change settings.py
open settings.py of your Mezzanine project
add moderna/templates to TEMPLATE_DIRS in settings.py 1st recor. The point is to give new directions to template loaders - now they 1st look for templates in moderna. Should now look like this:
I guess some servers would pick up new settings and urls automatically. Those which don't should be reloaded manually to catch up and start showing your beautiful new theme.
6. Customization begins
Now you can start customizing Moderna theme via base.html and index.html files in myproject/moderna/templates/ folder.
Postscriptum
I welcome any corrections and extensions, I'm not an expert in Mezzanine customization and the topic has many of slippery slopes.
Preconditions:
0) Versioning
1) I used PythonAnywhere for hosting
2) I followed this way to install Mezzanine: here, at the bottom there are links to PythonAnywhere specific guides
3) So, initial state is: Mezzanine is deployed, empty, with default theme.
4) [optional] Basic templates are collected (~80 of them it was)
5) Static is collected via
python manage.py collectstatic
1. Add moderna to project
That's a simple step.
You should go to site with theme (for moderna it's here ) and download it. It will be a Django App, probably zipped into archive.
If app is zipped, unzip it.
Move it to your Mezzanine project folder (the one, which got created by command
mezzanine-project myproject
)Folder structure should become:
2. Change settings.py
open settings.py of your Mezzanine project
add moderna/templates to TEMPLATE_DIRS in settings.py 1st recor. The point is to give new directions to template loaders - now they 1st look for templates in moderna. Should now look like this:
add moderna app to INSTALLED_APPS in settings.py above all (I presume, that's for Moderna's views, models etc. - backend for templates)
3. New Static Files
4. URLConf
in urls.py, use DIRECT_TO_TEMPLATE selected for / (root url), it should look like this:
5. Reload
I guess some servers would pick up new settings and urls automatically. Those which don't should be reloaded manually to catch up and start showing your beautiful new theme.
6. Customization begins
base.html
andindex.html
files inmyproject/moderna/templates/
folder.Postscriptum
I welcome any corrections and extensions, I'm not an expert in Mezzanine customization and the topic has many of slippery slopes.