Get an object from the database.
This tag will return a dagabase object if it exists, otherwise `None`. Additionally, if the object exists, the enclosed block will be executed.
<db:get model="#Topic" let:slug="url.topic" dst="topic"/>
name | purpose | type | required? | default | choices |
---|---|---|---|---|---|
db |
Database to use | text | No | "_default" |
|
filter |
Filter expression | database expression | No | ||
forupdate |
Issue a select FOR UPDATE? | boolean | No | no |
|
from |
Application | application reference | No | ||
model |
Model element reference | text | No | ||
modelobj |
Model object | expression | No | None |
|
orderby |
Order by | comma list | No | ||
src |
query set to restrict search | expression | No | None |
name | purpose | type | required? | default | choices |
---|---|---|---|---|---|
dst |
Destination | reference | No | ||
if |
Conditional expression | expression | No | yes |
|
value |
Value | expression | No | None |