Howto do Sessions when Migrating Noir to Compojure

276 views
Skip to first unread message

Timothy Washington

unread,
Feb 12, 2013, 1:36:47 AM2/12/13
to comp...@googlegroups.com
Hi there, 

I had a working Webnoir set of handlers, using Noir's session facilities. I'm in the throws of migrating my code to Compojure, with lib-noir. Using lib-noir, I'm seeing errors when trying to session/put! or session/get! to the session. 

You can see my attempts here on refheap. Again, even after using wrap-noir-session, calling session/put! or session/get! , gives me an error, basically saying that the session has not been bound. I have an SO post here, that describes the problem in detail. 


Thanks for any insights

Tim Washington 

Today a young man on acid realized that all matter is merely energy condensed to a slow vibration, that we are all one consciousness experiencing itself subjectively, there is no such thing as death, life is only a dream, and we are the imagination of ourselves. Here's Tom with the Weather.” ― Bill Hicks


James Reeves

unread,
Feb 12, 2013, 2:51:06 AM2/12/13
to Compojure
Try swapping around handler/site and wrap-noir-session*. Because handler/site applies the wrap-session middleware, and wrap-noir-session* depends on that according to the documentation, handler/site should be applied before wrap-noir-session.

- James


--
You received this message because you are subscribed to the Google Groups "Compojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to compojure+...@googlegroups.com.
To post to this group, send email to comp...@googlegroups.com.
Visit this group at http://groups.google.com/group/compojure?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Timothy Washington

unread,
Feb 12, 2013, 4:24:21 PM2/12/13
to comp...@googlegroups.com, ja...@booleanknot.com
Ok, that worked. But now the request object doesn't seem to be coming into my handler as before. Let me try to suss this out ... 


Thanks 
Tim 

Timothy Washington

unread,
Feb 12, 2013, 10:48:06 PM2/12/13
to comp...@googlegroups.com, ja...@booleanknot.com
Sweet. I got it all stitched up. That helped. 


Thanks 
Tim 
Reply all
Reply to author
Forward
0 new messages