First of all thank you for the quick response!
I am using the following python version:
Python 3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)] on win32
and have the following packages installed:
Package Version
----------------- -------
asgiref 3.7.2
autopep8 2.0.4
Django 5.0
django-countries 7.5.1
django-filter 23.5
pip 23.3.2
pycodestyle 2.11.1
python-dotenv 1.0.0
setuptools 69.0.2
sqlparse 0.4.4
tomli 2.0.1
typing_extensions 4.9.0
tzdata 2023.3
Here the requested settings extract:
INSTALLED_APPS = [
'homepage',
'mybar',
'linkcollection',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_filters',
'django_countries',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
When checking the terminal out I see the following and I added a debug message that shows that the queryset gets lost
DEBUG mybar.views->rate: Rated 5 for Aberlour - A'bunadh (Batch 49) [Spirit ID=175]
[25/Feb/2024 10:42:38] "GET /mybar/175/rate/5 HTTP/1.1" 302 0
DEBUG mybar.views->show_spirit_catalog: REQUEST.GET: <WSGIRequest: GET '/mybar/spiritcatalog?spirit_type__spirit_type_name=165&brand=&spirit_name='>
DEBUG mybar.views->show_spirit_catalog: Found 9 bottles for user=admin when loading the drinks menu
[25/Feb/2024 10:42:38] "GET /mybar/spiritcatalog?spirit_type__spirit_type_name=165&brand=&spirit_name= HTTP/1.1" 200 41340
DEBUG mybar.views->show_spirit_catalog: REQUEST.GET: <WSGIRequest: GET '/mybar/spiritcatalog'>
DEBUG mybar.views->show_spirit_catalog: Found 9 bottles for user=admin when loading the drinks menu
[25/Feb/2024 10:42:38] "GET /mybar/spiritcatalog HTTP/1.1" 200 202099
According to your question I will meanwhile try if changing the order of the entries in the settings makes a difference.
In general my objective is to keep the filter settings and ideally the position on the page after a function is executed.
Thank you!