Replies: 3 comments 1 reply
|
Can you show a minimal example of what you are trying to achieve: project directory structure (use |
0 replies
|
Here is the standard basic Django project structure with poetry initialized. Now poetry works excellent to manage dependencies for whole project. What if I want additionally build |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I would like know more about usage of poetry with Django.
Django as whole project has its dependencies typically in a virtual environment so I think it is usual to use poetry for the whole project.
However poetry has build/publish features.
And we usually want make a single django (custom) application portable.
Is it possible build/publish single application with poetry, while poetry root (.toml+.lock) is at the main project level?
I think such something is NOT possible:
In the main .toml file to create subsections for applications we want to build separately, and start the poetry build command with optional parameter (application ie. subsection name).
So I made this attempt:
Application inside a project as it is usual. New .toml inside the application directory (project's subdirectory).
But I have had no success with this.
2nd attempt:
Later I have copied the application folder into an empty folder with same name. And inside the outer folder I can make a .toml file and I am able to build. I have no idea if the result is correct.
So probably I could move the application outside from project and install it via poetry in editable mode:
--- A directory (../myapp-with-toml/myapp/) ---
In myapp-with-toml I should then create pyproject.toml designed for the application. And build from there.
Is this a good way or there is a better approach how to build portable Django application using Poetry?
(initially I asked via issues: #3578)
All reactions