Add a compatibility layer for Python 3
|Reported by:||Claude Paroz||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
For Django to run both on Python 2 and Python 3, we need to add some code which conditionally executes code depending on the Python version at runtime.
This patch is based on Vinay Sajip's branch (https://bitbucket.org/vinay.sajip/django), minus some code that I'm not sure we will really need (as now we dropped Python 2.5). We can always add some more later.
I've added some docs, but as I'm not the best English writer, this will need careful review.