Clarified the differences between Document.href() and Document.get_absolute_url(). Updated PLAN.
- Legacy-Id: 12012
This commit is contained in:
parent
18b7a2fcdb
commit
d0c3331f9f
7
PLAN
7
PLAN
|
@ -7,8 +7,6 @@ Updated: $Date$
|
|||
Planned work in rough order
|
||||
===========================
|
||||
|
||||
* Merge in manual post work from Spherical Cow
|
||||
|
||||
* Glue code for WG issue trackers and wiki:
|
||||
- create new trackers on group creation
|
||||
- update access lists on group chair/secretary changes
|
||||
|
@ -33,11 +31,6 @@ Planned work in rough order
|
|||
* Revisit floorplans: Add room coordinate input tool (javascript).
|
||||
Add NOC object annotation possibilities.
|
||||
|
||||
* Refactor to one function instead of having both Document.get_absolute_url()
|
||||
and Document.href(), which should do the same thing, but don't today. Also
|
||||
change the default draft href to be the datatracker url now that we support
|
||||
revisions.
|
||||
|
||||
* Add support for internationalised email addresses according to RFC 6531
|
||||
when sending email (this is not supported by smtplib under Python 2.7,
|
||||
so will need support code in the application until we migrate to Python 3.5)
|
||||
|
|
|
@ -93,6 +93,10 @@ class DocumentInfo(models.Model):
|
|||
return settings.DOCUMENT_PATH_PATTERN.format(doc=self)
|
||||
|
||||
def href(self):
|
||||
"""
|
||||
Returns an url to the document text. This differs from .get_absolute_url(),
|
||||
which returns an url to the datatracker page for the document.
|
||||
"""
|
||||
# If self.external_url truly is an url, use it. This is a change from
|
||||
# the earlier resulution order, but there's at the moment one single
|
||||
# instance which matches this (with correct results), so we won't
|
||||
|
@ -379,6 +383,10 @@ class Document(DocumentInfo):
|
|||
return self.name
|
||||
|
||||
def get_absolute_url(self):
|
||||
"""
|
||||
Returns an url to the document view. This differs from .href(),
|
||||
which returns an url to the document content.
|
||||
"""
|
||||
name = self.name
|
||||
if self.type_id == "draft" and self.get_state_slug() == "rfc":
|
||||
name = self.canonical_name()
|
||||
|
|
Loading…
Reference in a new issue