[Django] #16429: Add configurable caching to FilePathField

30 views
Skip to first unread message

Django

unread,
Jul 7, 2011, 8:27:42 AM7/7/11
to django-...@googlegroups.com
#16429: Add configurable caching to FilePathField
-------------------------+----------------------------
Reporter: pressureman | Owner: nobody
Type: New feature | Status: new
Milestone: | Component: Forms
Version: SVN | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------+----------------------------
As noted by a couple of people on django-users, FilePathField does not
automatically refresh choices if files are add to or removed from the path
being pointed to (http://groups.google.com/group/django-
users/browse_thread/thread/6778fa138b848996 and
http://groups.google.com/group/django-
users/browse_thread/thread/403d872cf9433905).

A nice addition to FilePathField would be the ability to control how long
the choices are cached for, ranging from "never cached" to "cached
forever" (or at least for the lifetime of the webserver process).

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

Django

unread,
Jul 7, 2011, 10:54:29 AM7/7/11
to django-...@googlegroups.com
#16429: Add configurable caching to FilePathField
---------------------------------------+------------------------
Reporter: pressureman | Owner: nobody
Type: New feature | Status: new
Milestone: | Component: Forms
Version: SVN | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+------------------------
Changes (by lukeplant):

* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


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

Django

unread,
Oct 19, 2023, 9:13:13 AM10/19/23
to django-...@googlegroups.com
#16429: Add configurable caching to FilePathField
----------------------------------+------------------------------------
Reporter: Daniel Swarbrick | Owner: nobody

Type: New feature | Status: new
Component: Forms | Version: dev

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by James Walters):

At DjangoCon US, taking a look at this.

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

Django

unread,
Oct 19, 2023, 11:50:59 AM10/19/23
to django-...@googlegroups.com
#16429: Add configurable caching to FilePathField
-------------------------------------+-------------------------------------
Reporter: Daniel Swarbrick | Owner: James
| Walters
Type: New feature | Status: assigned

Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* owner: nobody => James Walters
* status: new => assigned


Comment:

I've been able to reproduce this, which I wanted to make sure to do given
the age of this ticket. FilePathField's choices remain stale after
changing the contents of its specified filepath. Now I'll get to work on
this.

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

Django

unread,
Oct 27, 2023, 5:46:20 PM10/27/23
to django-...@googlegroups.com
#16429: Add configurable caching to FilePathField
-------------------------------------+-------------------------------------
Reporter: Daniel Swarbrick | Owner: James
| Walters
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* has_patch: 0 => 1


Comment:

Alright, I've opened a PR implementing this!

[https://github.com/django/django/pull/17416 PR]

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

Django

unread,
Nov 2, 2023, 8:42:53 AM11/2/23
to django-...@googlegroups.com
#16429: Add configurable caching to FilePathField
-------------------------------------+-------------------------------------
Reporter: Daniel Swarbrick | Owner: James
| Walters
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


Comment:

Setting as patch needs improvement because I think we need to clarify
expectations about the solution, specifically, what "automatically refresh
choices" mean.

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

Django

unread,
Dec 9, 2023, 12:38:43 AM12/9/23
to django-...@googlegroups.com
#16429: Add configurable caching to FilePathField
-------------------------------------+-------------------------------------
Reporter: Daniel Swarbrick | Owner: James
| Walters
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: 1 => 0


Comment:

Unticking the "patch needs improvement" box to indicate this is ready for
review again over on GitHub.

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

Django

unread,
Dec 12, 2023, 9:51:56 AM12/12/23
to django-...@googlegroups.com
#16429: Add configurable caching to FilePathField
-------------------------------------+-------------------------------------
Reporter: Daniel Swarbrick | Owner: James
| Walters
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* cc: Carlton Gibson, David Smith (added)


* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/16429#comment:7>

Django

unread,
Dec 14, 2023, 1:00:49 PM12/14/23
to django-...@googlegroups.com
#16429: Allow refresh of path choices for FilePathField

-------------------------------------+-------------------------------------
Reporter: Daniel Swarbrick | Owner: James
| Walters
Type: New feature | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Old description:

> As noted by a couple of people on django-users, FilePathField does not
> automatically refresh choices if files are add to or removed from the
> path being pointed to (http://groups.google.com/group/django-
> users/browse_thread/thread/6778fa138b848996 and
> http://groups.google.com/group/django-
> users/browse_thread/thread/403d872cf9433905).
>
> A nice addition to FilePathField would be the ability to control how long
> the choices are cached for, ranging from "never cached" to "cached
> forever" (or at least for the lifetime of the webserver process).

New description:

As noted by a couple of people on django-users, FilePathField does not
automatically refresh choices if files are add to or removed from the path
being pointed to (http://groups.google.com/group/django-
users/browse_thread/thread/6778fa138b848996 and
http://groups.google.com/group/django-
users/browse_thread/thread/403d872cf9433905).

A nice addition to FilePathField would be the ability to refresh the path
choices on a per-request basis.

--

Comment (by Natalia Bidart):

After [https://github.com/django/django/pull/17416#issuecomment-1855854814
these comment in the PR], I'm re-titling this ticket accordingly to adjust
scope and allow for a more pragmatic yet useful solution.

--
Ticket URL: <https://code.djangoproject.com/ticket/16429#comment:8>

Django

unread,
Mar 19, 2024, 7:59:11 AM3/19/24
to django-...@googlegroups.com
#16429: Allow refresh of path choices for FilePathField
----------------------------------+------------------------------------
Reporter: Daniel Swarbrick | Owner: (none)
Type: New feature | Status: new
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Natalia Bidart):

* has_patch: 1 => 0
* owner: James Walters => (none)
* status: assigned => new

--
Ticket URL: <https://code.djangoproject.com/ticket/16429#comment:9>
Reply all
Reply to author
Forward
0 new messages