Skip to content

Commit 8aab72f

Browse files
committed
TypeError resolved for ajax request
1 parent a65192c commit 8aab72f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

static/website/templates/new-question.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ <h4>
77
</span> Create a new question . . .
88
</h4>
99
<hr>
10-
<form role="form" action="" method="POST">{% csrf_token %}
10+
<form role="form" action="" method="POST" novalidate>{% csrf_token %}
1111
{% with WIDGET_ERROR_CLASS='field_error' %}
1212

1313
<p>

website/templatetags/count_tags.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ def get_range(value, arg=''):
2222
if n == 0 or arg == '':
2323
# if no arguments set value as limit
2424
start = 0
25-
limit = value
25+
limit = int(value)
2626
step = 1
2727
elif n == 1:
2828
start = int(args[0])
29-
limit = value
29+
limit = int(value)
3030
step = 1
3131
elif n == 2:
3232
start = int(args[0])
33-
limit = value
33+
limit = int(value)
3434
step = int(args[1])
3535
else:
3636
raise TypeError('get_range() takes maximum 2 arguments, {} given'.format(n))

0 commit comments

Comments
 (0)