agateblue / agateblue/django-dynamic-preferences
NotFoundInRegistry
- Ngôn ngữ chính
- Python
- Star
- 359
- Fork
- 86
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.