Git Product home page Git Product logo

Comments (9)

dwfinley avatar dwfinley commented on August 26, 2024

I'm trying to deploy an app to heroku for the first time following the tutorial by Corey Shaeffer. After allowing the correct host, I tried heroku open again in the command line and got an error message saying: " TemplateDoesNotExist at /
blog/home.html, blog/post_list.html "

However those templates do exist and worked in development. No idea what is going on, super new to this. Does anyone know what could be up?

from slackin.

ripulpatel avatar ripulpatel commented on August 26, 2024

@dwfinley , did it work for you?
I just tried and seeing below error in Heroku web logs:

2019-04-18T20:44:53.917773+00:00 app[web.1]: at emitNone (events.js:86:13)
2019-04-18T20:44:53.917774+00:00 app[web.1]: at TLSSocket.emit (events.js:185:7)
2019-04-18T20:44:53.917776+00:00 app[web.1]: at TLSSocket._finishInit (_tls_wrap.js:610:8)
2019-04-18T20:44:53.917777+00:00 app[web.1]: at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)
2019-04-18T20:44:53.967693+00:00 heroku[web.1]: Process exited with status 1

from slackin.

wilsonad32 avatar wilsonad32 commented on August 26, 2024

hi, i am facing the similar issue as mentioned above. May i know what is the solution for that?

from slackin.

dwfinley avatar dwfinley commented on August 26, 2024

from slackin.

wilsonad32 avatar wilsonad32 commented on August 26, 2024

I finally figure it out. In my case, the letter 't' for 'templates' need to be capitalised.
'DIRS': [os.path.join(BASE_DIR, 'Templates')],

from slackin.

dwfinley avatar dwfinley commented on August 26, 2024

from slackin.

rbed23 avatar rbed23 commented on August 26, 2024

edit: if you are using Flask...

app = Flask(__name__, template_folder='working-templates-folder/')

add the template_folder argument above to have the app look into your 'blog' folder...

app = Flask(__name__, template_folder='blog/'

I was getting the same "jinja2.exceptions.TemplateNotFound: index.html" error raised from the flask/templating.py module, before I found this fix...

also, you can set the "EXPLAIN_TEMPLATE_LOADING" variable in both my development and staging configs (in config.py file) to 'True' like this:

class StagingConfig(Config):
    DEVELOPMENT = True
    DEBUG = True
    ENV = "Staging"
    EXPLAIN_TEMPLATE_LOADING = True

class DevelopmentConfig(Config):
    DEVELOPMENT = True
    DEBUG = True
    ENV = "Development"
    EXPLAIN_TEMPLATE_LOADING = True

to see more debug output of where the app is looking for your template files...

from slackin.

PKALXI avatar PKALXI commented on August 26, 2024

so is there a solution?

from slackin.

SATHYA-RUNTIME avatar SATHYA-RUNTIME commented on August 26, 2024

https://checkonce.herokuapp.com/

give me a solution for template dose not exist

from slackin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.