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
{% load i18n %} | |
{% if f %} | |
<li class="form-field {% if forloop and forloop.counter|divisibleby:2 %}even{% endif %} {{f.auto_id }} {{f.field.widget.attrs.li_class}} {% if f.errors %} invalid error{% endif %}"> | |
{% if f.field.before %} | |
<span class="before">{{f.field.before}}</span> | |
{% endif %} | |
{% if f.field.or_divider %} | |
<div class="or-divider-container"><div class="or-divider">{% trans "or" %}</div></div> | |
{% endif %} | |
{% if f.help_text and tooltip %} |
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.contrib import admin | |
from django.contrib.auth.admin import UserAdmin | |
from django.utils.translation import ugettext_lazy as _ | |
from earnest.accounts.models import Account, AccessHistory | |
from earnest.accounts.forms import AdminPasswordChangeForm, AdminRegisterUserFullForm | |
class ReadonlyTabularInline(admin.TabularInline): |
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
{% block main_section_content %} | |
{% endblock %} | |
<a class="close-reveal-modal">×</a> | |
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
AnimatedTransitionRegion = Backbone.Marionette.Region.extend({ | |
show: function(view){ | |
this.ensureEl(); | |
view.render(); | |
this.close(function() { | |
if (this.currentView && this.currentView !== view) { return; } | |
this.currentView = view; | |
this.open(view, function(){ |
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
// using jQuery | |
function getCookie(name) { | |
var cookieValue = null; | |
if (document.cookie && document.cookie != '') { | |
var cookies = document.cookie.split(';'); | |
for (var i = 0; i < cookies.length; i++) { | |
var cookie = jQuery.trim(cookies[i]); | |
// Does this cookie string begin with the name we want? | |
if (cookie.substring(0, name.length + 1) == (name + '=')) { | |
cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); |
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
class TransactionsList(ListAPIView): | |
""" | |
List all transactions for currently logged in user, paginated by 25 | |
page -- page number | |
ordering -- yoddle_amount, created, yoddle_description, reverse order ie. -yoddle_amount | |
""" | |
model = Transaction |
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.conf import settings | |
from django.core.mail import EmailMessage | |
def zendesk_ticket(subject, form, request, form_type='email'): | |
email = form.cleaned_data['email'] | |
if form_type == 'email': | |
message = """ | |
Email: %s |
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
var gulp = require('gulp'); | |
var compass = require('gulp-compass'); | |
var path = require('path'); | |
var paths = { | |
styles: { | |
src: 'nutrimom/static/scss/*', | |
dest: 'nutrimom/static/.sass-cache' | |
} | |
}; |
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
/* jslint browser: true, undef: true, newcap: true, forin: true, sub: true, white: true, indent: 4, unused: false */ | |
/* globals define: true */ | |
define( | |
[ | |
'angularAMD', | |
'angular-mm-foundation', | |
'selectize-ng' | |
], function (angularAMD) { | |
$.noConflict(); |
OlderNewer