Hi all, Thanks for the many comments about the QuickWiki tutorial. I've updated it with the following changes:
* SQLAlchemy SessionContext rather than threadlocal * Discussion on natural vs surrogate primary keys * Facility to turn on echoing of the SQL statements * New dburi including username and password * Comment about putting HTML generation in the model and its relation to the MVC architecture All the changes are highlighted here: http://pylonshq.com/project/pylonshq/changeset/1421 The new version of the tutorial is here: http://pylonshq.com/project/pylonshq/browser/Pylons/trunk/docs/quick_wiki.txt?rev=1421 You can download the new code here: http://python.org/pypi/QuickWiki/0.1.2 http://pylonshq.com/project/pylonshq/browser/sandbox/examples/0.1.2/QuickWiki?rev=1421 I deliberately haven't added SQLAlchemy support directly into Pylons itself because I've found it useful to create the metadata object separately from the rest of the SessionContext code and couldn't do this if support was all in pylons.database like the TG folks do, hence the lib/database.py file in the tutorial which does a similar thing. Also I've gone for the SessionContext approach rather than explicit sessions because I think this is actually quite handy for a "real" SQLAlchemy setup. The new websetup.py uses normal explicit sessions for anyone wanting an example of how they work. I hope the two decisions above seem sensible. Since lots of people use this tutorial as a basis for there own use of SQLAlchemy in Pylons I'm keen to make sure this really is the best solution so if anyone can spot any problems with the approach I've taken in the new version I'd be grateful if they could let me know before we release Pylons 0.9.3. Thanks again to all who commented and I'm glad so many of you find the tutorial useful. Cheers, James --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss -~----------~----~----~----~------~----~------~--~---
