I have not had to do this with the current Server 5.0 but have done it previously with Server 4.x (I now use Linux Virtual machines for this sort of purpose but the solution is exactly the same as you need for OS X Server.)
First absolutely do not try updating the built-in components of any Apple included software e.g. Apache, and in your case Python. While it may be possible to do this, not only are Apple making such steps harder to do by adding new security measures to prevent their 'official' software being modified/hacked without your knowledge, trying this approach makes it extremely likely you will break something especially the integration between Server.app and these components and also make it likely that installing future official Apple updates will either fail or downgrade what you did anyway.
So, as I implied above I have used a solution before which works, and does not cause the problems described above - at least with regards to Python. The approach you need to adopt is to leave Apple's Python well alone and instead install a separate copy specifically to be used with your own website, indeed if you were to run multiple websites - each needing to use Python you would have separate copies of Python for each site because it is quite common for various Python based projects to be dependent on specific Python versions. So common is this that there is a tool specifically for doing this called VirtualEnv.
See http://docs.python-guide.org/en/latest/dev/virtualenvs/
The way this works is -
- You install VirtualEnv
- You run VirtualEnv and create a virtual environment for your website
- You install the specific Python version you need for your website in to that virtual environment
- You install all the Python modules you need for your website in to that virtual environment
- You install your Python code in to that virtual environment
Then you have appropriate entries in your website conf file to run within that virtual environment.
By adopting this approach it is then possible to simultaneously run multiple different versions of Python and not have them conflict with each other.
Note: To install VirtualEnv in OS X do the following.
sudo easy_install virtualenv