Skip to content

Instantly share code, notes, and snippets.


Esau Rodriguez esauro

View GitHub Profile
esauro / row_selector.js
Created May 16, 2012
jQuery selector for table rows o table cols based on, modified to make row includes th
View row_selector.js
$.fn.row = function(i) {
return $('tr:nth-child('+(i+1)+') td, tr:nth-child('+(i+1)+') th', this);
$.fn.column = function(i) {
return $('tr td:nth-child('+(i+1)+')', this);
esauro /
Created Apr 25, 2012
Action to generate a json document with all objects and related objects
# -*- coding: utf-8 -*-
__author__ = 'esauro'
from django.core import serializers
from django.db.models.deletion import Collector
from django.http import HttpResponse
from django.db import router
def export_related_as_json(modeladmin, request, qs):
"""Serializes the selected queryset and all related objects to JSON"""
You can’t perform that action at this time.