Browse files

adding a page about monkeypatches (technically in funfactory)

  • Loading branch information...
1 parent f59371d commit 94bd4521024a65dd9118408fcc2313789405e4f6 @peterbe committed Nov 14, 2011
Showing with 31 additions and 0 deletions.
  1. +1 −0 index.rst
  2. +30 −0 monkeypatches.rst
@@ -79,6 +79,7 @@ Contents
+ monkeypatches
Indices and tables
@@ -0,0 +1,30 @@
+.. _monkeypatches:
+Monkey patches
+Unfortunately we have to rely on a set of monkey patches. These are
+`loaded from funfactory
+Why this works is because the first installed app is always
+``funfactory`` and the first thing Django does after configuring itself
+(i.e. ``django.conf.settings`` is a module) is to load the
+```` file from every installed app.
+Ideally all monkey patches will one day go away. Either by individual
+apps getting smarter or Django getting smarter.
+The reason the monkey patches are in funfactory is because it is
+assumed that all playdoh instances will need the monkey patches and
+therefore it's a convenience to put this into funfactory. Most of the
+monkey patches are unobtrusive meaning they are not applied unless the
+relevant app is in your ``INSTALLED_APPS``.
+.. note::
+ Because we're relying on a Django specific trick (that
+ are always loaded) the ``monkeypatches.patch()`` function will
+ write to ``logging.debug()``

0 comments on commit 94bd452

Please sign in to comment.