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
#!/bin/bash | |
git pull | |
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install -r requirements.txt | |
./manage.py migrate | |
sh ./scripts/bind_solr.sh | |
./manage.py rebuild_index --noinput |
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 preloader %} | |
{% if user.is_authenticated %} | |
<div data-ng-if="showPreloader"> | |
{% assign name="loadingText" %}{% trans "Loading..." %}{% endassign %} | |
{% include 'inc/preloader.html' %} | |
</div> | |
{% endif %} | |
{% endblock %} |
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
elm.bind('paste', function(e) { | |
//console.log(e); | |
e.preventDefault(); | |
var text = (e.originalEvent || e).clipboardData.getData("text/html"); | |
if (!text){ | |
console.log('no html'); | |
text = (e.originalEvent || e).clipboardData.getData("text/plain"); | |
} | |
var temp = $('<div />'); | |
$(temp).html(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
from datetime import datetime | |
from dateutil.relativedelta import relativedelta | |
from django.template import Library | |
from django.template import Node, TemplateSyntaxError | |
from django.utils.timezone import get_current_timezone | |
from django.template.defaultfilters import date | |
from django.conf import settings | |
register = Library() |
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
<li class="form-field" ng-class="{invalid: errors[name], error: errors[name]}"> | |
<input ng-model="model" ng-init="model" type="{[{field.type}]}" ng-required="{[{field.required}]}" placeholder="{[{field.label}]}" ng-maxlength="{[{field.max_length}]}" name="{[{name}]}"/> | |
<ng-include ng-if="errors[name]" src="'templates/directives/aa-forms/error_list.html'"></ng-include> | |
</li> |
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, Settings: true, console: true */ | |
define([ | |
'app/app', | |
'ngCordova', | |
], function( | |
App | |
) { | |
"use strict"; |
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
[MASTER] | |
# Specify a configuration file. | |
#rcfile= | |
# Python code to execute, usually for sys.path manipulation such as | |
# pygtk.require(). | |
#init-hook= | |
# Profiled execution. |
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 rest_framework.fields import RegexField | |
from localflavor.us.forms import USZipCodeField as FormUSZipCodeField | |
class USZipCodeField(RegexField): | |
"""" | |
A form field that validates input as a U.S. ZIP code. Valid formats are | |
XXXXX or XXXXX-XXXX. | |
.. note:: | |
If you are looking for a form field with a list of U.S. Postal Service | |
locations please use :class:`~localflavor.us.forms.USPSSelect`. |
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
import re | |
from django.core.validators import EMPTY_VALUES | |
from django.utils.encoding import smart_text | |
from rest_framework.fields import CharField | |
from localflavor.us.forms import USPhoneNumberField as FormUSPhoneNumberField, phone_digits_re | |
from django.core.exceptions import ValidationError | |
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
javascript:!function(a){var b=document.createElement("textarea"),c=document.getSelection();b.textContent=a,document.body.appendChild(b),c.removeAllRanges(),b.select(),document.execCommand("copy"),c.removeAllRanges(),document.body.removeChild(b)}(document.title.split("]")[0].replace("[","")+" - "+document.getElementById("summary-val").textContent); |