Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 858 Bytes

STYLE.md

File metadata and controls

26 lines (16 loc) · 858 Bytes

The ORM

Fields

Identifiers

There are three types of identifiers in place:

  • ids. These are sequential and auto-generated by BaseModel. As they are non-random, they should not be used in any user-facing setting.

  • keys. These are also auto generated by BaseModel. They are unique and entirely random, allowing them to be user-facing

  • uuids. These are unique and Human-readable. They may be user-facing, but its probably better to use keys for all user facing accesses.

Methods

  • to_object. This is generally what gets returned to HTTP GETs to a particular Class. eg. GET /:key/meeting would call Meeting's .to_object(*whatever*)

  • __unicode__. Django uses this to figure out how to present objects in a human readable format. Often this could be return self.uuid.