Skip to content

Commit

Permalink
use CharField for regex validation to remove length limit
Browse files Browse the repository at this point in the history
this overcomes the problem where the regex length is bigger than the field max_length you are trying to filter
  • Loading branch information
manelclos committed Oct 25, 2019
1 parent 50efe5a commit c390306
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions url_filter/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
'day': forms.IntegerField(min_value=1, max_value=31),
'month': forms.IntegerField(),
'year': forms.IntegerField(min_value=0, max_value=9999),
'regex': forms.CharField(),
'iregex': forms.CharField(),
}

LOOKUP_CALLABLE_FROM_METHOD_REGEX = re.compile(
Expand Down

0 comments on commit c390306

Please sign in to comment.