I've created a method that received a request with parameters as well as 2 additional parameters in the url the url looks like this:
url(r'^courseid=(?P<course_id>\d+)/user_id=(?P<user_id>\d+)/$', views.user_data_on_course, name='userDataOnCourse'),
the function looks like this
def user_data_on_course(request, course_id, user_id):
if request.method == 'POST':
<Extract the data and save to DB>
else if request.method == 'GET':
<Return the data>
when I add the else if request.method == 'GET':
I get error 500 on every method that is being called, and the DEBUG info is Exception Value: invalid syntax (views.py, line 308)
which is the line of the else if
what am I doing wrong?