Hi Denis! Once you have an entity with a key_name, you cannot change the key_name. That is the reason that the form doesn't use this field when using it to change an entity. If you want to hide it from an editing-form, you can either do so in template logik by passing a variable like "change=True", or you can make another form definition that excludes the field. Do I understand you correctly that the key_name field doesn't appear when you are editing an entity? Well, than thats probably on purpose.
Best Regards, Jesaja Everling would have to create a separate form for editing On Tue, Nov 25, 2008 at 7:33 AM, Denis Moskalets <[EMAIL PROTECTED]> wrote: > > ext/db/djangoforms.py contains interesting description for some class: > > If you define a form field named 'key_name' it will be treated > specially and will be used as the value for the key_name parameter > to the Model constructor. This allows you to create instances with > named keys. The 'key_name' field will be ignored when updating an > instance (although it will still be shown on the form). > > I've tried this. It's really works, key_name field appears. key_name > properly saved into DB. It's really cool! > > But there only little problem. "The 'key_name' field will be ignored > when updating an instance (__although it will still be shown on the > form__)". > key_name field doesn't appear at form, when you trying to edit data. > I've read SDK code, and really... there nothing about filling key_name > by data. > In SDK source code, 'key_name' appears only in save() method. > > Is it really undocumented feature, that doesn't completely realised, > or it is bug? > > > > -- o L_/ OL This is Schäuble. Copy Schäuble into your signature to help him on his way to Überwachungsstaat. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---