Here is my code snippet.
class IndexResource(Resource):
@staticmethod
def get():
headers ={'Content-Type': 'text/html'}
return
make_response(render_template('main.html'), 200, headers)
class AddStudent(Resource):
@staticmethod
def get():
headers = {'Content-Type': 'text/html'}
return
make_response(render_template('addStudent.html'), 200, headers)
The return statements need to align vertically with the headers
line. Not sure what this code should do but this will fix the syntax error.
class IndexResource(Resource):
@staticmethod
def get():
headers ={'Content-Type': 'text/html'}
return
make_response(render_template('main.html'), 200, headers)
class AddStudent(Resource):
@staticmethod
def get():
headers = {'Content-Type': 'text/html'}
return
make_response(render_template('addStudent.html'), 200, headers)