There are three types of identifiers in place:
-
id
s. These are sequential and auto-generated by BaseModel. As they are non-random, they should not be used in any user-facing setting. -
key
s. These are also auto generated by BaseModel. They are unique and entirely random, allowing them to be user-facing -
uuid
s. These are unique and Human-readable. They may be user-facing, but its probably better to usekey
s for all user facing accesses.
-
to_object
. This is generally what gets returned toHTTP GET
s to a particular Class. eg.GET /:key/meeting
would callMeeting
's.to_object(*whatever*)
-
__unicode__
. Django uses this to figure out how to present objects in a human readable format. Often this could bereturn self.uuid
.