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
# WAGTAILDEMO CODE | |
git clone [email protected]:torchbox/wagtaildemo.git wagtaildemo | |
cd wagtaildemo | |
# Rename torchbox remote to 'torchbox' | |
# This allows you to use your own fork as 'origin' | |
git remote rename origin torchbox | |
# Add remotes to wagtail core developer forks | |
git remote add kaedroho [email protected]:kaedroho/wagtaildemo.git |
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
from django.template import Template, Context | |
from django.utils import timezone | |
import StringIO, csv | |
class Report(object): | |
title = "Report" | |
fields = () | |
extra_css = "" | |
template = """ |
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
def save_draft(self, user=None): | |
self.save_revision( | |
user=user | |
) | |
def submit_for_moderation(self, user=None) | |
self.save_revision( | |
user=user, | |
submitted_for_moderation=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
DELETE FROM south_migrationhistory WHERE migration = '0003_create_page_view_restriction'; | |
ALTER TABLE wagtailcore_site DROP CONSTRAINT core_site_hostname_uniq; | |
ALTER TABLE "wagtailcore_site" ADD CONSTRAINT "wagtailcore_site_hostname_29d2c7f94ac026_uniq" UNIQUE ("hostname", "port"); | |
ALTER TABLE "wagtailcore_pagerevision" ADD COLUMN "approved_go_live_at" timestamp with time zone NULL; | |
ALTER TABLE "wagtailcore_page" ADD COLUMN "go_live_at" timestamp with time zone NULL; | |
ALTER TABLE "wagtailcore_page" ADD COLUMN "expire_at" timestamp with time zone NULL; | |
ALTER TABLE "wagtailcore_page" ADD COLUMN "expired" boolean NOT NULL; | |
INSERT INTO south_migrationhistory(app_name, migration, applied) VALUES ('wagtailcore', '0003_auto__del_unique_site_hostname__add_unique_site_hostname_port', now()); |
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
def used_by(self): | |
"""Returns the pages that an object was used in.""" | |
if not hasattr(settings, 'USAGE_COUNT') or not settings.USAGE_COUNT: | |
return [] | |
pages = Page.objects.none() | |
relations = self._meta.get_all_related_objects( | |
include_hidden=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
background yes | |
use_xft yes | |
xftfont HandelGotD:size=8 | |
xftalpha 0.5 | |
update_interval 4.0 | |
total_run_times 0 | |
own_window yes | |
own_window_type desktop | |
own_window_argb_visual yes | |
own_window_transparent yes |
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
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'godlygeek/tabular' | |
Plugin 'plasticboy/vim-markdown' | |
Plugin 'Rykka/riv.vim' |
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
[global_config] | |
title_transmit_bg_color = "#000000" | |
title_inactive_bg_color = "#000000" | |
[keybindings] | |
hide_window = <Shift><Control>a | |
[profiles] | |
[[default]] | |
palette = "#073642:#dc322f:#859900:#b58900:#268bd2:#d33682:#2aa198:#eee8d5:#002b36:#cb4b16:#586e75:#657b83:#839496:#6c71c4:#93a1a1:#fdf6e3" | |
foreground_color = "#eee8d5" | |
background_color = "#002b36" |
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
FROM ubuntu:trusty | |
MAINTAINER Karl Hobley | |
# Base packages | |
RUN apt-get update | |
RUN apt-get install -y build-essential | |
RUN apt-get install -y python python-dev python-setuptools | |
RUN apt-get install -y libpq-dev | |
# PIP |
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
# Fetch media from remote server | |
rsync -avz -e ssh user@host:/path/to/media/ . |