'Compile the Eden code'

def compile(self):

    self.run_model()
    from gluon.fileutils import up
    request = current.request
    os_path = os.path
    join = os_path.join
    settings = current.deployment_settings
    s3 = current.response.s3
    s3.views = views = {}
    s3.theme = theme = settings.get_theme()
    if (theme != 'default'):
        folder = request.folder
        location = settings.get_template_location()
        exists = os_path.exists
        for view in ['create.html', 'dashboard.html', 'display.html', 'iframe.html', 'list.html', 'list_filter.html', 'map.html', 'plain.html', 'popup.html', 'profile.html', 'report.html', 'summary.html', 'update.html']:
            if exists(join(folder, location, 'templates', theme, 'views', ('_%s' % view))):
                views[view] = ('../%s/templates/%s/views/_%s' % (location, theme, view))
    def apath(path='', r=None):
        '\n                                                Builds    a    path    inside    an    application    folder\n\n                                                Parameters\n                                                ----------\n                                                path:\n                                                                path    within    the    application    folder\n                                                r:\n                                                                the    global    request    object\n\n                                                '
        opath = up(r.folder)
        while (path[:3] == '../'):
            (opath, path) = (up(opath), path[3:])
        return join(opath, path).replace('\\', '/')
    folder = apath(request.application, request)
    compile_application(folder)
