This file contains 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 8790b3702910236185f6fd08f39420ace407e69e Mon Sep 17 00:00:00 2001 | |
From: FELD Boris <lothiraldan@gmail.com> | |
Date: Wed, 6 Apr 2011 11:27:22 +0200 | |
Subject: [PATCH] Add support for pagination in notmyidea-cms theme | |
--- | |
notmyidea-cms/templates/index.html | 20 +++++++++++++++----- | |
notmyidea-cms/templates/pagination.html | 12 ++++++++++++ | |
2 files changed, 27 insertions(+), 5 deletions(-) | |
create mode 100644 notmyidea-cms/templates/pagination.html |
This file contains 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 socket | |
import sys | |
HOST, PORT = "localhost", 9999 | |
data = str(sys.argv[1]) | |
# Create a socket (SOCK_STREAM means a TCP socket) | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
# Connect to server and send data |
This file contains 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 pyti.vmanager.diskhandler import * | |
from pyti.vmanager.vms import * | |
import time | |
import sys | |
from os import getcwd | |
from os.path import join | |
hd_location = join(getcwd(), sys.argv[1]) |
This file contains 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 unittest | |
def support_http_method(method): | |
if method in ('POST', 'GETT'): | |
return True | |
else: | |
return False | |
class SupportHttpMethodTestCase(unittest.TestCase): |
This file contains 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 unittest | |
def support_http_protocol(protocol): | |
if protocol in ('POST', 'GET'): | |
return True | |
else: | |
return False | |
class SupportHttpProtocolTestCase(unittest.TestCase): |
This file contains 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 support_http_method(method): | |
if method in ('POST', 'GET'): | |
return True | |
else: | |
return False | |
def test_support(): | |
expected_values = { | |
'POST': True, | |
'GET': True, |
This file contains 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 support_http_method(method): | |
if method in ('POST', 'GETT'): | |
return True | |
else: | |
return False | |
def test_support(): | |
expected_values = { | |
'POST': True, | |
'GET': True, |
This file contains 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 unittest | |
from poc import TemplateTestCase, Call, template | |
def support_http_method(method): | |
if method in ('POST', 'GET'): | |
return True | |
else: | |
return False | |
class SupportHttpMethodTestCase(unittest.TestCase): |
This file contains 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 unittest | |
from poc import TemplateTestCase, Call, template | |
def support_http_method(method): | |
if method in ('POST', 'GETT'): | |
return True | |
else: | |
return False | |
class SupportHttpMethodTestCase(unittest.TestCase): |
This file contains 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 unittest | |
class ListApiSet(object): | |
def __init__(self): | |
self.container = set() | |
def extend(self, value): | |
self.container.update(value) | |
return self.container |