[Django] #27163: Unable to specify multiple pythonpath in django-admin

2 views
Skip to first unread message

Django

unread,
Aug 31, 2016, 6:43:28 PM8/31/16
to django-...@googlegroups.com
#27163: Unable to specify multiple pythonpath in django-admin
--------------------------------------------+--------------------
Reporter: AlJohri | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Management commands) | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------------+--------------------
I am unable to specify multiple pythonpaths django-admin. This can either
be colon separated paths or specifying the pythonpath parameter multiple
times.

please see this pull request for colon separated paths:
https://github.com/django/django/pull/7189

--
Ticket URL: <https://code.djangoproject.com/ticket/27163>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 31, 2016, 7:26:47 PM8/31/16
to django-...@googlegroups.com
#27163: Unable to specify multiple pythonpath in django-admin
-------------------------------------+-------------------------------------

Reporter: AlJohri | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Management | Version: 1.10
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

I don't understand why the `--pythonpath` option was added in the first
place (#357). Is there some reason `PYTHONPATH=$PYTHONPATH:...` doesn't
work? Is it just more verbose? Regarding your use case, I'd like to
encourage best practices and that doesn't really seem like a pattern to
encourage.

--
Ticket URL: <https://code.djangoproject.com/ticket/27163#comment:1>

Django

unread,
Aug 31, 2016, 11:46:09 PM8/31/16
to django-...@googlegroups.com
#27163: Unable to specify multiple pythonpath in django-admin
-------------------------------------+-------------------------------------

Reporter: AlJohri | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Management | Version: 1.10
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by AlJohri):

Yeah, that makes sense.

It was a pretty weird reason to need the parameter. I was sourcing a bash
script that set my `PYTHONPATH` and other environment variables when
developing locally. I tried doing the same thing when moving to docker via
`docker-compose run myapp source myscript && django-admin dbshell
--settings=myapp.settings` but apparently you can't do that. So my next
option was `docker-compose run myapp django-admin dbshell
--settings=myapp.settings --pythonpath="lib:admin"`. After submitting that
PR, I realized I could just set `PYTHONPATH` as an environment variable in
docker-compose like a normal person and that solved my issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/27163#comment:2>

Django

unread,
Aug 31, 2016, 11:48:47 PM8/31/16
to django-...@googlegroups.com
#27163: Unable to specify multiple pythonpath in django-admin
-------------------------------------+-------------------------------------
Reporter: AlJohri | Owner: nobody
Type: Uncategorized | Status: closed

Component: Core (Management | Version: 1.10
commands) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by AlJohri):

* status: new => closed
* resolution: => wontfix


--
Ticket URL: <https://code.djangoproject.com/ticket/27163#comment:3>

Reply all
Reply to author
Forward
0 new messages