Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Pootle-2.0.0
diff options
context:
space:
mode:
authoralaaosh <alaaosh@54714841-351b-0410-a198-e36a94b762f5>2009-12-15 00:46:37 (GMT)
committer Sayamindu Dasgupta <sayamindu@gmail.com>2010-01-08 22:38:25 (GMT)
commita9f1e107dc5fc797eb58f1e3790f67c845d74219 (patch)
treee3f2c13c4dcf786067123a582f7015a28a4f9506 /Pootle-2.0.0
parent9779c4b894953af37ea668bbbdb6ded5037ed42f (diff)
update last activity column on file uploads
we should probably do the same for VCS actions, file rescans and updates from templates. git-svn-id: https://translate.svn.sourceforge.net/svnroot/translate/src/branches/Pootle-2.0/Pootle@13510 54714841-351b-0410-a198-e36a94b762f5
Diffstat (limited to 'Pootle-2.0.0')
-rw-r--r--Pootle-2.0.0/local_apps/pootle_app/views/language/tp_common.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Pootle-2.0.0/local_apps/pootle_app/views/language/tp_common.py b/Pootle-2.0.0/local_apps/pootle_app/views/language/tp_common.py
index 40fa745..b15c526 100644
--- a/Pootle-2.0.0/local_apps/pootle_app/views/language/tp_common.py
+++ b/Pootle-2.0.0/local_apps/pootle_app/views/language/tp_common.py
@@ -23,6 +23,7 @@ import os
import StringIO
import subprocess
import zipfile
+import datetime
from django import forms
from django.utils.translation import ugettext_lazy as _
@@ -32,6 +33,8 @@ from translate.storage import factory, versioncontrol
from pootle_app.lib import view_handler
from pootle_app.project_tree import scan_translation_project_files
+from pootle_app.models import Submission
+from pootle_app.models.profile import get_profile
from pootle_app.models.permissions import check_permission
from pootle_app.models.signals import post_file_upload
from pootle_app.views.language import item_dict
@@ -283,6 +286,14 @@ class UploadHandler(view_handler.Handler):
upload_file(request, relative_root_dir, django_file, overwrite)
scan_translation_project_files(translation_project)
newstats = translation_project.getquickstats()
+
+ # create a submission, doesn't fix stats but at least
+ # shows up in last activity column
+ s = Submission(creation_time=datetime.datetime.utcnow(),
+ translation_project=translation_project,
+ submitter=get_profile(request.user))
+ s.save()
+
post_file_upload.send(sender=translation_project, user=request.user, oldstats=oldstats,
newstats=newstats, archive=archive)
return {'upload': self}