EuroPython / djep

EuroPython 2014 conference software
https://ep2014.europython.eu/
BSD 3-Clause "New" or "Revised" License
37 stars 18 forks source link

Use latest revision's title in all review actions #96

Open lehmannro opened 10 years ago

lehmannro commented 10 years ago

This hotfixes #95 and should replace all improper uses of the proposal's title with the latest proposal version's title.

A cleaner approach would be supplying a non-null template variable which points to the latest proposal, whether there were revisions or not, and just referring to that proposal's title. This would also clean up the whole {% if proposal_version %}{{ proposal_version.yadda }}{% else %}{{ proposal.yadda }}{% endif %} business all over the templates.

These commits go untested.

MarkusH commented 10 years ago

Nice idea to clean up the templates. However, I'd move the decision weather there is a proposal version or not, as a property to the reviews.Proposal model and either return the version or the proposal itself. This would clean up a lot of code in the views too.

Have a look at the ProposalVersionManager on how to get the latest version.