Commit 4b6df9c9 authored by Cédric Bonhomme's avatar Cédric Bonhomme

First version of the views (for the JSON/XML export).

parent 89399ecd
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import random
import datetime
from flask import jsonify, request
from refuge import app
@app.route('/', methods=['GET', 'POST'])
def index():
"""
"""
return jsonify({})
@app.errorhandler(404)
def not_found(error=None):
"""
Handles 404 errors.
"""
message = {
'status': 404,
'message': 'Not Found: ' + request.url,
}
resp = jsonify(message)
resp.status_code = 404
return resp
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment