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
[{"model": "auth.user", | |
"pk": 1, | |
"fields": | |
{"username": "admin", | |
"first_name": "", | |
"last_name": "", | |
"is_active": true, | |
"is_superuser": true, | |
"is_staff": true, | |
"password": "pbkdf2_sha256$15000$TrGrqtzwNJUa$omLG886xVSLNxYOvjrceDbWQS5ISmzyPM9ka0rAhu3Y=", |
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 __future__ import unicode_literals | |
from django.db import migrations | |
from django.contrib.auth.admin import User | |
def create_superuser(apps, schema_editor): | |
superuser = User() | |
superuser.is_active = True |
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 logging | |
from inspect import getouterframes, currentframe | |
from functools import wraps | |
logger = logging.getLogger(__name__) | |
def _get_caller_details(curframe): | |
""" | |
Helper retrieving caller details from current frame |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box_url = "http://files.vagrantup.com/lucid64.box" | |
config.vm.box = "ubuntu/lucid64" | |
config.vm.network "forwarded_port", guest: 5984, host: 5984 | |
config.vm.provision "shell", inline: <<-SHELL | |
sudo apt-get update | |
sudo apt-get install -y python-software-properties curl |
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
function p_curl() { | |
{ | |
curl "$@" | |
}|python -mjson.tool | |
} |
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 SettingsReader: | |
def __init__(self, opts, config, settings): | |
self.opts = opts | |
self.config = config | |
self.settings = settings | |
def __contains__(self, key): | |
if (key in self.opts or | |
key in self.config or | |
key in self.settings): |
NewerOlder