User Tools

Site Tools


django_installation_on_dreamhost

This is an old revision of the document!


Basic Django Setup Instructions

Installation instructions from http://wiki.dreamhost.com/Django.

  1. Create domain (e.g., django.bikmort.com).
  2. Add “/public” to the web directory (in “Users, Files, and Paths” section).
  3. Turn on “Passenger” (checkbox under “Web Options”).
  4. Create a database (at MySQL Database panel):
    1. Database name (bikdjango)
    2. Hostname (mysql.django.bikmort.com)
    3. First user (jtkorb)
  5. Download and run the Django setup wizard
    1. python django-setup.py
    2. Name project (mysite)
    3. MySQL database (bikdjango)
    4. MySQL username (jtkorb) and password
    5. Create a superuser (admin, but deleted later for just jtkorb)
  6. Found problem with Oracle configuration using “paste” to intercept and display errors from Django. See here for details. Current status is that the “purdue” Oracle section of the settings.py file is commented out.
  7. Verify installation
      [charvel] $ python
      Python 2.5.2 (r252:60911, Jan 24 2010, 17:44:40) 
      [GCC 4.3.2] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import django
      >>> print django.get_version()
      1.2.1
      
      [charvel] $ mysql -u jtkorb -h mysql.bikmort.com bikdjango
      mysql> show tables;
      +----------------------------+
      | Tables_in_bikdjango        |
      +----------------------------+
      | auth_group                 | 
      | auth_group_permissions     | 
      | auth_message               | 
      | auth_permission            | 
      | auth_user                  | 
      | auth_user_groups           | 
      | auth_user_user_permissions | 
      | django_admin_log           | 
      | django_content_type        | 
      | django_session             | 
      | django_site                | 
      +----------------------------+
      11 rows in set (0.05 sec)

Old Notes from Charvel

Installation instructions from…

      http://www2.jeffcroft.com/blog/2006/may/11/django-dreamhost/

Pretty much followed exactly, eventually, after getting a false start on the exceptions in the Dreamhost help pages (flup is not needed). Enabled admin interface, too, per instructions at Jeff Croft site.

Source code from…

      http://www.djangoproject.com/download/

Currently (6/21/07) using development version. Update with svn…

      % cd django_src
      % svn update

Did (7/14/07) the tutorial starting at…

      http://www.djangoproject.com/documentation/tutorial01/

11/21/07: Updated with svn (per 6/21/07 instructions). Lots of updates! To revision 6709.

      % cd django_src
      % svn update
      % python setup.py install (may not be necessary and gives an error)
      % pkill python (this *is* necessary)

12/15/07: Updated with svn to revision 6920. Shortened instructions…

      
      % cd django_src
      % svn update
      % pkill python

1/1/08: Updated with svn to revision 6980 (per above).

      Created ~/bin.  Linked /usr/bin/python2.4 to
      ~/bin/python. Prepended ~/bin to my path.

1/1/08: To do…

      Confirm that /usr/bin/python2.4 is being used for python.
      Install pyfacebook, something like...
      % svn checkout http://pyfacebook.googlecode.com/svn/trunk/ pyfacebook
      % python setup.py install
django_installation_on_dreamhost.1291057539.txt.gz · Last modified: 2010/11/29 11:05 by jtkorb