This sounds like a bug. I would submit a ticket for it.

On Sep 1, 6:42 am, Jochen Voss <[EMAIL PROTECTED]> wrote:
> Hello,
>
> with Django 0.96 I used a model which contained the following field:
>
>     class ImageFile(models.Model):
>         [...]
>         fname = models.ImageField(upload_to="images", primary_key=True,
>                                   width_field="width", height_field="height")
>         [...]
>
> When trying to convert this to the current version of Django, I got the
> following error message for this line:
>
>     [...]
>       File "/home/voss/s2/s2/images/models.py", line 96, in <module>
>         class ImageFile(models.Model):
>       File "/home/voss/s2/s2/images/models.py", line 107, in ImageFile
>         width_field="width", height_field="height")
>       File 
> "/var/lib/python-support/python2.5/django/db/models/fields/files.py", line 
> 240, in __init__
>         FileField.__init__(self, verbose_name, name, **kwargs)
>       File 
> "/var/lib/python-support/python2.5/django/db/models/fields/files.py", line 
> 129, in __init__
>         raise TypeError("'%s' is not a valid argument for %s." % (arg, 
> self.__class__))
>     TypeError: 'primary_key' is not a valid argument for <class 
> 'django.db.models.fields.files.ImageField'>.
>
> It seems that primary_key=True is no longer allowed for ImageField
> fields.  I looked 
> athttp://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
> but did not find any information about this.
>
> I am not sure whether this change is intended or a bug, but I think it
> should either be mentioned in the list of backward incompatible
> changes or should be allowed again.
>
> I hope this helps,
> Jochen
> --http://seehuhn.de/
>
>  signature.asc
> < 1KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to