This Gist is similar to https://gist.github.com/noteed/8656989 which uses Open vSwitch instead of Tinc.
Download the install.sh script and run it:
> https://gist.githubusercontent.com/noteed/11031504/raw/install.sh
| # sample config file | |
| [do] | |
| 198.199.74.236 tinc_ip=10.1.1.1 hostname=ca_1_1 tinc_connectto=ca_2_2 | |
| 192.34.60.13 tinc_ip=10.1.1.2 hostname=ca_1_2 tinc_connectto=ca_1_1 | |
| 198.199.70.163 tinc_ip=10.1.1.3 hostname=ca_1_3 tinc_connectto=ca_1_2 | |
| 198.199.71.204 tinc_ip=10.1.2.1 hostname=ca_2_1 tinc_connectto=ca_1_3 | |
| 198.199.70.208 tinc_ip=10.1.2.2 hostname=ca_2_2 tinc_connectto=ca_2_1 |
| - name: Java install | |
| hosts: do | |
| user: root | |
| tasks: | |
| - name: Create java repo list | |
| action: shell echo 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main' >/etc/apt/sources.list.d/java.list | |
| - name: Add repo key | |
| action: command apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 | |
| - name: Accept java license | |
| action: shell echo 'oracle-java7-installer shared/accepted-oracle-license-v1-1 select true' | debconf-set-selections |
This Gist is similar to https://gist.github.com/noteed/8656989 which uses Open vSwitch instead of Tinc.
Download the install.sh script and run it:
> https://gist.githubusercontent.com/noteed/11031504/raw/install.sh
tox.ini goes into Django's root folder. test_*.py to the tests/ directory.
Install `tox`_ and run tox -e $python-$db. For instance, to run the tests on python 2.7 and sqlite:
tox -e py27-sqlite
You can also pass the app labels to test. To run the wsgi tests:
| [tox] | |
| envlist=py27,lint | |
| [testenv] | |
| downloadcache={homedir}/.pipcache | |
| distribute=True | |
| sitepackages=False | |
| [testenv:py27] | |
| deps=nose |
| # ((ak)) config | |
| export HISTCONTROL=ignoredups:ignorespace | |
| export HISTSIZE=5000 | |
| export HISTFILESIZE=1000 | |
| export HISTIGNORE="ls:cd:[bf]g:exit:..:...:l:l.:ll:la:h:history:edit-profile:reload-profile" | |
| # ((ak)) helpers | |
| alias l='ls -l'; | |
| alias l.='ls -d .*' | |
| alias ll='ls -Al'; |
| """ | |
| Administrador con permisos para consulta(view) | |
| Es una clase que extiende de admin.ModelAdmin y se utilizar para integrar | |
| el admin con permiso de consulta. | |
| Hay que integrarlo con el script que agrega a todos los modelos el permiso | |
| de consulta(view): | |
| https://gist.github.com/nicpottier/880901 |
| .table-container th.asc:after { | |
| content: '\0000a0\0025b2'; | |
| } | |
| .table-container th.desc:after { | |
| content: '\0000a0\0025bc'; | |
| } | |
| .pagination { | |
| text-align: center; | |
| } |
| .table-container th.asc:after { | |
| content: '\0000a0\0025b2'; | |
| } | |
| .table-container th.desc:after { | |
| content: '\0000a0\0025bc'; | |
| } | |
| .pagination { | |
| text-align: center; | |
| } |