Sorry, I forgot to put it :)

view.py:
def add(request):
    return create_object(request, Firm)

def edit(request, key):
    return update_object(request, Firm, key)


models.py:
INDUSTRIES_CHOICES= set([('1','Авто'), ('2','Авиа')])

class Firm(db.Model):
    name= db.StringProperty(required=True)
    address = db.PostalAddressProperty()
    industry= db.StringProperty(required=False,
choices=INDUSTRIES_CHOICES)


On Nov 22, 8:24 pm, "Alex Koshelev" <[EMAIL PROTECTED]> wrote:
> Hi, Oleg!
> Show your code to us. Problem is where.
>
> On 11/22/08, oleg <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi there!  I'm brand new user of django.. So, please, don`t be ugly,
> > if I`m missing something elementary ^_^
>
> > I use  django.views.generic.create_update to generate an editing/
> > inserting form from the Model.
> > In Model I have a StringProperty which value could be chosen from the
> > set of possible values (  utf8-encoded strings) .
>
> > Well, the troubles are:
> > 1) In the resulting form I receive unreadble unicode instead of
> > appropriate symbols:
> >  <option value="(1, &#39;\xd0\x90\xd0\xb2\xd0\xb8\xd0\xb0&#39;)">(1,
> > &#39;\xd0\x90\xd0\xb2\xd0\xb8\xd0\xb0&#39;)</option>
>
> > 2) I don't want to get
> >        value="(1, &#39;\xd0\x90\xd0\xb2\xd0\xb8\xd0\xb0&#39;)
> >  I'd prefer
> > <option value="1">Авто</option>
>
> > In advance - Thanks for advices!
>
> --
> ---
> Александр Кошелев
> mailto:[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to