Compare commits
3 Commits
77af72a712
...
07819ed61b
Author | SHA1 | Date |
---|---|---|
Matthias Portzel | 07819ed61b | |
Matthias Portzel | cf18c28087 | |
Matthias Portzel | 30540cd2f4 |
4
README
4
README
|
@ -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
|
||||
|
|
|
@ -187,6 +187,10 @@ h1, h1 a {
|
|||
min-height: 1em;
|
||||
}
|
||||
|
||||
.thought .main, .thought .extended {
|
||||
transform: skew(-10deg);
|
||||
}
|
||||
|
||||
.thought-end {
|
||||
overflow: auto;
|
||||
font-size: 14px;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,14 +1,27 @@
|
|||
from django.conf.urls.static import static
|
||||
from django.urls import path, include
|
||||
from django.shortcuts import redirect
|
||||
|
||||
from thoughts import views
|
||||
from whispermaphone import settings
|
||||
|
||||
def redirect_view(original, new):
|
||||
def v(request):
|
||||
return redirect(new)
|
||||
return path(original, v, name="redirect" + original)
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
path("about", views.about, name="about"),
|
||||
path("login", views.login, name="login"),
|
||||
path("post", views.post, name="post"),
|
||||
path("search", views.search, name="thoughts_search"),
|
||||
path('__debug__/', include('debug_toolbar.urls')),
|
||||
] + (static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG else [])
|
||||
# path('__debug__/', include('debug_toolbar.urls')),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
urlpatterns += [
|
||||
redirect_view("[post", "/post")
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue