I'm more comfortable with PHP & MySQL, don't know a lick of Python (yet) except for the teeny tiny bit I picked up using the Django admin recently...therefore please excuse this very stupid question that I'm embarrassed to ask. In PHP this would be trivial for me...
I'm using a color picker (farbtastic) w/ Django Admin, it's the only one I like for this purpose. Except...it adds a # symbol prior to the hex value.
When the user hits submit, I'd like to validate the field before sending to the database and just strip off that # symbol.
Thanks in advance for helping this Django newbie :)
UPDATE:
Based on S. Lott's code here's what worked:
def save(self): if self.hexvalue.startswith("#"): self.hexvalue= self.hexvalue[1:] super(Color, self).save()