I am new to Django and have a question about user creating settings.
Is it possible with Django to have function that a user (or a group) have there own settings models and have access to customizing them? such as discount rate for clients
Those wouldn’t be “settings” - at least not as Django uses that term.
That kind of data would be stored in a model somewhere, with the user (or group) retrieving the appropriate value from that model when necessary.
The Django settings are settings that are applied across the entire project.
Thank you for the kind answer,
I guess the process would be user inputs some data in forms and retrieve the data using foreignkey.
Am I right?
Yes, that’s the general approach.
Depending upon “who” and “how often” some of this data needs to be entered or modified, this may also be something that is done using the Django admin. (It’s still a process that includes “user inputs some data in forms”, but in this case, it’s the admin that is building the forms, not you.)
Can groups have their own admin page?
or should I deploy websites for each groups?
From the docs:
The admin’s recommended use is limited to an organization’s internal management tool.
It’s not intended to be used by end-users. That’s why I phrased my original response as it depending upon “who” is going to be doing these updates. For example, if you’re the individual responsible for setting that discount rate, then it’s perfectly acceptable for you to use the admin to set that.
How, having said that, the Django admin permission system does make it possible for you to create admin pages that do manage access to data by user or group. And again, depending upon the precise situation, it might be the right answer for you.
Not sites, no. You would use Django’s permission system to restrict who can see what data in your views. That permission system is very flexible, allowing you to create just about any permission system imaginable.
Thank you, you are so kind.
I should read the docs thoroughly.