Fix some Salt stuff and omit_code option in API.

master
Nick Sergeant 2014-11-20 19:47:42 -05:00
parent 9d97a697a0
commit efbddec783
4 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,5 @@
base:
'local.snipt.net':
- vagrant
'*':
- production
'local.snipt.net':
- vagrant

View File

@ -33,6 +33,7 @@ virtualenvwrapper:
git.latest:
- name: https://github.com/nicksergeant/snipt.git
- rev: master
- target: /var/www/snipt
- user: deploy

View File

@ -89,12 +89,12 @@ end
# Virtualenv {{{
set -x WORKON_HOME '/var/www/.virtualenvs'
source ~/.config/fish/virtualenv.fish
. ~/.config/fish/virtualenv.fish
# }}}
# Z {{{
source /etc/z.fish
. /etc/z.fish
function j
z $argv

View File

@ -222,6 +222,10 @@ class PublicSniptResource(ModelResource):
bundle.data['raw_url'] = bundle.obj.get_raw_url()
bundle.data['full_absolute_url'] = bundle.obj.get_full_absolute_url()
bundle.data['description_rendered'] = linebreaksbr(urlize(bundle.obj.description))
if 'omit_code' in bundle.request.GET:
del bundle.data['code']
return bundle
def build_filters(self, filters=None):