You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Soon we will introduce new fields to store the Journalist profile URL in many more social networks, a large number of Journalists with a low number of profile links defined will produce an inefficient storage result (table with mostly null values in its cells), the proposal here is to use a new model SocialNetwork with all the columns we want, but 2 of these must be: "order" (to present profile links in that order) and "enabled" (to enable/disable the render of profiles links of the social network). Then, a M2M relation implemented with a new field in core.Journalist: social_networks = ManyToMany(SocialNetwork, through=SocialNetworkProfileLink) through another new model (SocialNetworkProfileLink) with a single not nullable profile_url = URLField field to store the profile link of the relation.
For the Journalist model admin implemenation change, use a tabular inline with no extra rows (new blank rows to fill will only appear when its button or link is clicked)
Important: the solution must come also with the data migration script to migrate existing data to the new layout
The text was updated successfully, but these errors were encountered:
anibalpacheco
changed the title
Improve darabase layout for core.Journalist
Improve database layout for core.Journalist
Aug 27, 2024
Soon we will introduce new fields to store the Journalist profile URL in many more social networks, a large number of Journalists with a low number of profile links defined will produce an inefficient storage result (table with mostly null values in its cells), the proposal here is to use a new model
SocialNetwork
with all the columns we want, but 2 of these must be: "order" (to present profile links in that order) and "enabled" (to enable/disable the render of profiles links of the social network). Then, a M2M relation implemented with a new field in core.Journalist:social_networks = ManyToMany(SocialNetwork, through=SocialNetworkProfileLink)
through another new model (SocialNetworkProfileLink
) with a single not nullableprofile_url = URLField
field to store the profile link of the relation.For the Journalist model admin implemenation change, use a tabular inline with no extra rows (new blank rows to fill will only appear when its button or link is clicked)
Important: the solution must come also with the data migration script to migrate existing data to the new layout
The text was updated successfully, but these errors were encountered: