Opened 15 years ago
Closed 15 years ago
#13501 closed (duplicate)
Can't use urlresolvers.reverse() during Feed initialization
| Reported by: | Mandx | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.syndication | Version: | dev |
| Severity: | Keywords: | Feed resolve URLConf circular dependency | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
To provide a link attribute to Feed subclasses, django.core.urlresolvers.reverse can't be used to provide that value, since Feed instances are created during URLConf initialization, so there is nothing to reverse yet. To use resolve to retrieve this value, a link(self) method must be used, so reverse is called after URLConf init. This circular dependency is likely to be hard to solve, but at least must be documented, since no errors than NoReverseMatch are thrown.
Note:
See TracTickets
for help on using tickets.
Duplicate of #11712.