Skip to content

Commit

Permalink
we use it in PyLucid CMS.
Browse files Browse the repository at this point in the history
Add notes about limitations.
  • Loading branch information
jedie committed Jun 26, 2012
1 parent bdde9e8 commit f1e9da5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions django_tools/dynamic_site/README.creole
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f1e9da5

Please sign in to comment.