Django×Python
ゼミが終わってから、
Django×Python (LLフレームワークBOOKS)
- 作者: 露木誠
- 出版社/メーカー: 技術評論社
- 発売日: 2009/02/16
- メディア: 単行本(ソフトカバー)
- 購入: 10人 クリック: 120回
- この商品を含むブログ (33件) を見る
色々調べると、本に書いてある、Djangoのバージョンの違いから起こることらしい。
manoush$ python manage.py syncdb Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 443, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 196, in run_from_argv self.execute(*args, **options.__dict__) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 232, in execute output = self.handle(*args, **options) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 371, in handle return self.handle_noargs(**options) File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/syncdb.py", line 57, in handle_noargs cursor = connection.cursor() File "/usr/local/lib/python2.7/dist-packages/django/db/backends/dummy/base.py", line 15, in complain raise ImproperlyConfigured("settings.DATABASES is improperly configured. " django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.
- 1つめに、manoush/urls.pyの(r'^admin/(.*)', admin.site.root),の部分は、
urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls))#この行,(.*)はいらない )
とかく必要がある。
- 2つめに、manoush/settings.pyの部分は、以下のように書き換える必要がある。
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'database.sqlite',
めでたく、
You just installed Django's auth system, which means you don't have any superusers defined. Would you like to create one now? (yes/no): yes
とでれば、OK。
参考:
http://aaa0.000a.biz/2011/05/httpdjangoproject-jpdocja1-0introtutorial02-htmlintro-tutorial02/
http://harry.pythonanywhere.com/tutorial/1/