Skip to content
This repository has been archived by the owner. It is now read-only.

Avatar gets lost when submitting registration / profile form with invalid data #47

Closed
MarkusH opened this issue Feb 5, 2014 · 3 comments
Assignees

Comments

@MarkusH
Copy link
Contributor

MarkusH commented Feb 5, 2014

No description provided.

@mgax
Copy link

mgax commented Mar 23, 2014

Looks like django-file-resubmit solves this particular problem.

@zerok
Copy link
Contributor

zerok commented Mar 23, 2014

My preferred solution here would be to have a client-side validation framework in place that simply prevents 99% of the invalid form submissions before they reach the server.

There exist a handful of bindings for libraries like Parsley that try to generate the correct markup/configuration from Django's forms but, sadly, I didn't have much luck with them. Either they clash with crispy-forms or the generated configuration still needs to be tuned to be usable.

Because of that I'd prefer a solution that allows to put the whole validation for a form into JavaScript itself. This obviously leads to code-duplication but it would make the whole process of (1) customizing the validation and (2) localizing it easier.

So the first step here would be to find JavaScript validation frameworks that don't really on additional attributes for the HTML input elements or find out if Parsley is executed late enough that we could inject the required validation rules into the DOM before it is executed.

I'll try the latter now.

@zerok
Copy link
Contributor

zerok commented Mar 23, 2014

I've started on an integration of Parsley in the EuroPython/djep/feature/parsley branch which already does most of what I want for the registration page. There are still some aspects that could be extended and I will to find some time for that in the next couple of days :-)

@zerok zerok self-assigned this Mar 23, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants