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
# -*- 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""" |
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
<script> | |
$.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); | |
} | |
$('table').row(2).hide(); |