contents: Add URLWrapper.__repr__

This makes it easier to troubleshoot collections of URLWrappers,
because printing the collection will give you something you can
actually read ;).
This commit is contained in:
W. Trevor King 2013-01-04 20:52:04 -05:00
commit 9a62b5ec62

View file

@ -41,6 +41,9 @@ class URLWrapper(object):
def __str__(self):
return self.name
def __repr__(self):
return '<{} {}>'.format(type(self).__name__, str(self))
def _from_settings(self, key, get_page_name=False):
"""Returns URL information as defined in settings.