In some database technologies, for a attribute in a record, you can guarantee uniqueness of that attribute within the entire database. An example of this might be a email_address attribute in a User record. By setting email_address to unique, you guarantee that a particular email address can only appear in one record in the entire database.
Is there any way in google app engine to have unique properties for a given model? As a example, could I have a User(db.Model) entity with a email property that is guaranteed unique across the entire datastore?
I found this resource here, which might prove helpful.
I have implemented it in the following way by overriding the put method and using the key.name
I save the slug as key.name and if you try to add another program it will check if the key name already exist. It’s probably not a nice way, im also a beginner at python / app engine.
This is good article about somebody using a helper model: http://squeeville.com/2009/01/30/add-a-unique-constraint-to-google-app-engine/
Edit: I saw you also provided that article lol.