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:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def get_uri_domain(self):
|
||||||
|
parsed = urlparse(self.url)
|
||||||
|
return parsed.hostname
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def strip_url_params(cls, url):
|
def strip_url_params(cls, url):
|
||||||
parsed = urlparse(url)
|
parsed = urlparse(url)
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
{% if bookmark.title %}
|
{% if bookmark.title %}
|
||||||
{{ bookmark.title }}
|
{{ bookmark.title }}
|
||||||
{% else %}
|
{% else %}
|
||||||
[ no title ]
|
{{ bookmark.get_uri_domain() }} (no title)
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user