diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-05-02 15:50:20 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-05-02 15:50:20 +0100 |
commit | 51da26564fa85d5c615771a12f5595f94f56c517 (patch) | |
tree | 5c7418ae6e83bf191aea3b5d0c5f9ed9e2f7131a /core/views/logbooks.py | |
parent | a9ffae9b87b001ecd2f5fbc626d3c782548acf94 (diff) | |
download | troggle-51da26564fa85d5c615771a12f5595f94f56c517.tar.gz troggle-51da26564fa85d5c615771a12f5595f94f56c517.tar.bz2 troggle-51da26564fa85d5c615771a12f5595f94f56c517.zip |
chnage img fix to import, not display
Diffstat (limited to 'core/views/logbooks.py')
-rw-r--r-- | core/views/logbooks.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/core/views/logbooks.py b/core/views/logbooks.py index fe78cb6..2ec6991 100644 --- a/core/views/logbooks.py +++ b/core/views/logbooks.py @@ -187,14 +187,6 @@ def logbookentry(request, date, slug): return render(request, 'object_list.html',{'object_list':this_logbookentry}) else: this_logbookentry=this_logbookentry[0] - y = str(this_logbookentry.date)[:4] - fix = f'src="/years/{y}/' - print(f'LOGBOOK ENTRY {this_logbookentry.date} /years/{y}') - this_logbookentry.text = this_logbookentry.text.replace('src="', fix ) - this_logbookentry.text = this_logbookentry.text.replace("src='", f"src='/years/{y}/" ) - print(this_logbookentry.text) - this_logbookentry.save() - return render(request, 'logbookentry.html', {'logbookentry': this_logbookentry}) else: msg =(f' Logbook entry slug:"{slug}" not found in database on date:"{date}" ') |