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
.DS_Store | |
*.swp | |
*~.nib | |
build/ | |
*.pbxuser | |
*.perspective | |
*.perspectivev3 |
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
- (void)testAddedTest | |
{ | |
NSDictionary *arguments = nil; | |
RKPathMatcher *pathMatcher = [RKPathMatcher pathMatcherWithPattern:@"/api/v1/organizations"]; | |
BOOL isMatchingPattern = [pathMatcher matchesPath:@"/api/v1/organizations?name__icontains=t" tokenizeQueryStrings:YES parsedArguments:&arguments]; | |
assertThatBool(isMatchingPattern, is(equalToBool(YES))); | |
assertThat(arguments, isNot(empty())); | |
assertThat(arguments, hasEntries(@"name__icontains", @"t",nil)); | |
} |
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
{% load crispy_forms_field %} | |
{% if field.is_hidden %} | |
{{ field }} | |
{% else %} | |
<div id="div_{{ field.auto_id }}" class="clearfix control-group{% if form_show_errors%}{% if field.errors %} error{% endif %}{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}"> | |
{% comment %} | |
{% if field.label and not field|is_checkbox %} | |
<label for="{{ field.id_for_label }}" class="control-label {% if field.field.required %}requiredField{% endif %}"> |
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
from django.core.management.commands import test | |
from south.management.commands import patch_for_test_db_setup | |
from django.test.utils import get_runner | |
from django.conf import settings | |
TestRunner = get_runner(settings) | |
if hasattr(TestRunner, 'options'): | |
extra_options = TestRunner.options | |
else: |
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
Vagrant.configure("2") do |config| | |
# Use Ubuntu 12.04 64-bit for now. | |
config.vm.box = "precise-server-cloudimg-amd64-vagrant-disk1" | |
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box" | |
# Provision the VM | |
config.vm.provision :shell, :path => "vagrant_data/install.sh" | |
# Configure network | |
config.vm.network :private_network, ip: "192.168.50.4" |
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
""" | |
API resources | |
""" | |
# Django imports | |
from django import forms | |
from django.db.models import Count | |
from django.utils.datastructures import SortedDict | |
from django.contrib.contenttypes.models import ContentType | |
# 3rd party imports |
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
# This configuration will set up a database (db) and a web server (web) VM. | |
# Assumes the use of VirtualBox 4.3.14-95030 as a provider. | |
# Uses vagrant-vbguest plugin (https://github.com/dotless-de/vagrant-vbguest) | |
# to keep VirtualBox Guest Addition wrangled. | |
# Configuration | |
# Machine-specific configuration | |
DB_INSTALL_SCRIPT = "vagrant_data/db/install.sh" |
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
createCORSRequest: (method, url) -> | |
xhr = new XMLHttpRequest() | |
if xhr.withCredentials? | |
xhr.open method, url, true | |
else if typeof XDomainRequest != "undefined" | |
xhr = new XDomainRequest() | |
xhr.open method, url | |
else | |
xhr = null |
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
(VBEZ)vagrant@web:/vagrant$ aws s3 sync "static/" "s3://vbenergyzone_staging/" --acl public-read --exclude "media/*" --delete --debug | |
2014-06-24 02:08:34,235 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/1.3.18 Python/2.7.7 Linux/3.2.0-23-generic, botocore version: 0.52.0 | |
2014-06-24 02:08:34,246 - MainThread - botocore.service - DEBUG - Creating service object for: s3 | |
2014-06-24 02:08:34,463 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.s3: calling handler <function signature_overrides at 0x7f10d6022050> | |
2014-06-24 02:08:34,466 - MainThread - botocore.hooks - DEBUG - Event service-created: calling handler <function register_retries_for_service at 0x7f10d601c6e0> | |
2014-06-24 02:08:34,467 - MainThread - botocore.handlers - DEBUG - Registering retry handlers for service: Service(s3) | |
2014-06-24 02:08:34,495 - MainThread - botocore.hooks - DEBUG - Event creating-endpoint.s3: calling handler <function maybe_switch_to_s3sigv4 at 0x7f10d6021ed8> | |
2014-06-24 02:08:34,497 - MainThread |
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
""" | |
API resources | |
""" | |
# Python imports | |
import logging | |
# Django imports | |
from django import forms | |
from django.contrib.contenttypes.models import ContentType | |
from django.core.exceptions import ValidationError |
OlderNewer