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
const has = (obj, key) => Object.hasOwnProperty.call(obj, key); | |
let deepCopy = (obj, res) => { | |
let keys = Object.keys(obj); | |
let result = res || {}; | |
keys.forEach(key => { | |
if ('object' != typeof obj[key] && has(obj, key)) { | |
result[key] = obj[key]; | |
} else { |
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
var Command = (function() { | |
return function(command, args) { | |
console.log("Dispatch", command); | |
}; | |
})(); | |
Command("start", { test: 6 }); |
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
import os | |
import sys | |
from django.conf import settings | |
from django.contrib import messages | |
from django.http import HttpResponse, HttpResponseNotAllowed | |
from django.shortcuts import redirect | |
from django.urls import path | |
from django.template import Template, RequestContext | |
from django.views.decorators.http import require_GET |