hackerunion-archives / hackerunion.org

The code that powers the hacker union website
http://www.hackerunion.org
GNU General Public License v3.0
23 stars 18 forks source link

Validate that application essay questions have been answered #16

Open brandondiamond opened 11 years ago

brandondiamond commented 11 years ago

We can just check whether the text has changed (or something equivalent).

richardharrington commented 11 years ago

I'd be happy to. Can you point me towards the part of the code where that's dealt with? I can't seem to find it, and the button itself has no identifying id or class. (Yes, this would be the handholding you promised at the meetup. :))

mathisonian commented 11 years ago

The form validation happens in the clean method of this class https://github.com/hackerunion/website/blob/master/petri/account/forms.py#L245.

You would need to verify that the contents of the application isn't equal to the pre-popped stuff. The pre-populated string is in the application template (here: https://github.com/hackerunion/website/blob/master/templates/account/apply.jade), but should probably be moved to a string in the settings.py file or something.

richardharrington commented 11 years ago

Oops. For some reason I was thinking this was a purely front end validation issue. I have limited experience with Python and none with Django. I would still be happy to do it, but it might take me a while. If someone else wants to get to it first, by all means go ahead.

brandondiamond commented 11 years ago

Actually, I think we could definitely do this by modifying the (giant heap of) frontend code, too -- especially since the contents of the textarea is sorta tied to the frontend to begin with.

The global javascript file is: https://github.com/hackerunion/website/blob/master/static/javascripts/app.js

And the template for applying (in Jade) is: https://github.com/hackerunion/website/blob/master/templates/account/apply.jade

I'm not sure if there's any javascript tied to that form at the moment (other than the toggle to siwtch between invite and new application), but I think this validation could work well as a simple frontend check for the time being.

Hope this helps,

On Wed, Feb 13, 2013 at 2:57 PM, Richard Harrington < notifications@github.com> wrote:

Oops. For some reason I was thinking this was a purely front end validation issue. I have limited experience with Python and none with Django. I would still be happy to do it, but it might take me a while. If someone else wants to get to it first, by all means go ahead.

— Reply to this email directly or view it on GitHubhttps://github.com/hackerunion/website/issues/16#issuecomment-13514657.

Help direct the future of the NY Tech Meetup: http://www.BrandonForNYTM.org/ http://www.brandonfornytm.org/

arelenglish commented 11 years ago

What about breaking the form up into separate fields for each question? It might also be worthwhile to add a question asking where the applicant lives. I looked up a few of the applicants yesterday, and some of them had cities other than New York listed in their LinkedIn or twitter.

brandondiamond commented 11 years ago

The whole application essay component could use some love; i'd imagine each chapter wanting to set their own questions.

We could try to revamp the whole thing, but that would be a significant investment (plus the application response is stored in a single textfield).