Skip to content

Commit d0c3331

Browse files
committed
Clarified the differences between Document.href() and Document.get_absolute_url(). Updated PLAN.
- Legacy-Id: 12012
1 parent 18b7a2f commit d0c3331

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

PLAN

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ Updated: $Date$
77
Planned work in rough order
88
===========================
99

10-
* Merge in manual post work from Spherical Cow
11-
1210
* Glue code for WG issue trackers and wiki:
1311
- create new trackers on group creation
1412
- update access lists on group chair/secretary changes
@@ -33,11 +31,6 @@ Planned work in rough order
3331
* Revisit floorplans: Add room coordinate input tool (javascript).
3432
Add NOC object annotation possibilities.
3533

36-
* Refactor to one function instead of having both Document.get_absolute_url()
37-
and Document.href(), which should do the same thing, but don't today. Also
38-
change the default draft href to be the datatracker url now that we support
39-
revisions.
40-
4134
* Add support for internationalised email addresses according to RFC 6531
4235
when sending email (this is not supported by smtplib under Python 2.7,
4336
so will need support code in the application until we migrate to Python 3.5)

ietf/doc/models.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ def get_file_path(self):
9393
return settings.DOCUMENT_PATH_PATTERN.format(doc=self)
9494

9595
def href(self):
96+
"""
97+
Returns an url to the document text. This differs from .get_absolute_url(),
98+
which returns an url to the datatracker page for the document.
99+
"""
96100
# If self.external_url truly is an url, use it. This is a change from
97101
# the earlier resulution order, but there's at the moment one single
98102
# instance which matches this (with correct results), so we won't
@@ -379,6 +383,10 @@ def __unicode__(self):
379383
return self.name
380384

381385
def get_absolute_url(self):
386+
"""
387+
Returns an url to the document view. This differs from .href(),
388+
which returns an url to the document content.
389+
"""
382390
name = self.name
383391
if self.type_id == "draft" and self.get_state_slug() == "rfc":
384392
name = self.canonical_name()

0 commit comments

Comments
 (0)