Skip to content

Commit

Permalink
modernize
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonc committed Feb 15, 2012
1 parent 2c8a919 commit 33dec55
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
10 changes: 3 additions & 7 deletions development.ini
@@ -1,13 +1,9 @@
[app:virginia1]
[app:main]
use = egg:virginia
root = %(here)s/content

[pipeline:main]
pipeline =
egg:WebError
virginia1
pyramid.includes = pyramid_debugtoolbar

[server:main]
use = egg:Paste#http
use = egg:waitress#main
host = 0.0.0.0
port = 6543
11 changes: 8 additions & 3 deletions setup.py
Expand Up @@ -15,19 +15,24 @@
__version__ = '0.0'

import os
import sys

from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()

requires = [
'pyramid>=1.0a10',
'PasteScript',
'WebError',
'pyramid>=1.2',
'pyramid_debugtoolbar',
'zope.structuredtext',
'waitress',
]

if sys.version_info[:3] < (2,5,0):
raise RuntimeError('This application requires Python 2.6+')

setup(name='virginia',
version=__version__,
description='Serve slightly dynamic filesystem content via Pyramid',
Expand Down
3 changes: 3 additions & 0 deletions virginia/tests/test_views.py
@@ -1,5 +1,7 @@
import unittest
from pyramid import testing
from pyramid.interfaces import IResponse
from zope.interface import implementer

class FileViewTests(unittest.TestCase):
def setUp(self):
Expand Down Expand Up @@ -128,6 +130,7 @@ class DummyFile:
def __init__(self, path):
self.path = path

@implementer(IResponse) # dont try to convert to response when returned
class DummyResponse:
status = '200 OK'
headerlist = ()
Expand Down
4 changes: 2 additions & 2 deletions virginia/views.py
Expand Up @@ -6,8 +6,8 @@

from zope.structuredtext import stx2html

from webob import Response
from webob.exc import HTTPFound
from pyramid.response import Response
from pyramid.httpexceptions import HTTPFound

from pyramid.view import render_view_to_response
from pyramid.view import view_config
Expand Down

0 comments on commit 33dec55

Please sign in to comment.