[Django] #25398: Static Files Documentation

41 views
Skip to first unread message

Django

unread,
Sep 13, 2015, 12:36:40 PM9/13/15
to django-...@googlegroups.com
#25398: Static Files Documentation
-------------------------------+--------------------
Reporter: amrosado | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
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>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 13, 2015, 1:17:56 PM9/13/15
to django-...@googlegroups.com
#25398: Static Files Documentation
-------------------------------+--------------------------------------

Reporter: amrosado | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* 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>

Django

unread,
Sep 14, 2015, 7:08:37 AM9/14/15
to django-...@googlegroups.com
#25398: Static Files Documentation
-------------------------------+--------------------------------------
Reporter: amrosado | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

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

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

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>

Django

unread,
Sep 14, 2015, 8:48:21 AM9/14/15
to django-...@googlegroups.com
#25398: Use os.path.join() to construct file paths in docs instead of hardcoding
'/'
--------------------------------------+------------------------------------
Reporter: amrosado | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* type: Uncategorized => Cleanup/optimization
* easy: 0 => 1
* stage: Unreviewed => Accepted


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

Django

unread,
Oct 3, 2015, 1:28:33 AM10/3/15
to django-...@googlegroups.com
#25398: Use os.path.join() to construct file paths in docs instead of hardcoding
'/'
--------------------------------------+------------------------------------
Reporter: amrosado | Owner: dudepare
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.8

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by dudepare):

* status: new => assigned
* owner: nobody => dudepare


--
Ticket URL: <https://code.djangoproject.com/ticket/25398#comment:4>

Django

unread,
Oct 3, 2015, 2:16:39 AM10/3/15
to django-...@googlegroups.com
#25398: Use os.path.join() to construct file paths in docs instead of hardcoding
'/'
--------------------------------------+------------------------------------
Reporter: amrosado | Owner: dudepare
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.8

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by dudepare):

Created a PR 5387 in Github for this.

--
Ticket URL: <https://code.djangoproject.com/ticket/25398#comment:5>

Django

unread,
Oct 3, 2015, 2:20:00 AM10/3/15
to django-...@googlegroups.com
#25398: Use os.path.join() to construct file paths in docs instead of hardcoding
'/'
--------------------------------------+------------------------------------
Reporter: amrosado | Owner: dudepare
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.8
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by dudepare):

* status: assigned => closed
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/25398#comment:6>

Django

unread,
Oct 3, 2015, 3:03:36 AM10/3/15
to django-...@googlegroups.com
#25398: Use os.path.join() to construct file paths in docs instead of hardcoding
'/'
--------------------------------------+------------------------------------
Reporter: amrosado | Owner: dudepare
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* 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>

Django

unread,
Oct 3, 2015, 3:09:30 AM10/3/15
to django-...@googlegroups.com
#25398: Use os.path.join() to construct file paths in docs instead of hardcoding
'/'
--------------------------------------+------------------------------------
Reporter: amrosado | Owner: dudepare
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.8
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Claude Paroz <claude@…>):

* 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>

Django

unread,
Oct 3, 2015, 3:10:13 AM10/3/15
to django-...@googlegroups.com
#25398: Use os.path.join() to construct file paths in docs instead of hardcoding
'/'
--------------------------------------+------------------------------------
Reporter: amrosado | Owner: dudepare
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.8

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

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>

Django

unread,
Oct 3, 2015, 3:10:54 AM10/3/15
to django-...@googlegroups.com
#25398: Use os.path.join() to construct file paths in docs instead of hardcoding
'/'
--------------------------------------+------------------------------------
Reporter: amrosado | Owner: dudepare
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.8

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages