mirror of
https://github.com/aquatix/digimarks.git
synced 2025-12-06 22:05:09 +01:00
Show url domain name along with 'no title' for items without title
This commit is contained in:
@@ -203,6 +203,10 @@ class Bookmark(db.Model):
|
||||
else:
|
||||
return None
|
||||
|
||||
def get_uri_domain(self):
|
||||
parsed = urlparse(self.url)
|
||||
return parsed.hostname
|
||||
|
||||
@classmethod
|
||||
def strip_url_params(cls, url):
|
||||
parsed = urlparse(url)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
{% if bookmark.title %}
|
||||
{{ bookmark.title }}
|
||||
{% else %}
|
||||
[ no title ]
|
||||
{{ bookmark.get_uri_domain() }} (no title)
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user