class Retsept(models.Model):
        name = models.CharField(max_length=100, verbose_name=_("Name"),
blank=False, null=False)
        user = models.ForeignKey(User)
        image = RemovableImageField(upload_to=content_file_name, blank=True,
null=True, verbose_name=_("Image"))
        about = tinymce_models.HTMLField(verbose_name=_("Enter the
description of the food"),blank=False, null=False)
        rating = models.DecimalField(max_digits=4, decimal_places=2,
default=0)
        views = models.PositiveIntegerField(default=0)
        tags = TagField()
        published = models.BooleanField(default=False)
        visible = models.BooleanField(default=True)

        def __unicode__(self):
                return self.name

On Apr 15, 9:32 pm, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Apr 15, 4:54 pm, zayatzz <alan.kesselm...@gmail.com> wrote:
>
>
>
>
>
> > Hello
>
> > I recieve this kind of error message when in admin:
>
> > Caught an exception while rendering: ('ascii', 'Madalal temperatuuril k
> > \xc3\xbcpsetatud stressivaba sea parim t\xc3\xbckk', 23, 24, 'ordinal
> > not in range(128)')
>
> > The text should actually be "Madalal remperatuuril küpsetatud
> > stressivaba sea parim tükk".
>
> > The model, that saves this information is:
> > class Retsept(models.Model):
> >         name = models.CharField(max_length=100, verbose_name=_("Name"),
> > blank=False, null=False)
> >         and other fields....
>
> > And the form for it is:
> > class RetseptForm(ModelForm):
> >         about = forms.CharField(widget=TinyMCE(attrs={'style': 
> > 'width:370px',
> > 'rows': 15, 'theme':"simple"}), label = _("text here"),
> > required=False)
> >         tags = TagField(label = _("tags"),
> > widget=TagAutocomplete(attrs={'class':'required'}))
> >         name = forms.CharField(label = _("Name"),
> > widget=forms.TextInput(attrs={'class':'required'}))
> >         class Meta:
> >                 model = Retsept
> >                 fields = ('name', 'about', 'image', 'tags',)
> >                 widgets = {
> >                         'name': TextInput(attrs={'class': 'required' })
> >                 }
>
> > Can anyone tell me whats wrong with it?
>
> > Alan
>
> Almost every time I have seen this, it is an issue with the model's
> __unicode__ method. Can you post that?
> --
> DR.

-- 
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