Hi!
i'm having problem with raw_id_admin argument in aplication from the
djangoproject tutorial. only difference from orginal app is in the
raw_id_admin in Choice model


# this is the model.py:

from django.db import models

class Poll(models.Model):
    question = models.CharField(max_length=200)
    pub_date = models.DateTimeField('date published')

class Choice(models.Model):
    poll = models.ForeignKey(Poll, raw_id_admin=True)
    choice = models.CharField(max_length=200)
    votes = models.IntegerField()


#this is admin.py:

from gui_test.someapp.models import Poll
from django.contrib import admin

admin.site.register(Poll)


# and here is the error that i get:

Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/Library/Python/2.5/site-packages/django/core/management/
__init__.py", line 340, in execute_manager
    utility.execute()
  File "/Library/Python/2.5/site-packages/django/core/management/
__init__.py", line 295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.5/site-packages/django/core/management/
base.py", line 192, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Library/Python/2.5/site-packages/django/core/management/
base.py", line 218, in execute
    self.validate()
  File "/Library/Python/2.5/site-packages/django/core/management/
base.py", line 246, in validate
    num_errors = get_validation_errors(s, app)
  File "/Library/Python/2.5/site-packages/django/core/management/
validation.py", line 28, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/Library/Python/2.5/site-packages/django/db/models/
loading.py", line 128, in get_app_errors
    self._populate()
  File "/Library/Python/2.5/site-packages/django/db/models/
loading.py", line 57, in _populate
    self.load_app(app_name, True)
  File "/Library/Python/2.5/site-packages/django/db/models/
loading.py", line 72, in load_app
    mod = __import__(app_name, {}, {}, ['models'])
  File "/data/work/django_projects/gui_test/../gui_test/someapp/
models.py", line 8, in <module>
    class Choice(models.Model):
  File "/data/work/django_projects/gui_test/../gui_test/someapp/
models.py", line 10, in Choice
    poll = models.ForeignKey(Poll, raw_id_admin=True)
  File "/Library/Python/2.5/site-packages/django/db/models/fields/
related.py", line 644, in __init__
    Field.__init__(self, **kwargs)
TypeError: __init__() got an unexpected keyword argument
'raw_id_admin'


tnx!
vedran

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

Reply via email to