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
Components.Router = Backbone.Router.extend({ | |
// @todo also support unnamed params | |
// 'page/edit/(?<language>[a-z]{2})/(?<entityId>[a-z0-9]{24})/(.*)' | |
route: function(route, name, callback) { | |
Backbone.history || (Backbone.history = new Backbone.History); | |
if (!XRegExp.isRegExp(route)) route = this._routeToRegExp(route); | |
if (!callback) callback = this[name]; | |
Backbone.history.route(route, _.bind(function(fragment) { | |
var routeParams = XRegExp.exec(fragment, route), |
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
import functools | |
import unittest2 | |
import os | |
from google.appengine.api import datastore_errors | |
from google.appengine.ext.ndb import model | |
from google.appengine.ext.ndb import tasklets | |
from google.appengine.ext import testbed | |
#--------------------------------------- |
NewerOlder