Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jelle van der Waa
Archweb
Commits
71506912
Commit
71506912
authored
Aug 22, 2017
by
Jelle van der Waa
🚧
Browse files
feeds.py: Change last_modified to SQLAlchemy
Change the last_modified check to SQLAlchemy so it works with SQLite too.
parent
2f555364
Changes
1
Hide whitespace changes
Inline
Side-by-side
feeds.py
View file @
71506912
...
...
@@ -47,9 +47,10 @@ def write(self, outfile, encoding):
def
package_last_modified
(
request
,
*
args
,
**
kwargs
):
cursor
=
connection
.
cursor
()
cursor
.
execute
(
"SELECT MAX(last_update) FROM packages"
)
return
cursor
.
fetchone
()[
0
]
try
:
return
Package
.
objects
.
latest
(
'last_update'
).
last_update
except
ObjectDoesNotExist
:
return
class
PackageFeed
(
Feed
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment