I know I'm missing something really simple really but I  keep getting
this error:

SyntaxError: Non-ASCII character '\xc2' in file /home/simon/
djangoprojects/bikerescue/bikeshop/models.py on line 46, but no
encoding declared; see http://www.python.org/peps/pep-0263.html for
details.  This is the model in question and I have the __unicode__
function in there

class Item(models.Model):
        title = models.CharField(max_length=100)
        description = models.CharField(max_length=500)
        price = models.FloatField(max_length=10, verbose_name=u'Price (£)')

        def __unicode__(self):
                return self.title

        def _get_disp_price(self):
                return u"£" + self.price

        disp_price = property(_get_disp_price)

I 've put the unicode u in both places where its required so why is it
still tripping up.

Many thanks

Simon

--

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.


Reply via email to