mirror of
https://github.com/aquatix/digimarks.git
synced 2025-12-06 22:05:09 +01:00
Some more readability fixes
This commit is contained in:
@@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- jQuery-b-gone: changed all jQuery code to regular JavaScript code/MaterializeCSS framework
|
||||
- Fixed colour of filter text in search field for dark themes
|
||||
- Unified rendering of 'private' and 'public' views of bookmark cards
|
||||
- Code cleanups, readability fixes
|
||||
|
||||
|
||||
## [1.1.0] - 2017-07-22
|
||||
|
||||
11
digimarks.py
11
digimarks.py
@@ -343,8 +343,7 @@ class Bookmark(BaseModel):
|
||||
self.http_status = result.status_code
|
||||
self.redirect_uri = result.url
|
||||
return result.url
|
||||
else:
|
||||
return None
|
||||
return None
|
||||
|
||||
def get_uri_domain(self):
|
||||
parsed = urlparse(self.url)
|
||||
@@ -360,8 +359,7 @@ class Bookmark(BaseModel):
|
||||
""" Get the tags as a list, iterable in template """
|
||||
if self.tags:
|
||||
return self.tags.split(',')
|
||||
else:
|
||||
return []
|
||||
return []
|
||||
|
||||
def to_dict(self):
|
||||
result = {
|
||||
@@ -666,7 +664,10 @@ def deletingbookmark(userkey, urlhash):
|
||||
""" Delete the bookmark from form submit by <urlhash>/delete """
|
||||
query = Bookmark.update(status=Bookmark.DELETED).where(Bookmark.userkey == userkey, Bookmark.url_hash == urlhash)
|
||||
query.execute()
|
||||
query = Bookmark.update(deleted_date = datetime.datetime.now()).where(Bookmark.userkey == userkey, Bookmark.url_hash == urlhash)
|
||||
query = Bookmark.update(deleted_date=datetime.datetime.now()).where(
|
||||
Bookmark.userkey == userkey,
|
||||
Bookmark.url_hash == urlhash
|
||||
)
|
||||
query.execute()
|
||||
message = 'Bookmark deleted. <a href="{}">Undo deletion</a>'.format(url_for(
|
||||
'undeletebookmark',
|
||||
|
||||
Reference in New Issue
Block a user