On Dec 10, 2007 10:12 PM, A. K. <[EMAIL PROTECTED]> wrote:
>
> Hello there,
>
> I am trying to follow the this link: http://wiki.pylonshq.com/display/
> pylonscookbook/Making+a+Pylons+Blog to be able to write a basic blog
> application. I installed the following:
>
> easy_install Pylons
> easy_install SQLAlchemy
> easy_install SAContext
> easy_install pysqlite
>
> made all the changes as asked in the tutorial but I am getting the
> following error. Can somebody please take a look what I am missing? I
> surmise, something very basic but not able to debug and I am a
> complete newbie :(
>
> File '/home/bagera/pylons/myblog/myblog/controllers/toolkit.py', line
> 32 in blog_add_process
>    newblog_q.session.flush()
> AttributeError: 'Blog' object has no attribute 'session'

That should be model.sac.session.flush().  There's another flush line
below that also has to be changed the same way.

That tutorial is way out of date.  The update linked in the last
comment is better:
http://wiki.pylonshq.com/display/~gardsted/Making+a+Pylons+Blog+revisited
OK, I'll get on revising the tutorial.  The comments at the end of the
update look correct.  The only thing is, you don't need
"session.flush()" anywhere because autoflush=True in the sessionmaker
line.

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to