Right I would mean 1.1 alpha. Looking with more details I found that
error only appears when I use my class __str__ method, for example in
my Address Class I have

class MyClass(models.Model):
    string1 = models.CharField(max_length = 100, null=True)
    string2 = models.CharField(max_length = 100, null=True)
    def __str__(self) :
        return self.string1  +'  -  ' + self.string2

If in my template I use {{ myclass.string1 }} -  {{ myclass.string2 }}
Works fine. But if I use {{ myclass }} and either string1 or string2
has non ascci char, Error appears.

It is not correct to use __str__ method ?
Thanks....


On Mar 7, 2:05 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> On Sat, Mar 7, 2009 at 3:07 PM, juanefren <juanef...@gmail.com> wrote:
>
> > I am using django 1.1  and  MYSQL 5.0 with collation utf8_unicode_ci
>
> Django 1.1 doesn't exist yet, so I guess you are either running 1.1 alpha1
> or an SVN trunk checkout.  I doubt the specific version really matters here
> (since full unicode support existed well before 1.0), but it's best to be
> precise on stuff like this, and 1.1 is not, yet, a precise version.
>
>
>
> > I have no problems storing unicode strings to database, but when I try
> > to render a template using any of these chars ñáéíóúÑÁÉÍÓÚ from
> > database, it throws a TemplateSyntaxError, what should I do ?
>
> You should give us more information.  What is the full traceback of the
> error?  Snippets from the bits of the template that are attempting to
> display accented characters might be helpful as well and an explanation of
> what any variables the template is using are.
>
> Karen
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to