revert 3c1d64a089, remove {hh} and {min} filepath macros, resolves #133

This commit is contained in:
meeb 2021-10-17 21:35:08 +11:00
parent c396821cb1
commit b3d9e74818
3 changed files with 0 additions and 20 deletions

View File

@ -435,8 +435,6 @@ class Source(models.Model):
'yyyy': now.strftime('%Y'),
'mm': now.strftime('%m'),
'dd': now.strftime('%d'),
'hh': now.strftime('%H'),
'min': now.strftime('%M'),
'source': self.slugname,
'source_full': self.name,
'title': 'some-media-title-name',
@ -920,8 +918,6 @@ class Media(models.Model):
'yyyy': dateobj.strftime('%Y'),
'mm': dateobj.strftime('%m'),
'dd': dateobj.strftime('%d'),
'hh': dateobj.strftime('%H'),
'min': dateobj.strftime('%M'),
'source': self.source.slugname,
'source_full': self.source.name,
'title': self.slugtitle,

View File

@ -33,16 +33,6 @@
<td>Media publish day in DD</td>
<td>31</td>
</tr>
<tr>
<td>{hh}</td>
<td>Media publish hour in HH</td>
<td>12</td>
</tr>
<tr>
<td>{min}</td>
<td>Media publish minutes in MM</td>
<td>46</td>
</tr>
<tr>
<td>{source}</td>
<td>Lower case source name, max 80 chars</td>

View File

@ -521,12 +521,6 @@ class FilepathTestCase(TestCase):
self.source.media_format = 'test-{dd}'
self.assertEqual(self.source.get_example_media_format(),
'test-' + timezone.now().strftime('%d'))
self.source.media_format = 'test-{hh}'
self.assertEqual(self.source.get_example_media_format(),
'test-' + timezone.now().strftime('%H'))
self.source.media_format = 'test-{min}'
self.assertEqual(self.source.get_example_media_format(),
'test-' + timezone.now().strftime('%M'))
self.source.media_format = 'test-{source}'
self.assertEqual(self.source.get_example_media_format(),
'test-' + self.source.slugname)