agateblue / agateblue/django-dynamic-preferences

NotFoundInRegistry

Aperta
#239 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
359
Fork
86
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

NotFoundInRegistry
No such preference in GlobalPreferenceRegistry with section=None and name=addresslist_settings_url
/home/sebastian/.local/lib/python3.8/site-packages/dynamic_preferences/registries.py, line 174, in get
/usr/bin/python3
3.8.5
['/home/sebastian/PycharmProjects/verwaltung', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/sebastian/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.8/dist-packages']
Sun, 21 Mar 2021 11:23:03 +0000

**views.py:**
def updatesettings(request):
#if request.method == "POST" and request.is_ajax():
url = request.GET.get("url", "?pagesize=50&ordering=id")

global_preferences['addresslist_settings_url'] = url

**dynamic_preferences_registry.py:**

from dynamic_preferences.types import BooleanPreference, StringPreference
from dynamic_preferences.preferences import Section
from dynamic_preferences.registries import global_preferences_registry
from dynamic_preferences.users.registries import user_preferences_registry

# save parameter behind url from addresslist
@user_preferences_registry.register
class Addresslistsettings(StringPreference):

name = 'addresslist_settings_url'
default = "?pagesize=50&ordering=id"

The App have an entry in settings.App. In Database in table dynamic_preferences_users_userpreferencemodel there are no entry.

Why django create not a new entry in these table?

Regards

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.