hi,
> Sean, is this along the lines of what you were looking for?
>
> [1]http://webpy.org/cookbook/testing_with_paste_and_nose
> [2]http://webpy.org/cookbook/restful_doctesting_using_request
Yes, this is nice. I know my question was pretty vague, but I was
just trying to get an idea of some dif
I kind of wanted this to serve as an intermediate-advanced introduction to
web.py incorporating features and edge cases that we encounter in real-world
usage but might not be immediately obvious by reading the basic tutorial [1]
or by browsing the disparate cookbook recipes. It always bugged me tha
little bug: doesn't handles "short" names:
for example, "Test Database" will work, but "Test Me" won't (one
generates "t-database" slug and the other one "t-me", maybe too short)
On Sat, Sep 19, 2009 at 11:36 PM, Angelo Gladding wrote:
> Oh and I'll leave http://angelo.gladding.name:1/mathem
Oh and I'll leave http://angelo.gladding.name:1/mathematicians up for as
long as need be.
On Sat, Sep 19, 2009 at 2:33 PM, Angelo Gladding wrote:
> Testing is hard. I think that the comments so far are representative of
> lack of specificity in your question. I thought about it last night and
Testing is hard. I think that the comments so far are representative of lack
of specificity in your question. I thought about it last night and put
together a draft of a RESTful approach to testing that could test both
webapp and database at the same time. I believe paste and nose [1] can do
someth
import platform
if platfom.node() == "YOUR_PRODUCTION_BOX":
db.connect(PRODUCTION_SETTINGS)
else:
db.connect(TEST_SETTINGS)
I like this method because it allows me to toggle other things as well, such
as debug.
On Fri, Sep 18, 2009 at 5:59 PM, Sean wrote:
>
> Hi,
>
> I'm trying to tes
I use json file to store all environment settings.
example of config.json:
{"db_echo": false, "database": "sqlite:///database.db"}
Then I load it like this:
import web, simplejson
config = web.storage(simplejson.load(file('config.json', 'r')))
db = web.database(**parse_rfc1738_args(config.data
09/19/2009 12:59 AM, Sean:
> hardcode the database connection in something like a config.py file.
Uh?
http://webpy.org/tutorial2.en
"""
Above your web.run line add:
web.config.db_parameters = dict(dbn='postgres', user='username',
pw='password', db='dbname')
"""
What is the problem?
-