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
#!/usr/bin/env python | |
# Author: iiie | |
# Need: Get environment variables into virtualenv / Django | |
# Usage: | |
# Add one or more keys: | |
# notku config:add AWS_KEY=abc123 [ANOTHER_KEY=another_value=allowed ...] | |
# Removed one or more keys: | |
# notku config:remove AWS_KEY [ANOTHER_KEY ...] | |
# List all keys | |
# notku config |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.box = "lucid64" | |
config.vm.provision :chef_client do |chef| | |
chef.chef_server_url = "http://example.com" | |
chef.validation_key_path = "~/.chef/validation.pem" | |
chef.node_name = "example" | |
chef.add_role("example") |
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
class ValidateModelMixin(object): | |
"""Make :meth:`save` call :meth:`full_clean`. | |
.. warning: | |
This should be the left-most mixin/super-class of a model. | |
Do you think Django models ``save`` method will validate all fields | |
(i.e. call ``full_clean``) before saving or any time at all? Wrong! |