Dreamhost Django CMS Quick Start Script

I use Dreamhost shared hosting for some of my sites that I don't feel I need a whole ton of control over, such as this one (ransomsoft.com).  I also created Django CMS Themes (the site) and django-cms-themes (the python library that adds theme support to Django CMS), and I wanted a quick way to insure that django-cms-themes was easy to plug into a django app, so I wrote a little bash script that automatically installs and sets up the following on your dreamhost account:

  • A local copy of Python 2.7
  • easy_install
  • pip
  • virtualenv
  • virtualenvwrapper
  • django 1.3.1
  • django-cms 2.2
  • a few other nifty apps that help to give you a nice bare bones install of Django CMS running on your Dreamhost account.  

Why do I install Python locally?  Becuase on shared hosting this gives you complete control over your python environment and makes things a lot easier, especially if you can get it all by running one shell script.  Also note that during the script execution you will be prompted to setup an admin username and password for the test django site.

I mentioned to someone over on Reddit that I was using Dreamhost as my sandbox django environment and they asked me to share my script, so here it is.  The only cms template available by default is a blank one that just gives you a single placeholder, but you can download themes and plug those in through the Django Admin and have a pretty nice site up and running fairly quickly.

Your home folder will contain the following additional folders when the script is done running:

~/webapps/mysite/ - a test django cms site
~/.virtualenvs/ - the place where your virtual environments live
~/.virtualenvs/django/ - a test virtual environment setup to run the test django cms site mentioned above
~/opt/ - the folder that contains your local Python installation
~/downloads/ - the folder where all the required source files are downloaded to, you can delete this if you want to 

If all goes well you should be able to "cd ~/webapps/mysite", "workon django", and "python manage.py runserver 0.0.0.0:8000" and hit your test site from any browser (if you have a domain setup or if you point your browser at the IP address of your server).

If you have any questions or feedback about the script please feel free to drop me a note.


Next entry

Previous entry

Similar entries