ok, this is the error

TypeError at /avatar/change/

function takes at most 9 arguments (11 given)

ive got a project which is a register of cars.
ive got it nearly finished and realised that i need to add a pub_date
field. so ive recreated my DB, resynced it after adding the field to
the model.

running through the app, the user creates an account. then fills out a
form based on the info to store about the car, then chooses an image
to use as an avatar for the car. im using django-avatar.

i've caused this issue by recreating the db, as it was working before
i amended the vehicle model which i've included below.
class Rallye(models.Model):
        username = models.CharField(max_length=30)
        colour = models.CharField(max_length=30, choices=COLOUR_CHOICES)
        wheels = models.CharField(max_length=30)
        interior = models.CharField(max_length=30)
        suspension = models.CharField(max_length=30)
        engine = models.CharField(max_length=30, choices=ENGINE_CHOICES)
        brakes = models.CharField(max_length=30)
        registration = models.CharField(max_length=7)
        othermods = models.TextField(max_length=300)
        pub_date = models.DateTimeField(default=datetime.datetime.now)


This is the traceback

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/avatar/change/
Django Version: 1.1.1
Python Version: 2.6.4
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'rallyeregister',
 'avatar',
 'imagekit']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'debug_toolbar.middleware.DebugToolbarMiddleware')


Traceback:
File "c:\python26\lib\site-packages\django\core\handlers\base.py" in
get_response
  92.                 response = callback(request, *callback_args,
**callback_kwargs)
File "c:\python26\lib\site-packages\django\contrib\auth\decorators.py"
in __call__
  78.             return self.view_func(request, *args, **kwargs)
File "c:\python26\lib\site-packages\django\contrib\auth\decorators.py"
in __call__
  78.             return self.view_func(request, *args, **kwargs)
File "D:\Webapps\rallyeregister\myproject\avatar\views.py" in change
  38.     primary_avatar_form = PrimaryAvatarForm(request.POST or
None, user=request.user, **kwargs)
File "D:\Webapps\rallyeregister\myproject\avatar\forms.py" in __init__
  19.             choices=[(c.id, avatar_img(c, size)) for c in
user.avatar_set.all()],
File "D:\Webapps\rallyeregister\myproject\avatar\forms.py" in
avatar_img
  7.         avatar.create_thumbnail(size)
File "D:\Webapps\rallyeregister\myproject\avatar\models.py" in
create_thumbnail
  68.             image.save(thumb, "JPEG")
File "c:\python26\lib\site-packages\PIL\Image.py" in save
  1439.             save_handler(self, fp, filename)
File "c:\python26\lib\site-packages\PIL\JpegImagePlugin.py" in _save
  471.     ImageFile._save(im, fp, [("jpeg", (0,0)+im.size, 0,
rawmode)])
File "c:\python26\lib\site-packages\PIL\ImageFile.py" in _save
  481.             e = Image._getencoder(im.mode, e, a,
im.encoderconfig)
File "c:\python26\lib\site-packages\PIL\Image.py" in _getencoder
  399.         return apply(encoder, (mode,) + args + extra)

Exception Type: TypeError at /avatar/change/
Exception Value: function takes at most 9 arguments (11 given)


can anyone tell me easily what i've done here? i've screwed it up
somehow, but i can't tell why from the traceback.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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