Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pyc
pisa.egg-info
8 changes: 4 additions & 4 deletions demo/cherrypy/demo-cherrypy.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[global]
server.socket_host = "localhost"
server.socket_port = 8080
server.thread_pool = 10
[global]
server.socket_host = "localhost"
server.socket_port = 8080
server.thread_pool = 10
2 changes: 1 addition & 1 deletion demo/cherrypy/demo-cherrypy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/local/bin/python
# -*- coding: ISO-8859-1 -*-
# -*- coding: utf-8 -*-
#############################################
## (C)opyright by Dirk Holtwick, 2008 ##
## All rights reserved ##
Expand Down
104 changes: 52 additions & 52 deletions demo/tgpisa/tgpisa/commands.py
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
# -*- coding: utf-8 -*-
"""This module contains functions called from console script entry points."""
import os
import sys
from os.path import dirname, exists, join
import pkg_resources
pkg_resources.require("TurboGears")
import turbogears
import cherrypy
cherrypy.lowercase_api = True
class ConfigurationError(Exception):
pass
def start():
"""Start the CherryPy application server."""
setupdir = dirname(dirname(__file__))
curdir = os.getcwd()
# First look on the command line for a desired config file,
# if it's not on the command line, then look for 'setup.py'
# in the current directory. If there, load configuration
# from a file called 'dev.cfg'. If it's not there, the project
# is probably installed and we'll look first for a file called
# 'prod.cfg' in the current directory and then for a default
# config file called 'default.cfg' packaged in the egg.
if len(sys.argv) > 1:
configfile = sys.argv[1]
elif exists(join(setupdir, "setup.py")):
configfile = join(setupdir, "dev.cfg")
elif exists(join(curdir, "prod.cfg")):
configfile = join(curdir, "prod.cfg")
else:
try:
configfile = pkg_resources.resource_filename(
pkg_resources.Requirement.parse("tgpisa"),
"config/default.cfg")
except pkg_resources.DistributionNotFound:
raise ConfigurationError("Could not find default configuration.")
turbogears.update_config(configfile=configfile,
modulename="tgpisa.config")
from tgpisa.controllers import Root
turbogears.start_server(Root())
# -*- coding: utf-8 -*-
"""This module contains functions called from console script entry points."""

import os
import sys

from os.path import dirname, exists, join

import pkg_resources
pkg_resources.require("TurboGears")

import turbogears
import cherrypy

cherrypy.lowercase_api = True

class ConfigurationError(Exception):
pass

def start():
"""Start the CherryPy application server."""

setupdir = dirname(dirname(__file__))
curdir = os.getcwd()

# First look on the command line for a desired config file,
# if it's not on the command line, then look for 'setup.py'
# in the current directory. If there, load configuration
# from a file called 'dev.cfg'. If it's not there, the project
# is probably installed and we'll look first for a file called
# 'prod.cfg' in the current directory and then for a default
# config file called 'default.cfg' packaged in the egg.
if len(sys.argv) > 1:
configfile = sys.argv[1]
elif exists(join(setupdir, "setup.py")):
configfile = join(setupdir, "dev.cfg")
elif exists(join(curdir, "prod.cfg")):
configfile = join(curdir, "prod.cfg")
else:
try:
configfile = pkg_resources.resource_filename(
pkg_resources.Requirement.parse("tgpisa"),
"config/default.cfg")
except pkg_resources.DistributionNotFound:
raise ConfigurationError("Could not find default configuration.")

turbogears.update_config(configfile=configfile,
modulename="tgpisa.config")

from tgpisa.controllers import Root

