Skip to content

Commit

Permalink
Merge pull request #32 from Hafnernuss/release/0.5.1
Browse files Browse the repository at this point in the history
Merge 0.5.1 to master
  • Loading branch information
Hafnernuss authored Jul 7, 2023
2 parents 964f452 + c962254 commit 894d506
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 4.1.3 on 2023-07-07 11:35

from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

dependencies = [
('dynamic_file', '0003_alter_dynamicfile_uploaded_by'),
]

operations = [
migrations.AddField(
model_name='dynamicfile',
name='created_at',
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now, help_text='The creation date of this file'),
preserve_default=False,
),
migrations.AddField(
model_name='dynamicfile',
name='updated_at',
field=models.DateTimeField(auto_now=True, help_text='The last update date of this file'),
),
]
18 changes: 18 additions & 0 deletions dynamic_file/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,24 @@ class DynamicFileBase(models.Model):
NOTE: Changing those settings is only supported _before_ running the first migration
'''

created_at = models.DateTimeField(
auto_now_add=True,
blank=True,
help_text=_('The creation date of this file')
)
'''
Read-only field, specifying the upload date of this file.
'''

updated_at = models.DateTimeField(
auto_now=True,
blank=True,
help_text=_('The last update date of this file')
)
'''
Read-only field, specifying the update date of this file.
'''

@property
def name(self):
'''
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "django-dynamic-file"
version = "0.5.0"
version = "0.5.1"
description = "A flexible approach to handling and serving files with django"
readme = "README.rst"
authors = [{ name = "Philipp Hafner", email = "[email protected]" }]
Expand Down Expand Up @@ -35,7 +35,7 @@ package-dir = {"dynamic_file" = "dynamic_file"}

[tool.bumpver]
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
current_version = "0.5.0"
current_version = "0.5.1"
commit_message = "bump version {old_version} -> {new_version}"
commit = true
tag = false
Expand Down

0 comments on commit 894d506

Please sign in to comment.