Permalink
Browse files

Added installation instructions for adding Mezzanine to an existing p…

…roject.
  • Loading branch information...
1 parent 4318b88 commit 194e9c51c5f17d577b866054ae0ee732932ce66e @spookylukey committed Jan 10, 2012
Showing with 60 additions and 0 deletions.
  1. +60 −0 README.rst
View
@@ -101,6 +101,66 @@ can be used for creating a new Mezzanine project in a similar fashion to
$ mezzanine-project project_name
+Alternatively, if you have an existing Django project, you can install Mezzanine
+into it by the following steps (which assume experience with previous Django
+projects):
+
+* Add the following apps to your INSTALLED_APPS::
+
+ "django.contrib.comments",
+ "south",
+ "mezzanine.boot",
+ "mezzanine.conf",
+ "mezzanine.core",
+ "mezzanine.generic",
+ "mezzanine.blog",
+ "mezzanine.forms",
+ "mezzanine.pages",
+ "mezzanine.twitter",
+
+* Add the following to TEMPLATE_CONTEXT_PROCESSORS::
+
+ "django.core.context_processors.request",
+ "mezzanine.conf.context_processors.settings",
+
+ If the setting doesn't already exist, remember to start with the Django
+ defaults for your version of Django.
+
+* Modify MIDDLEWARE_CLASSES:
+
+ * Add "mezzanine.core.middleware.AdminLoginInterfaceSelector" to the end.
+
+ * You may want to replace Django's "UpdateCacheMiddleware" with
+ "mezzanine.core.middleware.DeviceAwareUpdateCacheMiddleware" and Django's
+ "FetchFromMiddleware" with
+ "mezzanine.core.middleware.DeviceAwareFetchFromCacheMiddleware"
+
+* At the bottom of settings.py, add these lines::
+
+ PACKAGE_NAME_FILEBROWSER = "filebrowser_safe"
+ PACKAGE_NAME_GRAPPELLI = "grappelli_safe"
+ from mezzanine.utils.conf import set_dynamic_settings
+ set_dynamic_settings(globals())
+
+* Modify your urls.py so that it contains the named URL 'home'::
+
+ from mezzanine.core.views import direct_to_template
+
+ urlpatterns = patterns("",
+ ...
+ url("^$", direct_to_template, {"template": "index.html"}, name="home"),
+ ...
+
+ and, *after* all your other URLs, the catch-all mezzanine handler::
+
+ ("^", include("mezzanine.urls")),
+
+
+* To make use of the CSS included with the default template,
+ copy the files from mezzanine/project_template/site_media to a folder
+ where they will be served as static files in your project.
+
+
You can then run your project with the usual Django steps::
$ cd project_name

0 comments on commit 194e9c5

Please sign in to comment.