README edit and Etag tweak

This commit is contained in:
Matthias Portzel 2024-01-29 21:18:59 -05:00
parent 30540cd2f4
commit cf18c28087
2 changed files with 3 additions and 4 deletions

4
README
View File

@ -12,8 +12,6 @@ First off, this is not necessarily recommended. Making it easy for other people
Running in production requires a WSGI host, which is way beyond the scope of this README to set up.
Since both production and my local development instance have a large (500+) number of posts, behavior with a small number of posts is untested and undefined. I do know that the system assumes that there is at least one post, and the main page will error if that's not the case. Pull requests (or emailed git patches) to fix this or similar bugs would be accepted.
Disabling pagination is possible by editing ./thoughts/pagination.py.
After cloning, you should create a `.env` to define environment variables. Read whispermaphone/settings.py.
@ -46,7 +44,7 @@ pip install -r requirements.txt
# NOTE: make sure the virtual enviroment is enabled before running this
# Check the latest version of xapian from https://xapian.org
# As of writing, that's 1.4.19
# As of writing, that's 1.4.24
sh install_xapian.sh <version>
./manage.py rebuild_index

View File

@ -107,7 +107,8 @@ def get_etag(request):
thoughts = current_page.get_all_entries()
return get_etag_from_thoughts(thoughts)
# We're supposed to include quotes
return f'"{get_etag_from_thoughts(thoughts)}"'
@condition(etag_func=get_etag)