diff --git a/mayan/apps/sources/apps.py b/mayan/apps/sources/apps.py index ffe14820b8..80be4281c7 100644 --- a/mayan/apps/sources/apps.py +++ b/mayan/apps/sources/apps.py @@ -57,6 +57,12 @@ class SourcesApp(MayanAppConfig): view='sources:setup_source_list' ) + SourceColumn( + source=StagingFile, + label=_('Created'), + func=lambda context: context['object'].get_date_time_created() + ) + SourceColumn( source=StagingFile, label=_('Thumbnail'), diff --git a/mayan/apps/sources/classes.py b/mayan/apps/sources/classes.py index ef9919e5ad..847f573614 100644 --- a/mayan/apps/sources/classes.py +++ b/mayan/apps/sources/classes.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals import base64 import os +import time import urllib try: @@ -62,6 +63,9 @@ class StagingFile(object): file=open(self.get_full_path(), mode='rb'), name=self.filename ) + def get_date_time_created(self): + return time.ctime(os.path.getctime(self.get_full_path())) + def get_full_path(self): return os.path.join(self.staging_folder.folder_path, self.filename)