I have no problem getting it to work on my local machine but when deployed to Heroku the flask-bootstrap asset won't import the base.html file which is located in the virtual environment. And I can't find any errors in the logs or the console.
Do I still need to activate the virtual environment on Heroku or should that have been taken care of already?
Here's the config.py file where I try to import bootsrap:
from flask import Flask
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
Bootstrap(app)
db = SQLAlchemy(app)
app.config['SQLALCHEMY_DATABASE_URI'] = 'URI-is-changed-on-this-question-for-privacy-reasons'
app.config['SECRET_KEY'] = 'secret-key-is-changed-on-this-website-for-privacy reasons'
app.py imports the files and activates the server
from config import app
from flask import Flask
from models import authentication, posts
from views import authentication, posts
from forms import authentication, posts
if __name__ == '__main__':
app.run()
Here's the html file that tries to extend the boostrap base.html
{% extends "bootstrap/base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% block jumbotron %}
<div class="jumbotron">
<h2>Hunter Krieger</h2>
<h3>Blogger, Web Developer, Gamer and Bibliophile
</div>
{% endblock jumbotron %}
{% block content %}
{% if post %}
{% for display in post %}
<article class="well">
<h1><a href="/{{ display.slug }}">{{ display.title }}</a></h1>
<h4>Written by {{ display.author }}</h4>
<h4>{{ display.created_at.strftime('%b %d, %Y') }}</h4>
<div class="body">
{{ display.body | truncate(1250) | safe }}
</div>
</article>
{% endfor %}
{% else %}
<p>There are no posts</p>
{% endif %}
{% endblock %}
And here's the base.html file which is located in the virtual environment on the path './venv/Lib/site-packages/flask_bootstrap/templates/bootstrap/base.html'
{% block doc -%}
<!DOCTYPE html>
<html{% block html_attribs %}{% endblock html_attribs %}>
{%- block html %}
<head>
{%- block head %}
<title>{% block title %}Welcome to hckrieger.com!{% endblock title %}</title>
{%- block metas %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%- endblock metas %}
{% block favicon %}
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
{% endblock %}
{%- block styles %}
<!-- Bootstrap -->
<link href="{{bootstrap_find_resource('css/bootstrap.css', cdn='bootstrap')}}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/stylesheet.css') }}" rel="stylesheet">
{%- endblock styles %}
{%- block fonts %}
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
{%- endblock fonts %}
{% block texteditor %}
<script src="//cdn.ckeditor.com/4.7.1/full/ckeditor.js"></script>
{%- endblock texteditor %}
{%- endblock head %}
</head>
<body{% block body_attribs %}{% endblock body_attribs %}>
{% block body -%}
{% block navbar %}
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<!--<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>-->
<a class="navbar-brand" href="{{ url_for('index') }}">hckrieger.com</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ url_for('index') }}">Home</a></li>
<li><a href="{{ url_for('about') }}">About</a></li>
<li><a href="{{ url_for('contact') }}">Contact</a></li>
</ul>
</div>--><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
{%- endblock navbar %}
{% block jumbotron %}
{% endblock jumbotron %}
{% if admin %}
<div class="container">
<section class="content col-md-12">
{% block admin_content -%}
{%- endblock admin_content %}
</section>
</div>
{% else %}
<div class="container">
<section class="content col-md-9">
{% block content -%}
{%- endblock content %}
</section>
<section class="content col-md-3">
{% include 'sidebar.html' %}
</section>
</div>
{% endif %}
{% block footer %}
<p class="center">hckrieger.com © 2017</p>
{% endblock %}
{% block scripts %}
<script src="{{bootstrap_find_resource('jquery.js', cdn='jquery')}}"></script>
<script src="{{bootstrap_find_resource('js/bootstrap.js', cdn='bootstrap')}}"></script>
{%- endblock scripts %}
{%- endblock body %}
</body>
{%- endblock html %}
</html>
{% endblock doc -%}
From seeing that code does anybody know what I could change to get flask-bootstrap to work on Heroku?