Opened 13 years ago

Last modified 8 months ago

#16429 new New feature

Allow refresh of path choices for FilePathField

Reported by: Daniel Swarbrick Owned by:
Component: Forms Version: dev
Severity: Normal Keywords:
Cc: Carlton Gibson, David Smith Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description (last modified by Natalia Bidart)

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.

Change History (9)

comment:1 by Luke Plant, 13 years ago

Triage Stage: UnreviewedAccepted

comment:2 by James Walters, 13 months ago

At DjangoCon US, taking a look at this.

comment:3 by James Walters, 13 months ago

Owner: changed from nobody to James Walters
Status: newassigned

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.

comment:4 by James Walters, 13 months ago

Has patch: set

Alright, I've opened a PR implementing this!

PR

comment:5 by Natalia Bidart, 13 months ago

Patch needs improvement: set

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

comment:6 by James Walters, 11 months ago

Patch needs improvement: unset

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

comment:7 by Natalia Bidart, 11 months ago

Cc: Carlton Gibson David Smith added
Patch needs improvement: set

comment:8 by Natalia Bidart, 11 months ago

Description: modified (diff)
Summary: Add configurable caching to FilePathFieldAllow refresh of path choices for FilePathField

After these comment in the PR, I'm re-titling this ticket accordingly to adjust scope and allow for a more pragmatic yet useful solution.

comment:9 by Natalia Bidart, 8 months ago

Has patch: unset
Owner: James Walters removed
Status: assignednew
Note: See TracTickets for help on using tickets.
Back to Top