'unicode' object has no attribute '_committed'

2010-08-10 Thread grimmus
Hi,

I am using Django 1.2.1

I have a model called Project that contains a char field and an image
field.

My project used Modeltranslation so i can have an English and French
version of the 2 fields.

When i try and add a project  in the admin i get the error: 'unicode'
object has no attribute '_committed' . I'm quite certain it's an issue
with the image field.

Does anyone know what might be going wrong ?

Thanks

-- 
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.



Re: 'unicode' object has no attribute '_committed'

2010-08-10 Thread wayne
> When i try and add a project  in the admin i get the error: 'unicode'
> object has no attribute '_committed' . I'm quite certain it's an issue
> with the image field.

Well, not to be coy, but you have a unicode string somewhere whose
_committed value you are trying to access.  Problem is, the unicode
string does not have this particular value/method.

That's what I'm guessing without seeing the code, anyway.

Wayne

-- 
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.



Re: 'unicode' object has no attribute '_committed'

2010-08-10 Thread grimmus
Thanks for the reply, below is my Project model

from django.db import models

class Project(models.Model):
title = models.CharField(max_length=100)
path = models.CharField(max_length=100,help_text='This should be
the folder name')
image = models.ImageField(upload_to='/images/projects/')
date = models.DateField(help_text='The projects are ordered by
date')
active = models.BooleanField()

def __unicode__(self):
return u'%s' %(self.title)

On Aug 10, 9:24 pm, wayne  wrote:
> > When i try and add a project  in the admin i get the error: 'unicode'
> > object has no attribute '_committed' . I'm quite certain it's an issue
> > with the image field.
>
> Well, not to be coy, but you have a unicode string somewhere whose
> _committed value you are trying to access.  Problem is, the unicode
> string does not have this particular value/method.
>
> That's what I'm guessing without seeing the code, anyway.
>
> Wayne

-- 
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.



Re: 'unicode' object has no attribute '_committed'

2010-08-10 Thread wayne
What is the code that you are using to save instances of the model
with?

-- 
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.



Re: 'unicode' object has no attribute '_committed'

2010-08-10 Thread grimmus
I am doing it in the admin area, so i dont have any custom code.

The issue might be with the Modeltranslation module. It creates extra
columns for the different translations, so, for example, title has
title, title_en, title_fr as rows in the DB. This applies to the image
field too.

Thanks for any further guidance.

On Aug 10, 9:55 pm, wayne  wrote:
> What is the code that you are using to save instances of the model
> with?

-- 
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.



Re: 'unicode' object has no attribute '_committed'

2010-08-10 Thread grimmus
I just found out Modeltranslation does not support ImageField :-(

http://code.google.com/p/django-modeltranslation/issues/detail?id=30

On Aug 10, 10:01 pm, grimmus  wrote:
> I am doing it in the admin area, so i dont have any custom code.
>
> The issue might be with the Modeltranslation module. It creates extra
> columns for the different translations, so, for example, title has
> title, title_en, title_fr as rows in the DB. This applies to the image
> field too.
>
> Thanks for any further guidance.
>
> On Aug 10, 9:55 pm, wayne  wrote:
>
> > What is the code that you are using to save instances of the model
> > with?

-- 
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.