Home | History | Annotate | Download | only in auth

Lines Matching refs:unique

22 class Unique(model.Model):
23 """A model to store unique values.
25 The only purpose of this model is to "reserve" values that must be unique
30 must be unique across a given group: `username`, `auth_id` and `email`::
38 `Unique` records for those properties, and if everything goes well we can
43 # Assemble the unique values for a given class and attribute scope.
50 # Create the unique username, auth_id and email.
51 success, existing = Unique.create_multi(uniques)
54 # The unique values were created, so we can save the user.
59 # At least one of the values is not unique.
62 raise ValueError('Properties %r are not unique.' % props)
69 """Creates a new unique value.
72 The value to be unique, as a string.
75 unique (ancestor, namespace, kind and/or property name).
77 For example, for a unique property `email` from kind `User`, the
79 is the scope, and `me@myself.com` is the value to be unique.
81 True if the unique value was created, False otherwise.
89 """Creates multiple unique values at once.
92 A sequence of values to be unique. See :meth:`create`.
120 """Deletes multiple unique values at once.
142 User unique ID.
161 User unique ID.
185 User unique ID.
208 unique_model = Unique
214 # ID for third party authentication, e.g. 'google:username'. UNIQUE.
221 """Returns this user's unique ID, which can be an integer or string."""
228 String representing a unique id for the user. Examples:
235 otherwise it is a list of duplicated unique properties that
239 unique = '%s.auth_id:%s' % (self.__class__.__name__, auth_id)
240 ok = self.unique_model.create(unique)
252 String representing a unique id for the user. Examples:
310 User unique ID.
329 User unique ID.
344 User unique ID.
368 A string that is unique to the user. Users may have multiple
376 The value of `auth_id` must be unique.
378 Sequence of extra property names that must be unique.
386 otherwise it is a list of duplicated unique properties that
403 # Set up unique properties.