Almost a wrapup.
Got django installed in /usr/lib/python2.4/site-packages/
Got django deployed in /var/www/vhosts/unplugtheinternet.com/django/test01/ with subfolder cms autogenerated
Got MySQLdb module added to python so django can use a MySQL database, and django has been successfully configured to build the schemas for the modules it deploys.
Created a vhost.conf to take care of webserver requests that python should handle (courtesy of Nick Sergeant's blog entry).
Still it isn't working properly. But since I'm leaving for a camping trip in ~1 hour, it's time to switch it off and go join my friends at Assateague Island.
Arrividerci pals.
Showing posts with label cms. Show all posts
Showing posts with label cms. Show all posts
Friday, June 12, 2009
MediaTemple, Python and Django
Just installing Django on my Mediatemple dv account.
First, log in to SSH as root user. Then use subversion, provided by mediatemple in
WebControl > Root Access & Developer Tools > Install Developer Tools,
which must at some point be enabled to be accessible. Following this,
Subversion grabs the latest version to /var/trunk/django.
In the case of dv accounts, python packages are located in /usr/lib/python2.4/site-packages
Create a symbolic link between these two locations using
ln -s /var/trunk/django /usr/lib/python2.4/site-packages
then add another symbolic link to bring the underlying python script to the root of the django trunk:
ln -s /var/trunk/django/bin/django-admin.py /usr/local/bin
Basically, what is happening here is:
Django Source /var/trunk : Subversion project root
\ --> accessible to /usr/lib : Libraries for programming and packages
\ --> accessible to /usr/local : Local hierarchy
More on this. Now:
import django
and
django.version
voila!
Next, you must add the MySQLdb interface for python if you are planning to use mySQL as your cms database. Here's a good reference for once you have the tarball in your directory. However, I'd rather wget it directly from the sourceforge site. Here is the command to use from root SSH:
wget http://downloads.sourceforge.net/mysql-python/MySQL-python-1.2.2.tar.gz
Works fine. Now install the module and it should run without an error.
First, log in to SSH as root user. Then use subversion, provided by mediatemple in
WebControl > Root Access & Developer Tools > Install Developer Tools,
which must at some point be enabled to be accessible. Following this,
Subversion grabs the latest version to /var/trunk/django.
In the case of dv accounts, python packages are located in /usr/lib/python2.4/site-packages
Create a symbolic link between these two locations using
ln -s /var/trunk/django /usr/lib/python2.4/site-packages
then add another symbolic link to bring the underlying python script to the root of the django trunk:
ln -s /var/trunk/django/bin/django-admin.py /usr/local/bin
Basically, what is happening here is:
Django Source /var/trunk : Subversion project root
\ --> accessible to /usr/lib : Libraries for programming and packages
\ --> accessible to /usr/local : Local hierarchy
import django
and
django.version
voila!
Next, you must add the MySQLdb interface for python if you are planning to use mySQL as your cms database. Here's a good reference for once you have the tarball in your directory. However, I'd rather wget it directly from the sourceforge site. Here is the command to use from root SSH:
wget http://downloads.sourceforge.net/mysql-python/MySQL-python-1.2.2.tar.gz
Works fine. Now install the module and it should run without an error.
Labels:
cms,
django,
python,
web development,
web projects
Subscribe to:
Posts (Atom)