fj11 / ulipad

Automatically exported from code.google.com/p/ulipad
0 stars 0 forks source link

ulipad下执行配置django数据库时出错 #187

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. 安装好django环境,建立一个项目mysite
2. 在setting.py内设置好db的配置,用的是sqlite3数据库
3. 
在UliPad中对manage.py设置好参数syncdb,然后执行,执行过程中��
�建superuser出错

What is the expected output? What do you see instead?
> "/usr/bin/python" -u "/home/barney/mysite/manage.py" syncdb
Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table blog_blogpost

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
Username (Leave blank to use 'barney'): cc
E-mail address: chinacang@foxmail.com
Traceback (most recent call last):
  File "/home/barney/mysite/manage.py", line 11, in <module>
    execute_manager(settings)
  File
"/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line
340, in execute_manager
    utility.execute()
  File
"/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line
295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.5/site-packages/django/core/management/base.py",
line 192, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.5/site-packages/django/core/management/base.py",
line 219, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.5/site-packages/django/core/management/base.py",
line 348, in handle
    return self.handle_noargs(**options)
  File
"/usr/lib/python2.5/site-packages/django/core/management/commands/syncdb.py",
line 101, in handle_noargs
    emit_post_sync_signal(created_models, verbosity, interactive)
  File "/usr/lib/python2.5/site-packages/django/core/management/sql.py",
line 205, in emit_post_sync_signal
    interactive=interactive)
  File "/usr/lib/python2.5/site-packages/django/dispatch/dispatcher.py",
line 148, in send
    response = receiver(signal=self, sender=sender, **named)
  File
"/usr/lib/python2.5/site-packages/django/contrib/auth/management/__init__.py",
line 44, in create_superuser
    call_command("createsuperuser", interactive=True)
  File
"/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line
158, in call_command
    return klass.execute(*args, **options)
  File "/usr/lib/python2.5/site-packages/django/core/management/base.py",
line 219, in execute
    output = self.handle(*args, **options)
  File
"/usr/lib/python2.5/site-packages/django/contrib/auth/management/commands/create
superuser.py",
line 118, in handle
    password = getpass.getpass()
  File "/usr/lib/python2.5/getpass.py", line 32, in unix_getpass
    old = termios.tcgetattr(fd)     # a copy to save
termios.error: (22, 'Invalid argument')

正常情况应该是:
barney@ubuntu-20090616220833:~/mysite$ python manage.py syncdb
Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table blog_blogpost

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
Username (Leave blank to use 'barney'): 
E-mail address: cc@somemail.com
Password: 
Password (again): 
Superuser created successfully.
Installing index for auth.Permission model
Installing index for auth.Message model

What version of the product are you using? On what operating system?
UliPad3.9
On Ubuntu8.10

Please provide any additional information below.
根据《Django Web开发指南》(第2章), 
中的步骤部署django数据库sqlite3时,在
UliPad3.9下执行“python manage.py 
syncdb”时调试出现这个错误。然后换到终端下
没有出现错误,能正常执行下去。

Original issue reported on code.google.com by chinac...@gmail.com on 27 Jun 2009 at 11:11

GoogleCodeExporter commented 8 years ago
I seldom use this function now. Please run the command in the command line. And 
it's 
not a bug of Ulipad I think.

Original comment by limo...@gmail.com on 6 Nov 2009 at 3:37