Skip to content

Instantly share code, notes, and snippets.

View jackdied's full-sized avatar

Jack Diederich jackdied

  • Boston, MA
View GitHub Profile
import django.db
import collections
all_models = django.db.models.get_models()
def find_deps(models):
""" return a dict of {model : [all dependent models] """
deps = collections.defaultdict(set)
name_to_model = {}
for model in models:
@jackdied
jackdied / gist:4166803
Created November 29, 2012 04:29
Node.js is the future
TypeError: Cannot call method 'split' of undefined
at makeReturnUrl (/app/main.js:29:19)
at handleError (/app/main.js:51:16)
at /app/main.js:134:7
at callbacks (/app/node_modules/express/lib/router/index.js:160:37)
at param (/app/node_modules/express/lib/router/index.js:134:11)
at pass (/app/node_modules/express/lib/router/index.js:141:5)
at Router._dispatch (/app/node_modules/express/lib/router/index.js:169:5)
at Object.router (/app/node_modules/express/lib/router/index.js:32:10)
at next (/app/node_modules/express/node_modules/connect/lib/proto.js:190:15)