Skip to content

Instantly share code, notes, and snippets.

@pkafei
Created January 11, 2017 19:18
Show Gist options
  • Save pkafei/bb9026a0d318281c3150f422101a3f7c to your computer and use it in GitHub Desktop.
Save pkafei/bb9026a0d318281c3150f422101a3f7c to your computer and use it in GitHub Desktop.
looking for https
def clean_content(self):
data = self.cleaned_data['content']
atlantic_site = "http://thealtantic.com"
if "http" and not atlantic_site in data:
raise forms.ValidationError("Please make sure you have only https links")
return data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment