[EMAIL PROTECTED] wrote:
> Hi all,
>
> I had the need for a CharField which stores the values always in uppercase
> form. Is there a solution out there ?
>
> Maybe the follwing simple generic solution would be fine:
>
> class UpperCase(models.Model):
> uppercase_field = models.CharField(maxlenght=10, uppercase=True)
For now you can override "save" method of the model:
def save(self):
self.uppercase_field = self.uppercase_field.upper()
super(MyModel, self).save()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users
-~----------~----~----~----~------~----~------~--~---