This file contains 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
// List out each domain's colors theme | |
@mathDomainColor: #297395; // The dark blue | |
@mathSubjectColor: #30a7de; // The lighter blue | |
... more colors ... | |
@scienceDomainColor: #ba3d66; // The dark pink | |
@scienceSubjectColor: #c8547c; // The lighter pink | |
... more colors ... | |
// Here's a mixin that will call .domainRuleToApply on each domain for us |
This file contains 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
class NdbKeyProperty(db.Property): | |
"""Stores an ndb key in a db model.""" | |
def get_value_for_datastore(self, model_instance): | |
value = super(NdbKeyProperty, self).get_value_for_datastore( | |
model_instance) | |
if value is None: | |
return value | |
# We were given an ndb key, and we want to store it as a db key | |
return value.to_old_key() |