Skip to content

Is it possible to ignore CSS or JS from venv when building a pex file using django? #15591

Answered by benjyw
baseplate-admin asked this question in Q&A
Discussion options

You must be logged in to vote

The copying you're referring to is the normal behavior of Django, yes? collectstatic copies/links the assets from their source location in each app your settings.py lists into a single merged directory that you can then deploy to a server.

In normal use, deleting the originals would be deleting your source files (not to mention, messing up the venv for any 3rdparty apps installed from wheels, such as the standard apps, like admin, that ship with Django). So that would definitely not be advised. Pants has no particular support for doing this, and it would be dangerous, because the venvs Pants uses are cached.

So my question is: what would be the reason to do this?

Replies: 2 comments 4 replies

Comment options

benjyw
Oct 21, 2022
Maintainer Sponsor

You must be logged in to vote
0 replies
Comment options

benjyw
Oct 21, 2022
Maintainer Sponsor

You must be logged in to vote
4 replies
@baseplate-admin
Comment options

@benjyw
Comment options

benjyw Oct 21, 2022
Maintainer Sponsor

@baseplate-admin
Comment options

@benjyw
Comment options

benjyw Oct 24, 2022
Maintainer Sponsor

Answer selected by baseplate-admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants