Skip to content

Commit

Permalink
Merge pull request #4850 from rtfd/add-modified-date-importedfile
Browse files Browse the repository at this point in the history
Add modified_date to ImportedFile.
  • Loading branch information
ericholscher authored Nov 5, 2018
2 parents 1057273 + 262cde9 commit a6120f4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-11-01 14:37
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('projects', '0029_add_additional_languages'),
]

operations = [
migrations.AddField(
model_name='importedfile',
name='modified_date',
field=models.DateTimeField(auto_now=True, verbose_name='Modified date'),
),
]
1 change: 1 addition & 0 deletions readthedocs/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,7 @@ class ImportedFile(models.Model):
path = models.CharField(_('Path'), max_length=255)
md5 = models.CharField(_('MD5 checksum'), max_length=255)
commit = models.CharField(_('Commit'), max_length=255)
modified_date = models.DateTimeField(_('Modified date'), auto_now=True)

def get_absolute_url(self):
return resolve(project=self.project, version_slug=self.version.slug, filename=self.path)
Expand Down

0 comments on commit a6120f4

Please sign in to comment.