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
[alias] | |
st = status --ignore-submodules | |
stf = status | |
ci = commit | |
br = branch | |
co = checkout | |
rb = rebase | |
df = diff | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' | |
lol = log --graph --decorate --pretty=oneline --abbrev-commit |
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
" Gist | |
let g:gist_clip_command='pbcopy' | |
let g:gist_detect_filetype=1 | |
nnoremap <silent> <Leader>V :'<,'>Gist<CR> |
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
@transaction.commit_on_success(using='default') | |
def make_breadcrumb_relationships(self, rows): | |
"""Set the topic_parent for Kuma pages using parent_id""" | |
log.info("Building parent/child breadcrumb tree...") | |
for r in rows: | |
if not r['page_text'].strip(): | |
continue | |
bc_ids = [] | |
bc_ids.insert(0, r['page_id']) | |
if r['page_parent']: |
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
class DocumentTag(TagBase): | |
"""A tag indexing a document""" | |
class Meta: | |
verbose_name = _("Document Tag") | |
verbose_name_plural = _("Document Tags") |
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
class DocumentTag(TagBase): | |
"""A tag indexing a document""" | |
class Meta: | |
verbose_name = _("Document Tag") | |
verbose_name_plural = _("Document Tags") |
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
DEMO_UPLOADS_ROOT = getattr(settings, 'DEMO_UPLOADS_ROOT', | |
'%s/uploads/demos' % getattr(settings, 'MEDIA_ROOT', 'media')) | |
DEMO_UPLOADS_URL = getattr(settings, 'DEMO_UPLOADS_URL', | |
'%s/uploads/demos' % getattr(settings, 'MEDIA_URL', '/media')) | |
demo_uploads_fs = FileSystemStorage(location=DEMO_UPLOADS_ROOT, base_url=DEMO_UPLOADS_URL) |
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
DEMO_UPLOADS_ROOT = getattr(settings, 'DEMO_UPLOADS_ROOT', | |
'%s/uploads/demos' % getattr(settings, 'MEDIA_ROOT', 'media')) | |
DEMO_UPLOADS_URL = getattr(settings, 'DEMO_UPLOADS_URL', | |
'%s/uploads/demos' % getattr(settings, 'MEDIA_URL', '/media')) | |
demo_uploads_fs = FileSystemStorage(location=DEMO_UPLOADS_ROOT, base_url=DEMO_UPLOADS_URL) |
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
sed -i '' -e "s/devmo_url(_('\/en\/\(.*\)'))/'\/docs\/\1/'" templates/base.html |
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
import jingo | |
from wiki import ReadOnlyException | |
class ReadOnlyMiddleware(object): | |
""" | |
Renders a 403.html page with a flag for a specific message. | |
""" | |
def process_exception(self, request, exception): | |
import pdb; pdb.set_trace() |
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
commit 3ac0c166e8b32b91ea892ea05c487522956102cf | |
Merge: 36f8717 f8941b4 | |
Author: David Walsh <davidwalsh83@gmail.com> | |
Date: Thu Jul 5 13:48:31 2012 -0700 | |
Merge pull request #346 from lmorchard/edit-non-english-765647 | |
fix bug 765647: Properly handle "edit" button as translation request | |
commit f8941b4077e85ee66485f7fb355fad479280b0a0 |