diff --git a/fastapi_template/template/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/piccolo_conf.py b/fastapi_template/template/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/piccolo_conf.py index 0383085982d836db32a2ea8f5d4b6bad6f58b883..c87fe77621482848c823c4d0482b5951e962e280 100644 --- a/fastapi_template/template/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/piccolo_conf.py +++ b/fastapi_template/template/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/piccolo_conf.py @@ -1,6 +1,6 @@ from piccolo.conf.apps import AppRegistry -{{cookiecutter.project_name}}.settings +from {{cookiecutter.project_name}}.settings import settings {%- if cookiecutter.db_info.name == "postgresql" %} from piccolo.engine.postgres import PostgresEngine @@ -19,6 +19,14 @@ DB = SQLiteEngine(path=settings.db_file) # A list of paths to piccolo apps # e.g. ['sample_project.db_piccolo.dao.piccolo_app'] +{%- if cookiecutter.add_dummy == True %} APP_REGISTRY = AppRegistry( apps=['{{cookiecutter.project_name}}.db_piccolo.dao.piccolo_app'] ) + +{%- else %} + +APP_REGISTRY = AppRegistry( + apps=[] +) +{%- endif %}