The Python Oracle

Django: storing user preferences

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Cool Puzzler LoFi

--

Chapters
00:00 Django: Storing User Preferences
00:49 Accepted Answer Score 0
01:09 Answer 2 Score 0
01:30 Thank you

--

Full question
https://stackoverflow.com/questions/2157...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #django #djangoforms

#avk47



ACCEPTED ANSWER

Score 0


If all your preferences values are Boolean, then yes, that way could be acceptable. And if you want to handle the PreferencesValues with Django Forms, you should take a look at Django Formsets.

But if you want to make something ajax-able, you should also take a look at this Django Snippets article.




ANSWER 2

Score 0


Can try using the package "django-userpreferences" https://pypi.org/project/django-userpreferences/ . I did not used it yet, but was researching on the similar requirement for capturing User Preferences, and got to know above link, hoping that will help others thus posted here. Will be using this soon to check how it works, and if it satisfy all my requirements.