Changes between Version 1 and Version 2 of webreusHowTo

07/31/06 14:01:47 (10 years ago)
Joost Meijer <webmaster@…>

Initial Full Version


  • webreusHowTo

    v1 v2  
     1= Setting up Django at =
     3== Introduction ==
    15Before I explain how you can setup Django on [] I should add a bit of context.
     7At the moment I'm in the process of creating a Django powered website. I was looking for the cheapest hosting I could find, as I do not think I'm pull too much traffic. Webreus is dirtcheap (just 10EUR a year) for the smallest package. For that price you get a lot, only no shell access.
     9Before I tried, they didn't have mod_python working properly (they ran python2.2), and did not have mysqldb. The kind people of webreus were able to set up both (mod_python now on python2.4), and my django setup works.
     11I'll quickly summarize how I got things working.
     13== Home setup ==
     15First of all, I have a full django enabled webserver setup at home: running on windows XP with [ Uniform Server]. I wanted to be able to test every aspect of Django at home with apache/mysql and mod_python.
     17One thing in this setup is out of the ordinary: Django is installed in the www part of filesystem, not in the python site_package directory. This will come in handy when things will be moved to webreus. I have django enabled through a .htaccess file:
     20SetHandler python-program
     21AddHandler mod_python .py
     22PythonHandler django.core.handlers.modpython
     23SetEnv DJANGO_SETTINGS_MODULE <yoursite>.settings
     24PythonDebug On
     27My directory structure is as follows
     31 + django
     32 |  + django (which is the django source)
     33 |  + mysite (which is mysite's source)
     34 + site-media
     37Setting all this up has been done by following the various installation guides.
     39== Webreus setup ==
     41When this was all working I signed up with webreus. Within 2 days I had a new domain and all the information I needed. They run [ Plesk] and do not provide shell access. So setting up everything is a bit different than normally.
     43Through Plesk databases can be setup, this involves following the Plesk manual. No rocket science at all, just some click work. In the end this gives you phpMyAdmin to configure (in my case) a mysql database. Make sure the database setup is the same as the 'home setup' (otherwise you'll just have to change the
     45Then I uploaded all my local files, through a ftp upload to the 'httpdocs' directory. Again no rocket science.
     47Now the main trick comes: without shell access there is no way to setup the database according to the ''. The way I've solved this is to replicate my home mysql database to webreus. Just exporting the database tables with contents through phpMyAdmin and uploading them again at webreus.
     49This was enough to get everything to work. I can now serve to and see my frontpage from Django.
     51If you have any questions, just let me know: find my contact details in the history of this page.
Back to Top