Permalink
Browse files

we use it in PyLucid CMS.

Add notes about limitations.
  • Loading branch information...
1 parent bdde9e8 commit f1e9da527804ba76da64f4afb5466ea584ce38b6 @jedie committed Jun 26, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 django_tools/dynamic_site/README.creole
@@ -1,7 +1,5 @@
== Dynamic SITE ID ==
-**experimental, yet!**
-
Set the SITE_ID dynamic by the current Domain Name.
You can also specify domain name alias as a simple string or as a regular expression.
@@ -35,6 +33,14 @@ INSTALLED_APPS = (
USE_DYNAMIC_SITE_MIDDLEWARE = True
}}}
+=== limitations ===
+
+==== defaults ====
+
+You can't set the default ID in model fields with {{{default=settings.SITE_ID}}} becuase this will be evalutated at startup.
+So it won't change dynamically. Work-a-round: Set it in {{{__init__()}}}
+
+==== unittests ====
Note: Dynamic SITE ID is problematic in unittests. To avoid this, add theses
lines in you test runner file:

0 comments on commit f1e9da5

Please sign in to comment.