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
#!/usr/bin/env python | |
import tw2.core as twc | |
import tw2.forms as twf | |
import tw2.bootstrap.forms as twb | |
import tw2.devtools as twd | |
#https://github.com/moschlar/tw2.ace | |
import tw2.ace | |
#https://github.com/moschlar/tw2.codemirror | |
import tw2.codemirror |
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
# -*- coding: utf-8 -*- | |
""" | |
This test module will run setUp and tearDown only *once* for all test cases in this module. | |
This is very convenient for users who want to just test multiple urls whether they are reachable and respond with the correct http response code. | |
""" | |
import logging | |
log = logging.getLogger(__name__) | |
from os import path |
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
<section id="extras" class="body"> | |
% if 'blogroll' in conf: | |
<div class="blogroll"> | |
<h2>blogroll</h2> | |
<ul> | |
% for name, link, tooltip in conf.blogroll: | |
% if not link: | |
<li><p>${ name or ' ' }</p></li> | |
% else: | |
<li><a href="${ link or '#' }" rel="external" title="${ tooltip or '' }">${ name or ' ' }</a></li> |
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
#!/usr/bin/env python2 | |
import os, sys | |
from magic import Magic | |
from collections import defaultdict | |
from itertools import groupby | |
from pprint import pprint | |
m = Magic(mime=True) | |
me = Magic(mime_encoding=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
from sauce.tests import TestController | |
__all__ = ['TestSite'] | |
class TestSite(TestController): | |
sites = ['/', '/about', '/contact'] | |
def _do_site(self, site): | |
response = self.app.get(site) |
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 CalendarDateTimePicker(Bootstrap, twc.CompoundWidget): | |
resources = set(CalendarDatePicker.resources + CalendarTimePicker.resources) | |
date = CalendarDatePicker() | |
time = CalendarTimePicker() | |
def _validate(self, value, state=None): | |
""" | |
Inner validation method; this is called by validate and should not be | |
called directly. Overriding this method in widgets is discouraged; a | |
custom validator should be coded instead. However, in some |
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
# -*- coding: utf-8 -*- | |
''' | |
Created on 17.03.2012 | |
@author: moschlar | |
''' | |
import tw2.core as twc | |
import tw2.forms as twf | |
import tw2.bootstrap as twb |
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
# -*- coding: utf-8 -*- | |
''' | |
Created on 17.03.2012 | |
Ported to tw2 on 25.05.2012 | |
@author: moschlar | |
''' | |
import tw2.core as twc | |
import tw2.forms as twf |
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
# Copyright 1999-2012 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
# $Header: $ | |
EAPI=4 | |
inherit eutils bash-completion-r1 | |
DESCRIPTION="Git extensions to provide high-level repository operations for Vincent Driessen's branching model." | |
HOMEPAGE="https://github.com/nvie/gitflow" |
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
# -*- coding: utf-8 -*- | |
''' | |
Created on 17.03.2012 | |
Ported to tw2 on 25.05.2012 | |
@author: moschlar | |
''' | |
import tw2.core as twc | |
import tw2.forms as twf |