Skip to content

Blueprint template not found #66

Description

@serkandaglioglu

Thank for flask-classy. I am coming from php codeigniter and flask-classy helped me very much.

I have a problem.
i am trying to do that example http://flask.pocoo.org/docs/0.10/blueprints/#templates .

My application structure

/app
    /modules
        /module_test
            controllers.py
            /templates
                 /test
                      index.html
    /templates

/app/modules/module_test/controllers.py

test = Blueprint('test', "mest", template_folder='templates' )

class TestController(FlaskView):

    def index(self):
        return render_template( "test/index.html", **self.viewData )

TestController.register(test)

When i tried blueprint without flask-classy it worked, but when i tried with flask-classy it did not work , the error is "jinja2.exceptions.TemplateNotFound TemplateNotFound: test/index.html".
i put index.html in /app/templates/test/index.html and i tried with flask classy it worked.

i want to put template files in blueprint that "/app/modules/module_test/templates". How can i solve this problem?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions