source   http://dpaste.com/93441/
result  http://dpaste.com/93449/

On Nov 25, 1:25 am, oleg <[EMAIL PROTECTED]> wrote:
> Also, please, anybody explain me - how to get
> from _CHOISES =set ([
>                                    (_id_1_, _value_1_),
>                                    (_id_2_, _value_2_)
>                                  ])
>               at model,
> pretty <SELECT>
>             <option value="_id_1_">_value_1_</option>
>             <option value="_id_2_">_value_2_</option>
>          </SELECT>
>    in rendered form
>
> On Nov 25, 1:16 am, oleg <[EMAIL PROTECTED]> wrote:
>
> > I reposted the code tohttp://dpaste.com/93441/
>
> > On Nov 25, 12:19 am, oleg <[EMAIL PROTECTED]> wrote:
>
> > > Thank you, Malcolm!
> > > Really, I'm using GAE, but it is patched to django 1.0.2. So, the
> > > truth is outhere ^_^
>
> > > On Nov 24, 5:11 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
> > > wrote:
>
> > > > On Sun, 2008-11-23 at 07:56 -0800, oleg wrote:
> > > > > 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)
>
> > > > So a fairly important point here is that you're using Google App Engine
> > > > and the modified Django that comes with that, not "Django proper". So
> > > > some things will behave differently there, but I don't know all the
> > > > details, since I personally haven't spent a lot of time using App
> > > > Engine.
>
> > > > I don't know if the "standard" Django that comes with App Engine has
> > > > been upgraded to be based off Django 1.0 or not. It used to be based off
> > > > django 0.96, which didn't have anything you could call correct Unicode
> > > > support, for example. You might want to have a look at what
> > > > django.VERSION says to see which version you're running.
>
> > > > Regards,
> > > > Malcolm
--~--~---------~--~----~------------~-------~--~----~
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