git.ithinksw.org
/
philo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Updated models, created separate files called utils and validators.
[philo.git]
/
contrib
/
penfield
/
validators.py
diff --git a/contrib/penfield/validators.py
b/contrib/penfield/validators.py
new file mode 100644
(file)
index 0000000..
48eae06
--- /dev/null
+++ b/
contrib/penfield/validators.py
@@ -0,0
+1,6
@@
+from django.core.exceptions import ValidationError
+
+
+def validate_pagination_count(x):
+ if x not in range(1, 10000):
+ raise ValidationError('Please enter an integer between 1 and 9999.')
\ No newline at end of file