Hello,

I'm following along with djangobook.com, and I have a problem in
chapter 5 that I cannot resolve. I am using OpenSuSE-11.0, Python
2.5.2, sqlite3-3.5.7-17.1 (and incidentally, this same error occurs
with MySQL).

When I run the following:
$ python manage.py validate

I receive:

Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/usr/local/lib64/python2.5/site-packages/django/core/
management/__init__.py", line 340, in execute_manager
    utility.execute()
  File "/usr/local/lib64/python2.5/site-packages/django/core/
management/__init__.py", line 295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib64/python2.5/site-packages/django/core/
management/base.py", line 192, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib64/python2.5/site-packages/django/core/
management/base.py", line 219, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib64/python2.5/site-packages/django/core/
management/base.py", line 348, in handle
    return self.handle_noargs(**options)
  File "/usr/local/lib64/python2.5/site-packages/django/core/
management/commands/validate.py", line 9, in handle_noargs
    self.validate(display_num_errors=True)
  File "/usr/local/lib64/python2.5/site-packages/django/core/
management/base.py", line 246, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/local/lib64/python2.5/site-packages/django/core/
management/validation.py", line 28, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/usr/local/lib64/python2.5/site-packages/django/db/models/
loading.py", line 128, in get_app_errors
    self._populate()
  File "/usr/local/lib64/python2.5/site-packages/django/db/models/
loading.py", line 57, in _populate
    self.load_app(app_name, True)
  File "/usr/local/lib64/python2.5/site-packages/django/db/models/
loading.py", line 72, in load_app
    mod = __import__(app_name, {}, {}, ['models'])
  File "$HOME/djcode/mysite/books/models.py", line 3, in <module>
    class Publisher(models.Model):
  File "$HOME/djcode/mysite/books/models.py", line 4, in Publisher
    name = models.CharField(maxlength=30)
TypeError: __init__() got an unexpected keyword argument 'maxlength'


I've copied and pasted the examples for models.py as on the website,
and I have the following in settings.py:

DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = '$HOME/djcode/prototype.sqlite'
# DATABASE_USER = ''             # Not used with sqlite3.
# DATABASE_PASSWORD = ''         # Not used with sqlite3.
DATABASE_HOST = ''             # Set to empty string for localhost.
Not used with sqlite3.
DATABASE_PORT = ''

Any thoughts? Thanks in advance for any help.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to