From ab91d92af32aed77469fafbb581feb07239b7a60 Mon Sep 17 00:00:00 2001
From: Jan Dittberner The pyalchemybiz/public/ directory is searched for static files
- before your controllers are run. Remove this file (pyalchemybiz/public/index.html)
- and edit the routes in pyalchemybiz/config/routing.py to point the
- root path to a 'hello' controller we'll create below:
- Hallo
\n\n\n')
- # SOURCE LINE 6
- for customer in c.customers:
- # SOURCE LINE 7
- __M_writer(u'
\n')
- return ''
- finally:
- context.caller_stack._pop_frame()
-
-
diff --git a/development.ini b/development.ini
index 4e8ce6a..acf16ee 100644
--- a/development.ini
+++ b/development.ini
@@ -38,6 +38,7 @@ beaker.session.secret = somesecret
# invalidate the URI when specifying a SQLite db via path name
sqlalchemy.default.url = sqlite:///%(here)s/pyalchemybiz.db
sqlalchemy.default.echo = true
+sqlalchemy.convert_unicode = true
# Logging configuration
diff --git a/pyalchemybiz.egg-info/PKG-INFO b/pyalchemybiz.egg-info/PKG-INFO
index ad177e1..957496c 100644
--- a/pyalchemybiz.egg-info/PKG-INFO
+++ b/pyalchemybiz.egg-info/PKG-INFO
@@ -1,10 +1,10 @@
Metadata-Version: 1.0
Name: pyalchemybiz
-Version: 0.0.0dev
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: UNKNOWN
-Author-email: UNKNOWN
+Version: 0.1dev-r5
+Summary: python based small business suite.
+Home-page: http://www.dittberner.info/projects/pyalchemybiz
+Author: Jan Dittberner
+Author-email: jan@dittberner.info
License: UNKNOWN
Description: UNKNOWN
Platform: UNKNOWN
diff --git a/pyalchemybiz.egg-info/SOURCES.txt b/pyalchemybiz.egg-info/SOURCES.txt
index 6be95e1..fd8780f 100644
--- a/pyalchemybiz.egg-info/SOURCES.txt
+++ b/pyalchemybiz.egg-info/SOURCES.txt
@@ -1,7 +1,12 @@
MANIFEST.in
README.txt
+development.ini
setup.cfg
setup.py
+test.ini
+data/templates/base.mako.py
+data/templates/customer.mako.py
+docs/index.txt
pyalchemybiz/__init__.py
pyalchemybiz/websetup.py
pyalchemybiz.egg-info/PKG-INFO
@@ -9,6 +14,7 @@ pyalchemybiz.egg-info/SOURCES.txt
pyalchemybiz.egg-info/dependency_links.txt
pyalchemybiz.egg-info/entry_points.txt
pyalchemybiz.egg-info/paste_deploy_config.ini_tmpl
+pyalchemybiz.egg-info/paster_plugins.txt
pyalchemybiz.egg-info/requires.txt
pyalchemybiz.egg-info/top_level.txt
pyalchemybiz/config/__init__.py
@@ -16,6 +22,7 @@ pyalchemybiz/config/environment.py
pyalchemybiz/config/middleware.py
pyalchemybiz/config/routing.py
pyalchemybiz/controllers/__init__.py
+pyalchemybiz/controllers/customer.py
pyalchemybiz/controllers/error.py
pyalchemybiz/controllers/template.py
pyalchemybiz/lib/__init__.py
@@ -23,7 +30,12 @@ pyalchemybiz/lib/app_globals.py
pyalchemybiz/lib/base.py
pyalchemybiz/lib/helpers.py
pyalchemybiz/model/__init__.py
+pyalchemybiz/model/customer.py
+pyalchemybiz/model/meta.py
pyalchemybiz/public/index.html
+pyalchemybiz/templates/base.mako
+pyalchemybiz/templates/customer.mako
pyalchemybiz/tests/__init__.py
pyalchemybiz/tests/test_models.py
-pyalchemybiz/tests/functional/__init__.py
\ No newline at end of file
+pyalchemybiz/tests/functional/__init__.py
+pyalchemybiz/tests/functional/test_customer.py
\ No newline at end of file
diff --git a/pyalchemybiz.egg-info/requires.txt b/pyalchemybiz.egg-info/requires.txt
index fe9f093..2994bc9 100644
--- a/pyalchemybiz.egg-info/requires.txt
+++ b/pyalchemybiz.egg-info/requires.txt
@@ -1 +1,3 @@
-Pylons>=0.9.6.2
\ No newline at end of file
+Pylons>=0.9.6.2
+SQLAlchemy>=0.4.7
+sqlalchemy-migrate>=0.4.5
\ No newline at end of file
diff --git a/pyalchemybiz/config/routing.py b/pyalchemybiz/config/routing.py
index af711a9..1d42332 100644
--- a/pyalchemybiz/config/routing.py
+++ b/pyalchemybiz/config/routing.py
@@ -17,7 +17,7 @@ def make_map():
map.connect('error/:action/:id', controller='error')
# CUSTOM ROUTES HERE
-
+ map.connect('', controller='index', action='index')
map.connect(':controller/:action/:id')
map.connect('*url', controller='template', action='view')
diff --git a/pyalchemybiz/controllers/index.py b/pyalchemybiz/controllers/index.py
new file mode 100644
index 0000000..7d63df0
--- /dev/null
+++ b/pyalchemybiz/controllers/index.py
@@ -0,0 +1,13 @@
+import logging
+
+from pyalchemybiz.lib.base import *
+
+log = logging.getLogger(__name__)
+
+class IndexController(BaseController):
+
+ def index(self):
+ # Return a rendered template
+ # return render('/some/template.mako')
+ # or, Return a response
+ return render('/index.mako')
diff --git a/pyalchemybiz/public/index.html b/pyalchemybiz/public/index.html
deleted file mode 100644
index 98183c1..0000000
--- a/pyalchemybiz/public/index.html
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
- Welcome to your Pylons Web Application
-
-Weren't expecting to see this page?
-
- map.connect('', controller='hello', action='index')
-
You're now ready to start creating your own web application. To create a 'hello' controller, - run the following command in your project's root directory: -
-pyalchemybiz$ paster controller hello -- - This generates the following the following code in pyalchemybiz/controllers/hello.py: -
-import logging
-
-from pyalchemybiz.lib.base import *
-
-log = logging.getLogger(__name__)
-
-class HelloController(BaseController):
-
- def index(self):
- # Return a rendered template
- # return render('/some/template.mako)
- # or, Return a response
- return 'Hello World'
-
-
-This controller simply prints out 'Hello World' to the browser. Pylons' default routes - automatically set up this controller to respond at the /hello URL. - With the additional route described above, this controller will also respond at the - root path. -
- -To call a template and do something a little more complex, this following example - shows how to print out some request information from a - Mako template. -
-Create a serverinfo.mako file in your project's pyalchemybiz/templates/ - directory with the following contents: -
-
-<h2>
-Server info for ${request.host}
-</h2>
-
-<p>
-The URL you called: ${h.url_for()}
-</p>
-
-<p>
-The name you set: ${c.name}
-</p>
-
-<p>The WSGI environ:<br />
-<pre>${c.pretty_environ}</pre>
-</p>
-
-
-Then add the following to your 'hello' controller class:
-
- def serverinfo(self):
- import cgi
- import pprint
- c.pretty_environ = cgi.escape(pprint.pformat(request.environ))
- c.name = 'The Black Knight'
- return render('/serverinfo.mako')
-
-
-You can now view the page at: /hello/serverinfo
-
-
-
diff --git a/pyalchemybiz/templates/base.mako b/pyalchemybiz/templates/base.mako
index ed0c538..f9b2739 100644
--- a/pyalchemybiz/templates/base.mako
+++ b/pyalchemybiz/templates/base.mako
@@ -13,7 +13,7 @@