mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-08 03:08:29 +02:00
Speed up response times for certain actions (#829)
* return updated HTML from bookmark actions * open details through URL * fix details update * improve modal behavior * use a frame * make behaviors properly destroy themselves * remove page and details params from tag urls * use separate behavior for details and tags * remove separate details view * make it work with other views * add asset actions * remove asset refresh for now * remove details partial * fix tests * remove old partials * update tests * cache and reuse tags * extract search autocomplete behavior * remove details param from pagination * fix tests * only return details modal when navigating in frame * fix link target * remove unused behaviors * use auto submit behavior for user select * fix import
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import logging
|
||||
import re
|
||||
import unicodedata
|
||||
import urllib.parse
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.template.defaultfilters import pluralize
|
||||
from django.utils import timezone, formats
|
||||
|
||||
@@ -114,6 +116,14 @@ def get_safe_return_url(return_url: str, fallback_url: str):
|
||||
return return_url
|
||||
|
||||
|
||||
def redirect_with_query(request, redirect_url):
|
||||
query_string = urllib.parse.urlencode(request.GET)
|
||||
if query_string:
|
||||
redirect_url += "?" + query_string
|
||||
|
||||
return HttpResponseRedirect(redirect_url)
|
||||
|
||||
|
||||
def generate_username(email):
|
||||
# taken from mozilla-django-oidc docs :)
|
||||
|
||||
|
Reference in New Issue
Block a user