diff --git a/brutaldon/context_processors.py b/brutaldon/context_processors.py index 105ccb6..5e3d323 100644 --- a/brutaldon/context_processors.py +++ b/brutaldon/context_processors.py @@ -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)" } diff --git a/brutaldon/wsgi.py b/brutaldon/wsgi.py index 62813ed..e9f5c90 100644 --- a/brutaldon/wsgi.py +++ b/brutaldon/wsgi.py @@ -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()