1
0
mirror of https://gitlab.com/brutaldon/brutaldon.git synced 2025-01-03 14:56:25 -05:00

more documnetation tidbits

This commit is contained in:
Dorian Wood 2024-03-16 14:05:27 -04:00
parent c4db4db3ba
commit 0b98ee9a23
2 changed files with 7 additions and 1 deletions

View File

@ -1,8 +1,12 @@
# Module for reversing urls.
# In the sense of a reverse proxy I think.
from django.urls import reverse
def bookmarklet_url(request):
# takes var request and add a /share/ to the end of the url
share_url = request.build_absolute_uri(reverse("share"))
# return the share_url embedded in a string of other stuff.
# not yet sure what that other stuff is for.
return {
"bookmarklet_url": f"javascript:location.href='{share_url}?url='+encodeURIComponent(location.href)+';title='+encodeURIComponent(document.title)"
}

View File

@ -11,6 +11,8 @@ import os
from django.core.wsgi import get_wsgi_application
# Setting the key DJANGO_SETTINGS_MODULE to brutaldon.settings in the process environment.
# Think of modifying the environment variables of the parent shell.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "brutaldon.settings")
application = get_wsgi_application()