]> git.ipfire.org Git - thirdparty/patchwork.git/commit
models: Centralize generation of filenames
authorStephen Finucane <stephen@that.guru>
Tue, 30 May 2017 20:33:58 +0000 (21:33 +0100)
committerStephen Finucane <stephen@that.guru>
Tue, 30 May 2017 20:40:11 +0000 (21:40 +0100)
commit35d696ea6c709cd154bc9910838d2e11b5c2652d
tree10ac6606eda48c5735d993ef9f44484742479e60
parent5d06325229deacc0c3a055c796f14eee4e130b34
models: Centralize generation of filenames

Move filename generation to a mixin. This allows us to reuse the code
for other items like cover letters. Some unncessary 'strip' calls are
removed as their unnecessary.

This allows us to change the file extension for diffs to 'diff', which
is a little more accurate.

Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/models.py
patchwork/views/patch.py
patchwork/views/series.py
releasenotes/notes/patch-download-diff-extension-88c9963eac6ba4aa.yaml [new file with mode: 0644]