HI all,

I`m pretty new with GAE and DataStore and still unable to find the way
for
creating some "simple" tasks I`m used to.

The problem is that I want create list of users that can log into my
application.
The model and code I`m currently using is listed bellow:
class AdminUsers(db.Model):
    user_obj = db.UserProperty()
    active = db.BooleanProperty(False)

But I can not find the way to ensure users uniqueness.

user_in_db =AdminUsers.all().filter('user_obj =', user).fetch(1)
        if not user_in_db:
                user_entry  = AdminUsers(user_obj = users.get_current_user())
                user_entry.put()


Any ideas will be appreciated.

Thanks in advance,
Ilian Iliev

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to