os.path.join(BASE_DIR, "directory", "subDirectory")
If you change this within your documentation it might help users who are
having problems configuring django with various paths in their
applications while also understanding the functionality of os.path better.
--
Ticket URL: <https://code.djangoproject.com/ticket/25398>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> It has come to my attention while using the django documentation that
> several examples and directions specify the use of paths or os.path.join
> use the default BASE_DIR and a path written like
> "directory/subDirectory". I think this confuses a number of people who
> develop on windows platforms because it is actually more ideal to use
> os.path.join like this:
>
> os.path.join(BASE_DIR, "directory", "subDirectory")
>
> If you change this within your documentation it might help users who are
> having problems configuring django with various paths in their
> applications while also understanding the functionality of os.path
> better.
New description:
It has come to my attention while using the django documentation that
several examples and directions specify the use of paths or os.path.join
use the default BASE_DIR and a path written like "directory/subDirectory".
I think this confuses a number of people who develop on windows platforms
because it is actually more ideal to use os.path.join like this:
{{{
os.path.join(BASE_DIR, "directory", "subDirectory")
}}}
If you change this within your documentation it might help users who are
having problems configuring django with various paths in their
applications while also understanding the functionality of os.path better.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/25398#comment:1>
Comment (by MoritzS):
I only found one occurrence
[https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/#gdal-
interface here]. Are there some more you saw that I missed?
--
Ticket URL: <https://code.djangoproject.com/ticket/25398#comment:2>
* type: Uncategorized => Cleanup/optimization
* easy: 0 => 1
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/25398#comment:3>
* status: new => assigned
* owner: nobody => dudepare
--
Ticket URL: <https://code.djangoproject.com/ticket/25398#comment:4>
Comment (by dudepare):
Created a PR 5387 in Github for this.
--
Ticket URL: <https://code.djangoproject.com/ticket/25398#comment:5>
* status: assigned => closed
* resolution: => fixed
--
Ticket URL: <https://code.djangoproject.com/ticket/25398#comment:6>
* status: closed => new
* has_patch: 0 => 1
* resolution: fixed =>
Comment:
Please do not close the ticket as fixed before the patch is committed.
--
Ticket URL: <https://code.djangoproject.com/ticket/25398#comment:7>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"d2ef521a53e765585cb31a053e4b0158b5faefe6" d2ef521a]:
{{{
#!CommitTicketReference repository=""
revision="d2ef521a53e765585cb31a053e4b0158b5faefe6"
Fixed #25398 -- Revised instances of os.path.join()
Replaced occurrences of os.path.join(BASE_DIR, 'folder/subfolder')
to os.path.join(BASE_DIR, 'folder', 'subfolder')
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25398#comment:8>
Comment (by Claude Paroz <claude@…>):
In [changeset:"0633d2285e26d844104f944b95c4fca3e5137651" 0633d228]:
{{{
#!CommitTicketReference repository=""
revision="0633d2285e26d844104f944b95c4fca3e5137651"
[1.9.x] Fixed #25398 -- Revised instances of os.path.join()
Replaced occurrences of os.path.join(BASE_DIR, 'folder/subfolder')
to os.path.join(BASE_DIR, 'folder', 'subfolder')
Backport of d2ef521a53 from master.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25398#comment:9>
Comment (by Claude Paroz <claude@…>):
In [changeset:"29c9a7d22096bd9203b956d3ac6a7876009c2090" 29c9a7d]:
{{{
#!CommitTicketReference repository=""
revision="29c9a7d22096bd9203b956d3ac6a7876009c2090"
[1.8.x] Fixed #25398 -- Revised instances of os.path.join()
Replaced occurrences of os.path.join(BASE_DIR, 'folder/subfolder')
to os.path.join(BASE_DIR, 'folder', 'subfolder')
Backport of d2ef521a53 from master.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25398#comment:10>