

@app.errorhandler(404)
def page_not_found(e):
    domain = request.host.split(':')[0]
    site_nickname = app.config['SITE_CONFIGURATION'].get(media_url, None)
    if (site_nickname is None):
        site_nickname = domain
    template_directory = os.path.join(app.root_path, 'templates/', site_nickname)
    app.jinja_loader = FileSystemLoader(template_directory)
    media_url = ('/media/%s/' % site_nickname)
    return (render_template('404.html', **{
        'MEDIA_URL': media_url,
        'url': reverse_url(site_nickname),
        'debug': app.config.get('DEBUG', False),
    }), 404)

dataset/ETHPy150Open stochastic-technologies/static-appengine-hoster/application/__init__.py page_not_found/VarMisuse@43/54 `domain`->`media_url`