0

http://flask.pocoo.org/docs/quickstart/#a-minimal-application

When the instructions under "Rendering Templates" directs you to create a templates folder, where exactly do you make it? In your project directory? And how? Thanks!

Opal
  • 471
  • 1
  • 7
  • 20

1 Answers1

2

If you had read a bit further down in the link you pasted, you would have found:

Flask will look for templates in the templates folder. So if your application is a module, this folder is next to that module, if it’s a package it’s actually inside your package:

Case 1: a module:

 /application.py
 /templates
     /hello.html

Case 2: a package:

 /application
     /__init__.py
     /templates
         /hello.html

The most common is case 1 - for which you simply create a directory called templates and add your templates there. Nothing special about it.

Burhan Khalid
  • 169,990
  • 18
  • 245
  • 284