This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using the `@property` decorator allows the MongoEngine Document object to have | |
# properties that reference Models, and be got/set like normal foreign keys. | |
# This same pattern can work the other way and allow Models interface with | |
# Documents. | |
class Foo(mongoengine.Document): | |
# The `id` of the property is stored in the Document. | |
user_id = mongoengine.IntField() | |
# Setters and getters to interface with the SQL DB and set Users to the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
## Partials | |
Included in templates using CoffeeScript's string interpolation: | |
partial = "<partial>content {{ foo }}</partial>" | |
template = """ | |
<template> | |
<stuff>#{ partial }</stuff> |
NewerOlder