'fly launch' detecting two Settings files

I’m trying to deploy a simple Django app (GitHub - lar-mo/rtah_shortener) following the guide: Getting Started · Fly Docs

Unfortunately, I’m getting stuck at the “configure and launch the app” (“$ fly launch”) step.

It’s complaining:

" Multiple ‘settings.py’ files were found in your Django application:

[rtah_utils/settings.py, .venv/lib/python3.12/site-packages/captcha/conf/settings.py]

It’s not recommended to have multiple ‘settings.py’ files.

Instead, you can have a ‘settings/’ folder with the settings files according to the different environments (e.g., local.py, staging.py, production.py).

In this case, you can specify which settings file to use when running the Django application by setting the ‘DJANGO_SETTINGS_MODULE’ environment variable to the corresponding settings file."

One SETTINGS.PY is the for my Django app and another is for a PIP package: django-simple-captcha

The suggested workaround for multiple SETTINGS.py files is not applicable here.

Is there a way to explicitly specify the correct SETTINGS file or ignore the “captcha” one?

Thanks.

@larmo thanks for reporting it! This was fixed and released yesterday: Release v0.2.5 · superfly/flyctl · GitHub :slightly_smiling_face:

Can you try it again with flyctl v0.2.5 or later? (flyctl version upgrade)

1 Like

That fixed the issue. Thanks for your reply and patch of ‘flyctl’ in v0.2.5!

Best,
larmo

1 Like