Poetry: How to use Poetry for a Django project

Created on 24 Apr 2019  ยท  4Comments  ยท  Source: python-poetry/poetry

  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] I have searched the documentation and believe that my question is not covered.

Question

I can't figure out how to use Poetry for a Django project with custom (not third party) apps. Suppose we have a typical Django project structure:

[projectname]/
โ”œโ”€โ”€ [projectname]/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ settings.py
โ”‚   โ”œโ”€โ”€ urls.py
โ”‚   โ””โ”€โ”€ wsgi.py
โ”œโ”€โ”€ [app-1]/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ models.py
โ”‚   โ”œโ”€โ”€ views.py
โ”‚   โ”œโ”€โ”€ urls.py
โ”œโ”€โ”€ [app-2]/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ models.py
โ”‚   โ”œโ”€โ”€ views.py
โ”‚   โ”œโ”€โ”€ urls.py
โ”œโ”€โ”€ [app-n]/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ models.py
โ”‚   โ”œโ”€โ”€ views.py
โ”‚   โ”œโ”€โ”€ urls.py
โ””โ”€โ”€ manage.py

What should I do to use poetry to manage project dependencies?
Or maybe poetry is designed to manage single app, but not a whole project?

Thanks,
Fabio

stale

Most helpful comment

I usually run poetry init next to manage.py.

All 4 comments

You can try to add a pyproject.toml next to the setup.py.

https://poetry.eustace.io/docs/pyproject/

I usually run poetry init next to manage.py.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

probablykasper picture probablykasper  ยท  3Comments

nikaro picture nikaro  ยท  3Comments

jbarlow83 picture jbarlow83  ยท  3Comments

thmo picture thmo  ยท  3Comments

ulope picture ulope  ยท  3Comments