Hi, I've just started learning Pylons. (used to use Django) As the first tutorial, I did "Making a Pylons Blog" tutorial. http://wiki.pylonshq.com/display/pylonscookbook/Making+a+Pylons+Blog
I enjoyed going through the tutorial over alll, but there're some obstacles which I need some time to go over. Let me share my experience. Disclaimer: I'm completely new to pylons so my suggestions below probablly contains lots of errors and misunderstanding. Please let me know if I'm wrong. * Step 1.3 - Models and Data ** Typo? "Put this in the "[app:man]" section." should be "Put this in the "[app:main]" section." ** Unicode "Because databases cannot store Unicode directly, the "sqlalchemy.convert_unicode" option makes SQLAlchemy convert String columns to UTF-8 on write, and back to Unicode on read. Otherwise you'd get "str" strings containing whatever's in the database verbatim. (This is preferred over MySQL's "?use_unicode=1" option because it's database neutral.)" I think the word "Unicode" here means probably UTF-16, Python's internal encoding. The sentence "databases cannot store Unicode directly..." made me wornder, thinking "What? RDBMSs I know all support Unicode!" IMHO, this part could be clearer by explicitly distinguishing python's unicode from UTF-8. ** Where to put engine_from_config "And append this to the load_environment function:" should be "And append this to *the end* of the load_environment function:" (After "# CONFIGURATION OPTIONS HERE" might be better) First I put these line to the top of the load_environment function and got KeyError: 'pop(): dictionary is empty' error. this problem is also pointed out at http://wiki.pylonshq.com/display/pylonsdocs/QuickWiki+Tutorial?focusedCommentId=10518835#comment-10518835 ** Where's init_app? "Why is some code in init_app and other code isn't?" init_app is not mentioned until now. (I first thought this is a typo of init_model) "Why is some code in init_app in config/environment.py and other code isn't?" would be nice. ** What is websetup.py? I could not understand what websetup.py is for. Please add some explanation on this. * Step 4.2 - Adding Content ** Path to site.html ~/MyBlog/myblog/templates/toolkit/index.html ~/MyBlog/myblog/templates/toolkit/add.html The path to the site.html written in above two file should be '/blog/ site.html', not '/site.html' That's all. Any comments would appreciated. Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
