loud-laptop-17949
12/09/2021, 12:35 AMSTATICFILES_DIRS += ( # pylint: disable=undefined-variable
os.path.join(
os.environ['VIRTUAL_ENV'],
'lib/python3.6/site-packages/django/contrib/admin/static',
),
that I need to port to pantsloud-laptop-17949
12/09/2021, 12:36 AMhundreds-father-404
12/09/2021, 12:37 AMexport
goal that will write a virtualenv
❯ ./pants export
17:37:06.81 [INFO] Completed: Building requirements.pex
17:37:07.04 [INFO] Completed: Create virtualenv
Wrote virtualenv for CPython==3.9.* to dist/export/python/virtualenv
Are you looking for something like that?loud-laptop-17949
12/09/2021, 12:41 AMloud-laptop-17949
12/09/2021, 12:41 AMloud-laptop-17949
12/09/2021, 12:41 AMhundreds-father-404
12/09/2021, 12:43 AM❯ ~/.cache/pants/named_caches/pex_root/installed_wheels/ff59bd9da4c781186fecb96e9717c458a98db032/types_PyYAML-5.4.3-py2.py3-none-any.whl/yaml-stubs/
METADATA.toml cyaml.pyi events.pyi reader.pyi serializer.pyi
__init__.pyi dumper.pyi loader.pyi representer.pyi tokens.pyi
composer.pyi emitter.pyi nodes.pyi resolver.pyi
constructor.pyi error.pyi parser.pyi scanner.pyi
loud-laptop-17949
12/09/2021, 12:43 AMhundreds-father-404
12/09/2021, 12:44 AMloud-laptop-17949
12/09/2021, 12:45 AMloud-laptop-17949
12/09/2021, 12:45 AMSTATICFILES_DIRS
which will be searched by the collectstatic
commandloud-laptop-17949
12/09/2021, 12:46 AMloud-laptop-17949
12/09/2021, 12:47 AMloud-laptop-17949
12/09/2021, 12:48 AMambitious-actor-36781
12/09/2021, 12:52 AMimport django
Path(django.__file__).parent/“contrib/admin/static”
?
ambitious-actor-36781
12/09/2021, 12:54 AMdjango.contrib.admin
to your INSTALLED_APPS ?happy-kitchen-89482
12/09/2021, 6:25 AMloud-laptop-17949
12/09/2021, 8:32 PMhappy-kitchen-89482
12/09/2021, 8:40 PMSTATICFILES_DIRS
hack pre-Pants.happy-kitchen-89482
12/09/2021, 8:40 PM./pants run path/to/manage.py -- collectstatic
?happy-kitchen-89482
12/09/2021, 8:40 PMhappy-kitchen-89482
12/09/2021, 8:42 PM./pants run
is the repo root. And for 3rdparty stuff, I think Django does some magic based on relative paths from the app's code? I'd need to refresh my memory.happy-kitchen-89482
12/09/2021, 8:56 PMdjango.contrib.admin
to have their static files under the static
directory in the apphappy-kitchen-89482
12/09/2021, 8:56 PMloud-laptop-17949
12/09/2021, 9:25 PMloud-laptop-17949
12/10/2021, 8:22 PM# We don't include AppDirectoriesFinder because we rely on gulp to collect all files.
happy-kitchen-89482
12/10/2021, 11:17 PMloud-laptop-17949
12/13/2021, 7:02 PMloud-laptop-17949
12/13/2021, 7:03 PMhappy-kitchen-89482
12/13/2021, 8:43 PMclean-city-64472
12/13/2021, 11:38 PMloud-laptop-17949
12/14/2021, 1:12 AMloud-laptop-17949
12/14/2021, 1:12 AM