From aff4e981d8ace5d373a6216cb1cf0db34887d446 Mon Sep 17 00:00:00 2001
From: ali <ali.sayyah2@gmail.com>
Date: Wed, 26 Jan 2022 21:05:59 +0330
Subject: [PATCH] fixed piccolo_conf.py

---
 .../{{cookiecutter.project_name}}/piccolo_conf.py      | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

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 0383085..c87fe77 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 %}
-- 
GitLab