1.1 --- a/docs/Django/NOTES.txt Mon Nov 06 20:51:42 2006 +0000
1.2 +++ b/docs/Django/NOTES.txt Mon Nov 06 20:52:21 2006 +0000
1.3 @@ -1,5 +1,3 @@
1.4 -NOTE: The following examples do not currently work with Django: Auth, Calendar.
1.5 -
1.6 WebStack supports Django in the sense that WebStack applications can be
1.7 deployed within Django instances according to the guidelines described in the
1.8 Django documentation plus a few caveats. Here is the basic process:
1.9 @@ -12,7 +10,8 @@
1.10 4. Add WebStack handlers to the application directory.
1.11 5. Add the application to the INSTALLED_APPS definition in the settings.py
1.12 file.
1.13 - 6. Configure Django in mod_python.
1.14 + 6. Add the APPEND_SLASH setting to the settings.py file.
1.15 + 7. Configure Django in mod_python.
1.16
1.17 Create a Django instance
1.18 ------------------------
1.19 @@ -78,6 +77,10 @@
1.20 'djangoinstance.webstack', # Application added here!
1.21 )
1.22
1.23 +Prevent Django from adding slash characters:
1.24 +
1.25 +APPEND_SLASH = 0
1.26 +
1.27 Django and mod_python
1.28 ---------------------
1.29
1.30 @@ -90,3 +93,11 @@
1.31 PythonDebug On
1.32 PythonPath "['/home/paulb/Software/Python', '/home/paulb/Software/Python/WebStack', '/home/paulb/Software/Python/WebStack/examples/Common'] + sys.path"
1.33 </Location>
1.34 +
1.35 +Django and authentication
1.36 +-------------------------
1.37 +
1.38 +Whilst Django has its own authentication scheme, WebStack preserves the
1.39 +standard HTTP notion of a user as provided via the HTTP authentication
1.40 +mechanisms. Thus, the get_user method on the Transaction object does not
1.41 +currently access Django's underlying authentication machinery.
2.1 --- a/docs/Django/urls.py Mon Nov 06 20:51:42 2006 +0000
2.2 +++ b/docs/Django/urls.py Mon Nov 06 20:52:21 2006 +0000
2.3 @@ -1,11 +1,5 @@
2.4 from django.conf.urls.defaults import *
2.5
2.6 -# NOTE: Path manipulation may require manual customisation.
2.7 -
2.8 -import sys
2.9 -sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common")
2.10 -sys.path.insert(0, "/home/paulb/Software/Python/WebStack")
2.11 -
2.12 # The groups defined by ?P<vp> (ie. having the name "vp") define the virtual
2.13 # path info for each resource. Modifications to the regular expressions used
2.14 # below should be accompanied by modifications in the handler code in