mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
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:
parent
bfa8851af0
commit
9a62b5ec62
1 changed files with 3 additions and 0 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue