Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest url strip spaces #823

Merged
merged 5 commits into from Mar 20, 2017
Merged

Latest url strip spaces #823

merged 5 commits into from Mar 20, 2017

Conversation

noirbizarre
Copy link
Contributor

This pull request fixes bad URL redirection handling and:

  • ensure URL are properly stripped at both form and model level
  • resource URL is required and should be an URL

@davidbgk
Copy link
Member

Why do we have to check both at the form and at the model level? Legacy? What about a migration?

@noirbizarre
Copy link
Contributor Author

Because this is 2 separate components that are not always used together:

  • when model is directly used, we need the mongoengine.URLField to strip
  • when a Form (not a ModelForm) is used without a model, we need the form.field.URLField to strip


class URLField(MEURLField):
'''
An URL field that automatically strip extra spaces
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stripS

@noirbizarre noirbizarre merged commit fcc8e4d into opendatateam:dev Mar 20, 2017
@noirbizarre noirbizarre deleted the latest-url-strip-spaces branch March 20, 2017 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants