From 6a0aabe7e1b2120e441f9b8801812a242b70aa25 Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Tue, 29 May 2012 17:40:00 +0200 Subject: Updated readme file concerning configuration of Django Site framework --- README.rst | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 0c47a11..9acabde 100644 --- a/README.rst +++ b/README.rst @@ -83,6 +83,21 @@ Configuration 'brevisurl.context_processors.brevisurl_data' ) +**Configure site framework** + +This setting is important for local backend only. At least one Site object +must be created and configured as current via settings.SITE_ID. For development/production +switching I suggest you to use configuration like this. Setting is also important +while using `absurl` templatag. Domain for absolute url is generated from current Site object. + +:: + + if DEBUG: + SITE_ID = 2 # pk for Site object containing your development domain e.g. 'localhost:8000' + else: + SITE_ID = 1 # pk for Site object containing your production domain e.g. 'www.production.net' + + Examples -------- @@ -168,4 +183,4 @@ References - http://github.com/char0n/django-brevisurl - http://pypi.python.org/pypi/django-brevisurl/ - - http://www.codescale.net/en/community#django-brevisurl \ No newline at end of file + - http://www.codescale.net/en/community#django-brevisurl -- cgit v1.2.3