Re: I'm trying to make proper urls, but I seem to be failing at it.

2014-03-12 Thread David Toomey
Yes, that certainly did help. Can't believe I didn't see this and it still flew over my head when others pointed it out. Looks a bit hacky, but this is the result I came up with (for future person's reference): (GET "/:profile-page" [profile-page] (if (= (.indexOf profile-page " ") -

Re: I'm trying to make proper urls, but I seem to be failing at it.

2014-03-10 Thread David Toomey
Fair enough. So if I want pretty urls, I have to have an extra column in my database then. This is one compromise, but I was hoping for something a little more programmatic. As a counter to G+, StackOverflow alters the name to lower-case and add a '-', so that M User becomes www./m-user.

Re: I'm trying to make proper urls, but I seem to be failing at it.

2014-03-10 Thread David Toomey
You should be able to write: (GET "/:profile-page" [profile-page] ...) Compojure (via Clout) automatically decodes parameters in the URL, so there shouldn't be any need to decode the data any further. Heh, I would have thought something was baked in, but I still get urls with nothing filli

Re: I'm trying to make proper urls, but I seem to be failing at it.

2014-03-10 Thread David Toomey
Thanks for the repiles -- and sorry for the delayed reply. I guess I'm doing something obnoxiously stupid. The code I'm working with looks like this: (GET "/:profile-page" [profile-page] . ;;; check if user is in database, if so, show the profile page: )) I've tried several

I'm trying to make proper urls, but I seem to be failing at it.

2014-02-24 Thread David Toomey
I'm building a site and I would like to allow users to create and account, and I would like them to have an option to use whitespaces in their handle. Apparently I am doing something way wrong here, so it is possible that I messed up something somewhere else. When I create a user, for example

Re: Clojure Login form error: java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

2013-05-02 Thread David Toomey
On May 2, 7:59 am, "John D. Hume" wrote: > I've never used noir and have barely used 4clojure, but both of them > apparently do hidden global things that make it hard to know the context in > which your code is running. Your app needs to be wrapped in noir's > `wrap-noir-session` middleware in m

Re: Clojure Login form error: java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

2013-05-02 Thread David Toomey
On May 2, 5:21 am, "John D. Hume" wrote: > On May 2, 2013 2:04 AM, "David Toomey" wrote: > > > Is there anything > > I could show that could reveal the problem? > > Yes, you should have shown the stack trace of the exception (or at least > the

Re: Clojure Login form error: java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

2013-05-02 Thread David Toomey
I committed the codebase to github. I'm open-sourcing the whole project anyways, so here is what I have thus far. Since I'm stuck at the login, the conversion stops there, so this isn't the complete codebase and basically still a skeleton: https://github.com/dt1/SoloResume -- -- You received th

Re: Clojure Login form error: java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

2013-05-02 Thread David Toomey
Is this serious? No one knows how to create a login form in Compojure? I'm seriously confused. I can create accounts, but I can't get the login part to work. What could I possibly be doing wrong? Is there anything in my code that indicates something wrong? Is there anything I could show that could

Re: Clojure Login form error: java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

2013-04-30 Thread David Toomey
To clarify, I was suspecting that I did something wrong in the (POST) route. I tried using (:syms) as well as (:strs). I'm really stuck on what is happening here. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: Clojure Login form error: java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

2013-04-30 Thread David Toomey
On Tuesday, April 30, 2013 6:25:11 AM UTC-7, Tassilo Horn wrote: > > David Toomey > writes: > > Hi David, > > > The error, as mentioned in the title: java.lang.ClassCastException: > > clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom > > In whi

Lib-Noir session error: java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

2013-04-30 Thread David Toomey
Hello, I am trying to get a login form to work in Compojure. I had originally written this app in Noir, but now I'm trying to move it off of Noir. I am now using Lib-Noir and the (noir.session) namespace doesn't seem to be working the same way as Noir. I'm now confused. The error, as mentioned

Clojure Login form error: java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

2013-04-30 Thread David Toomey
Hello, I am trying to get a login form to work in Compojure. I had originally written this app in Noir, but now I'm trying to move it off of Noir. I am now using Lib-Noir and the (noir.session) namespace doesn't seem to be working the same way as Noir. I'm now confused. The error, as mentioned