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
var map = require('mappings.js'); | |
// Source object | |
var source = {}; | |
var results = map.song(source) |
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
from django.db import models | |
from jsonfield import JSONField | |
class ModelA(models.Model): | |
data = models.IntegerField() | |
extra = JSONField |
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
# Enable "presence" events | |
# - http://docs.saltstack.com/en/latest/ref/configuration/master.html#presence-events | |
# - http://docs.saltstack.com/en/latest/topics/event/master_events.html#presence-events | |
presence_events: True | |
reactor: | |
# Note: This tag has a typo in it (version 2014.1.5), subject to change! | |
- 'salt/presense/change': | |
- /srv/reactor/presence.sls |
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
from django.db import models | |
from rest_framework_proxy.db.models import ProxyModel | |
class Snippet(ProxyModel): | |
name = models.CharField(max_length=25) | |
body = models.TextField(blank=True) | |
@staticmethod |
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
from django.db import models | |
class ClassB(models.Model): | |
name = models.CharField(max_length=255) | |
class ClassA(models.Model): | |
name = models.CharField(max_length=255) | |
childs = models.ManyToManyField(ClassB, blank=True, null=True) | |