This file contains hidden or 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
from django.contrib.admin import FieldListFilter | |
from django.utils.translation import ugettext as _ | |
class ActiveValueFilter(FieldListFilter): | |
"""list_filter which displays only the values for a field which are in use | |
This is handy when a large range has been filtered in some way which means | |
most of the potential values aren't currently in use. This requires a | |
queryset field or annotation named "item_count" to be present so it can |
This file contains hidden or 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
//get VALUE/TEXT of select from html, to insert in format ('val','text'), | |
$('#SELECT_ID').children().each(function(index){console.log("('"+$(this).val() + "', '" + $(this).text()+ "'),");}) |
This file contains hidden or 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 -*- | |
from django.core.mail import send_mail, mail_managers, EmailMultiAlternatives | |
from django.template.loader import render_to_string | |
from django.conf import settings | |
class Mailing: | |
path_prefix = 'mail/' | |
path_suffix = '.html' | |
prefix_title = u"TITLE BEGINNING - " |
NewerOlder