# -*- coding: utf-8 -*-

import os

from poobrains import app

from . import base
from . import plot
from . import geo

SVG = base.SVG

Dataset = plot.Dataset
Datapoint = plot.Datapoint

GeoData = geo.GeoData

@app.before_first_request
def register_svg_raw():
    for cls in set(SVG.class_children()):
        rule = os.path.join("/svg/", cls.__name__.lower(), '<handle>', 'raw')
        app.site.add_view(cls, rule, mode='raw')
