Friday, December 2, 2011

rename a model field

I have models.py

title                  = models.CharField(max_length=80)

to this

ic_name                = models.CharField(max_length=80)

I don't want to delete the field.

I have this option
class
Migration:


   
def forwards(self, orm):

       
# Rename 'name' field to 'full_name'
        db
.rename_column('app_foo', 'name', 'full_name')

Its giving me an error
Caught TypeError while rendering: coercing to Unicode: need string or buffer, tuple found

I will appreciate if anyone can tell me a easy way.Thanks in advance




--
Regards
Nikhil Verma
+91-958-273-3156

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment