>From the source code : verbose_name: User friendly name of property
I never use this parameter, but maybe we can reference Model's property with different (friendlier) name. On Aug 28, 1:16 pm, djidjadji <[EMAIL PROTECTED]> wrote: > Hello, > > I don't specify a class to reference because it may be a different > class depending on the other properties of FooFoo. > If I understand it correctly: if you have 'reference_class=None' you > actually get db.Model as the referenced class, and that base class > gets both the implicit collection properties with the name > foofoo_set. > > I had tried using the collection_name parameter, but now I restarted > the development webserver and it works. He maybe messes up his > administration of the class db.Model. > > Now I will be sure to name all ReferenceProperty() uses and make sure > the collection_name parameter is unique for this application. > > Can the webserver (at appspot.com) when I deploy the application > suffer from the same error or do I get a fresh version for every HTTP > request? > > The other question I had about the constructor. > What is the use of the parameter 'verbose_name' in the constructor of > class ReferenceProperty? > The manual says nothing about it. > class ReferenceProperty(reference_class=None, verbose_name=None, > collection_name=None, ...) > > Djidjadji > > 2008/8/28 bin <[EMAIL PROTECTED]>: > > > > > Hello, > > > I'm not sure what are you trying to achieve with 'anonymous' > > reference, but that error happened because both ref1 and ref2 has the > > same "implicit collection property on the referenced class" called > > "foofoo_set" (<name-of-class>_set) > > > Maybe you can set each of them to have different name using > > collection_name parameter when you declare the model's property. > > > For more about this subject you can read: > >http://code.google.com/appengine/articles/modeling.html > > > On Aug 28, 6:10 am, djidjadji <[EMAIL PROTECTED]> wrote: > >> Hi, > > >> Here is a nice DuplicatePropertyError. > > >> My object FooFoo has 2 'anonymous' (reference_class=None) > >> db.ReferenceProperty > > >> class FooFoo(db.Model): > >> ref1 = db.ReferenceProperty(required=True) > >> ref2 = db.ReferenceProperty(required=True) > >> num1 = db.IntegerProperty(required=True) > >> num2 = db.IntegerProperty(required=True) > > >> When I run a program with this class I get the following error > > >> <class 'google.appengine.ext.db.DuplicatePropertyError'>: Class Model > >> already has property foofoo_set > > >> At the second run, a reload of the page, the foofoo_set text is for > >> another class. > >> I have to shutdown the development server and restart (version 1.1.1). > >> He can't resolve after this error. > > >> When I remove 1, the program runs. > >> If I make both db.ReferenceProperty pointing to a class the program will > >> run. > >> But I want 'anonymous' db.ReferenceProperty. > > >> Why do I get the error? And why for the Class "Model"? > > >> What is the use of the parameter 'verbose_name' in the constructor? > >> The manual says nothing about it. > >> class ReferenceProperty(reference_class=None, verbose_name=None, > >> collection_name=None, ...) > > >> Djidjadji > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
