mirror of
https://gitlab.com/brutaldon/brutaldon
synced 2025-06-05 21:49:32 +02:00
more documnetation tidbits
This commit is contained in:
@@ -1,8 +1,12 @@
|
|||||||
|
# Module for reversing urls.
|
||||||
|
# In the sense of a reverse proxy I think.
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
|
|
||||||
def bookmarklet_url(request):
|
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"))
|
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 {
|
return {
|
||||||
"bookmarklet_url": f"javascript:location.href='{share_url}?url='+encodeURIComponent(location.href)+';title='+encodeURIComponent(document.title)"
|
"bookmarklet_url": f"javascript:location.href='{share_url}?url='+encodeURIComponent(location.href)+';title='+encodeURIComponent(document.title)"
|
||||||
}
|
}
|
||||||
|
@@ -11,6 +11,8 @@ import os
|
|||||||
|
|
||||||
from django.core.wsgi import get_wsgi_application
|
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")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "brutaldon.settings")
|
||||||
|
|
||||||
application = get_wsgi_application()
|
application = get_wsgi_application()
|
||||||
|
Reference in New Issue
Block a user