#apt-get install python-django


# echo "create database cats" | mysql
#  echo "grant all privileges on cats.* to ‘cats’@’localhost’ identified by ‘cats’" | mysql
#  mysql -u cats cats -p

hide@deb1:~/dj$ django-admin startproject cats
hide@deb1:~/dj$ cd cats
hide@deb1:~/dj/cats$ vi

DATABASE_HOST = ‘localhost’

TIME_ZONE = ‘Asia/Tokyo’


hide@deb1:~/dj/cats$ python runserver
Validating models…
Skipping validation because things aren’t configured properly.
Django version 0.95.1, using settings ‘cats.settings’
Development server is running at
Quit the server with CONTROL-C.
Traceback (most recent call last):
  File "/var/lib/python-support/python2.4/django/core/servers/", line 272, in run
    self.result = application(self.environ, self.start_response)
  File "/var/lib/python-support/python2.4/django/core/servers/", line 615, in __call__
    return self.application(environ, start_response)
  File "/var/lib/python-support/python2.4/django/core/handlers/", line 143, in __call__
  File "/var/lib/python-support/python2.4/django/core/handlers/", line 29, in load_middleware
    mod = __import__(mw_module, ”, ”, [”])
  File "/var/lib/python-support/python2.4/django/contrib/sessions/", line 2, in ?
    from django.contrib.sessions.models import Session
  File "/var/lib/python-support/python2.4/django/contrib/sessions/", line 3, in ?
    from django.db import models
  File "/var/lib/python-support/python2.4/django/db/", line 11, in ?
    backend = __import__(‘django.db.backends.%s.base’ % settings.DATABASE_ENGINE, ”, ”, [”])
  File "/var/lib/python-support/python2.4/django/db/backends/mysql/", line 12, in ?
    raise ImproperlyConfigured, "Error loading MySQLdb module: %s" % e
ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb
[05/Apr/2008 07:13:45] "GET / HTTP/1.0" 500 1310


deb1:~# apt-cache search python | grep mysql
libghc6-hsql-mysql-dev – Multi-Database Interface System for Haskell
python-mysqldb – A Python interface to MySQL


deb1:~# dpkg -l | grep mysqldb | wc
      0       0       0

deb1:~# apt-get install python-mysqldb
Reading package lists… Done
Building dependency tree… Done
Suggested packages:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 80.0kB of archives.
After unpacking 225kB of additional disk space will be used.
Get:1 etch/main python-mysqldb 1.2.1-p2-4 [80.0kB]
Fetched 80.0kB in 0s (436kB/s)
Selecting previously deselected package python-mysqldb.
(Reading database … 40128 files and directories currently installed.)
Unpacking python-mysqldb (from …/python-mysqldb_1.2.1-p2-4_i386.deb) …
Setting up python-mysqldb (1.2.1-p2-4) …
INFO: using unsupported version ‘/usr/bin/python2.5’



hide@deb1:~/dj/cats$ python runserver
Validating models…
0 errors found.

Django version 0.95.1, using settings ‘cats.settings’
Development server is running at
Quit the server with CONTROL-C.


#lynx http://localhost:8000

404 redirected to this:


カテゴリー: 未分類 パーマリンク


以下に詳細を記入するか、アイコンをクリックしてログインしてください。 ロゴ アカウントを使ってコメントしています。 ログアウト /  変更 )

Google+ フォト

Google+ アカウントを使ってコメントしています。 ログアウト /  変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト /  変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト /  変更 )


%s と連携中