Thank you Rayan.
On Sun, Aug 2, 2020, 8:15 PM 'Ryan Nowakowski' via Django users <django-users@googlegroups.com> wrote:
On August 2, 2020 7:21:04 PM CDT, Hector Berrones <hector@getin2web.com> wrote:
>I have very little experience using django and I would like to know how
>would be the most conveniente way to store and manage the common data
>in a
>django proyect that would have several applications when I say common
>data I mean information about tables cities, Countries, Catalog
>Sections I
>mean information that usera can use select from a Select Field in for
>example.
>
For your model, if the data is relatively static, use a CharField with choices. If the data is likely to change often, use a model for each kind of data and link them together with ForeignKey.
Then in your ModelForm, either the CharField with choices or the ForeignKey will be shown as a ChoiceField which renders as a select input in your template.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/FE1AAC21-E0DA-49F2-AFAF-36142DFC83B5%40fattuba.com.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFFaoUKVknzmo%2B6C3MgpBKfGighFcjZZhkvk_xH1R0nzyjfyqA%40mail.gmail.com.
No comments:
Post a Comment