turbogears.start_server(Root())
266 changes: 133 additions & 133 deletions demo/tgpisa/tgpisa/static/css/style.css
Original file line number Diff line number Diff line change
@@ -1,134 +1,134 @@
/*
* Quick mash-up of CSS for the TG quick start page.
*/
html, body {
color: black;
background-color: #ddd;
font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, verdana, sans-serif;
margin: 0;
padding: 0;
}
td, th {padding:3px;border:none;}
tr th {text-align:left;background-color:#f0f0f0;color:#333;}
tr.odd td {background-color:#edf3fe;}
tr.even td {background-color:#fff;}
#header {
height: 80px;
width: 777px;
background: blue URL('../images/header_inner.png') no-repeat;
border-left: 1px solid #aaa;
border-right: 1px solid #aaa;
margin: 0 auto 0 auto;
}
a.link, a, a.active {
color: #369;
}
#main_content {
color: black;
font-size: 127%;
background-color: white;
width: 757px;
margin: 0 auto 0 auto;
border-left: 1px solid #aaa;
border-right: 1px solid #aaa;
padding: 10px;
}
#sidebar {
border: 1px solid #aaa;
background-color: #eee;
margin: 0.5em;
padding: 1em;
float: right;
width: 200px;
font-size: 88%;
}
#sidebar h2 {
margin-top: 0;
}
#sidebar ul {
margin-left: 1.5em;
padding-left: 0;
}
h1,h2,h3,h4,h5,h6,#getting_started_steps {
font-family: "Century Schoolbook L", Georgia, serif;
font-weight: bold;
}
h2 {
font-size: 150%;
}
#getting_started_steps a {
text-decoration: none;
}
#getting_started_steps a:hover {
text-decoration: underline;
}
#getting_started_steps li {
font-size: 80%;
margin-bottom: 0.5em;
}
#getting_started_steps h2 {
font-size: 120%;
}
#getting_started_steps p {
font: 100% "Lucida Grande", "Lucida Sans Unicode", geneva, verdana, sans-serif;
}
#footer {
border: 1px solid #aaa;
border-top: 0px none;
color: #999;
background-color: white;
padding: 10px;
font-size: 80%;
text-align: center;
width: 757px;
margin: 0 auto 1em auto;
}
.code {
font-family: monospace;
}
span.code {
font-weight: bold;
background: #eee;
}
#status_block {
margin: 0 auto 0.5em auto;
padding: 15px 10px 15px 55px;
background: #cec URL('../images/ok.png') left center no-repeat;
border: 1px solid #9c9;
width: 450px;
font-size: 120%;
font-weight: bolder;
}
.notice {
margin: 0.5em auto 0.5em auto;
padding: 15px 10px 15px 55px;
width: 450px;
background: #eef URL('../images/info.png') left center no-repeat;
border: 1px solid #cce;
}
.fielderror {
color: red;
font-weight: bold;
/*
* Quick mash-up of CSS for the TG quick start page.
*/

html, body {
color: black;
background-color: #ddd;
font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, verdana, sans-serif;
margin: 0;
padding: 0;
}

td, th {padding:3px;border:none;}
tr th {text-align:left;background-color:#f0f0f0;color:#333;}
tr.odd td {background-color:#edf3fe;}
tr.even td {background-color:#fff;}

#header {
height: 80px;
width: 777px;
background: blue URL('../images/header_inner.png') no-repeat;
border-left: 1px solid #aaa;
border-right: 1px solid #aaa;
margin: 0 auto 0 auto;
}

a.link, a, a.active {
color: #369;
}


#main_content {
color: black;
font-size: 127%;
background-color: white;
width: 757px;
margin: 0 auto 0 auto;
border-left: 1px solid #aaa;
border-right: 1px solid #aaa;
padding: 10px;
}

#sidebar {
border: 1px solid #aaa;
background-color: #eee;
margin: 0.5em;
padding: 1em;
float: right;
width: 200px;
font-size: 88%;
}

#sidebar h2 {
margin-top: 0;
}

#sidebar ul {
margin-left: 1.5em;
padding-left: 0;
}

h1,h2,h3,h4,h5,h6,#getting_started_steps {
font-family: "Century Schoolbook L", Georgia, serif;
font-weight: bold;
}

h2 {
font-size: 150%;
}

#getting_started_steps a {
text-decoration: none;
}

#getting_started_steps a:hover {
text-decoration: underline;
}

#getting_started_steps li {
font-size: 80%;
margin-bottom: 0.5em;
}

#getting_started_steps h2 {
font-size: 120%;
}

#getting_started_steps p {
font: 100% "Lucida Grande", "Lucida Sans Unicode", geneva, verdana, sans-serif;
}

#footer {
border: 1px solid #aaa;
border-top: 0px none;
color: #999;
background-color: white;
padding: 10px;
font-size: 80%;
text-align: center;
width: 757px;
margin: 0 auto 1em auto;
}

.code {
font-family: monospace;
}

span.code {
font-weight: bold;
background: #eee;
}

#status_block {
margin: 0 auto 0.5em auto;
padding: 15px 10px 15px 55px;
background: #cec URL('../images/ok.png') left center no-repeat;
border: 1px solid #9c9;
width: 450px;
font-size: 120%;
font-weight: bolder;
}

.notice {
margin: 0.5em auto 0.5em auto;
padding: 15px 10px 15px 55px;
width: 450px;
background: #eef URL('../images/info.png') left center no-repeat;
border: 1px solid #cce;
}

.fielderror {
color: red;
font-weight: bold;
}
Loading