Skip to content

Instantly share code, notes, and snippets.

@hsparikh
hsparikh / django-crossdomainxhr-middleware.py
Created October 13, 2012 05:13
Middlware to allow's your django server to respond appropriately to cross domain XHR (postMessage html5 API).
import re
from django.utils.text import compress_string
from django.utils.cache import patch_vary_headers
from django import http
try:
import settings
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS
@hsparikh
hsparikh / dataset-filter.json
Last active May 4, 2016 10:59 — forked from jpatel3/dataset-filter.json
Tuva datasets filter menu config
[{
"filter_name": "Subject",
"children": [{
"name": "",
"tags": [{
"name": "Community",
"description": "Community"
}, {
"name": "Politics",
"description": "Politics"
@hsparikh
hsparikh / dataset-filter.json
Last active September 19, 2016 05:17 — forked from naveenkumarganesan/dataset-filter.json
Tuva datasets filter menu config
[{
"filter_name": "Subject",
"filter_title": "Subject / Topic",
"children": [{
"name": "",
"tags": [{
"name": "Community",
"description": ""
},{
"name": "Culture",