Skip to content

Integrate views removed from d-r[-v]

njoyard a demandé de fusionner representative-views-41454979 vers master

Created by: njoyard

A quick summary of the changes made:

  • Gave names to API views because their default names conflicted with other view names
  • Added tags to make group/chamber/country URLs (1)
  • Moved views each to its own file and integrated views removed from d-r[-v]
  • Integrated URLs removed from d-r[-v]
  • Made URLs more homogenous (allow singular & plural ; all URLs default to singular) : moved /groups/ to /group/ and added 301 redirect from old to new

(1) I prefer using tags instead of using get_absolute_url. As models are defined in a dependency, they cannot "know" what the user application wants to use as the "canonical model url" (for example for groups it may be rep list filtered by this group, or a detail page for the group, or whatever). I could have made inherited models in memopol just to override get_absolute_url, but then making sure foreign keys use overriden models is not made easy AT ALL by django. It's possible, but the code is horrible.

Rapports de requête de fusion