giver = db.ReferenceProperty(Address, collection_name='address_giver_set')
receiver = db.ReferenceProperty(Address, collection_name='address_receiver_set')
Presto!
A blog about one guys quest to learn Python, Django and Google App Engine.
Feed:
http://appengineguy.com/atom.xml
torsdag 19 juni 2008
Got this baby today.
DuplicatePropertyError
ModelName already has property ModelName_set.
Caused by this code:
The solution is to define the underlying collection name via the collection_name argument to the ReferenceProperty constructor, as it will default to "modelname_set" otherwise, causing the DuplicatePropertyError.
Prenumerera på:
Kommentarer till inlägget (Atom)
Bloggarkiv
-
▼
2008
(22)
-
▼
juni
(14)
- Proper Unit Testing of App Engine/Django
- Google App Engine: The Book
- Unit Tests for Google App Engine
- How to check out the latest version of Django usin...
- Uploading files to App Engine via Django ModelForms
- GMemsess
- Getting random entities from the DataStore
- FileField not working?
- Mutual Model relations
- Even faster websites
- Google I/O videos about app engine
- How-to: Full-text search in Google App Engine
- web2py: A first look from me
- Right
-
▼
juni
(14)
Inga kommentarer:
Skicka en kommentar