Skip to content
Extraits de code Groupes Projets
Valider e1e714be rédigé par Jamesie Pic's avatar Jamesie Pic
Parcourir les fichiers

Fresh start on the data model

This is completely backward-incompatible and was rushed before the
release - nobody was going to pay the interrest on the technical debt
this commit remove to support migrations since nobody has an instance in
production.

Memopol{Representative,Vote,Dossier} subclasses are gone. Django model
inheritance is fun but comes at a price - hacks like
create_child_instance_from_parent would end up everywhere. Use a simple
one to one relation when you don't intend to have several subclasses of
a model which is the case here.

Country and current mandates are not pre-calculated and stored in the
database anymore, instead they are pre-fetched which requires
django-representatives>=0.0.7

Score related code was rewritten in votes.models, along with the
Recommendation model. We're still not calculating it on the fly here
because that would require some SQL backflips which will take a bit of
time to do properly.
parent 9ac4be5d
Branches
Aucune étiquette associée trouvée
Chargement en cours
Affichage de
avec 128 ajouts et 621 suppressions
Chargement en cours
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter