1. Ludia
  2. Untitled project
  3. dynamodb-mapper

Source

dynamodb-mapper / docs / api / model.rst

Diff from to

File docs/api/model.rst

  • Ignore whitespace
 >>> data = MyModel()
 >>> data.key = u"foo/bar"
 
+Initial values can even be specified directly in the constructor. Otherwise, unless
+:ref:`defaults are provided <using-default-values>`, all fields are set to ``None``
+
+>>> data = MyModel(key=u"foo/bar")
+>>> print data.key
+foo/bar
+
 About keys
 ==========
 
 creation date if needed. For more background on the querying system, please see
 the :ref:`accessing data <accessing-data>` section of this manual.
 
+.. _using-default-values:
+
 Default values
 --------------