Django is app-based
projects vs. apps
- templates directory in apps
- static directory in apps
python manage.py collectstatic
| #!py | |
| def get_roles(nodename): | |
| """ | |
| Stub function that will by replaced by a dynamic lookup | |
| """ | |
| roles = [] |
| 2013-03-08 23:49:48,566 [salt.master ][DEBUG ] Published command details {'tgt_type': 'glob', 'jid': '20130308234948566036', 'tgt': '*', 'ret': '', 'user': 'sudo_local', 'arg': [], 'fun': 'test.ping'} | |
| 2013-03-08 23:49:48,577 [salt.master ][INFO ] AES payload received with command _return | |
| 2013-03-08 23:49:48,577 [salt.master ][INFO ] Got return from lxc01.baremetal.io for job 20130308234948566036 | |
| 2013-03-08 23:49:48,577 [salt.master ][DEBUG ] {'jid': '20130308234948566036', 'cmd': '_return', 'return': True, 'id': 'lxc01.baremetal.io'} | |
| 2013-03-08 23:49:48,587 [salt.master ][INFO ] AES payload received with command _return | |
| 2013-03-08 23:49:48,587 [salt.master ][INFO ] Got return from bm-django for job 20130308234948566036 | |
| 2013-03-08 23:49:48,587 [salt.master ][DEBUG ] {' |
| VBOX_MANAGE='/Applications/VirtualBox.app/Contents/MacOS/VBoxManage-amd64' | |
| function vautostart() { | |
| cat ${HOME}/.vbox_autostart | while read i; do | |
| ${VBOX_MANAGE} startvm --type=headless $i | |
| done; | |
| } | |
| function _vdo() { | |
| buf=$1 |
| # MIT License: | |
| # | |
| # Copyright (C) 2012 Heroku, Inc. | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy of | |
| # this software and associated documentation files (the "Software"), to deal in | |
| # the Software without restriction, including without limitation the rights to | |
| # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
| # of the Software, and to permit persons to whom the Software is furnished to do | |
| # so, subject to the following conditions: |
Django is app-based
projects vs. apps
python manage.py collectstatic
Created mine.sls pillar:
#!py
def run():
return {
'mine_interval': 60,
'mine_functions': {
'network.interfaces': [],
| upstream docker_registry { | |
| server 127.0.0.1:15000; | |
| } | |
| server { | |
| listen 443; | |
| root /dev/null; | |
| index index.html index.htm; |
| class Repository(BaremetalModel): | |
| account = models.ForeignKey('Account') | |
| url = GitURIField() | |
| def __unicode__(self): | |
| return unicode(self.url) | |
| def do_something(self): | |
| pass |
| {{ salt['baremetal.ssl_cert_path'](domain) }}: | |
| file.managed: | |
| - contents: | | |
| {{ domain['ssl_cert'] | indent(0) }} |
| #!/usr/bin/env python | |
| """ | |
| Find a name in Twitter's packed namespace | |
| Type in a word like your name and get some variations. | |
| """ | |
| import os | |
| import sys | |