diff --git a/euscanwww/djeuscan/models.py b/euscanwww/djeuscan/models.py
index 86f79bc..c2b2d17 100644
--- a/euscanwww/djeuscan/models.py
+++ b/euscanwww/djeuscan/models.py
@@ -324,6 +324,13 @@ class RefreshPackageQuery(models.Model):
priority = models.IntegerField(default=0)
users = models.ManyToManyField(User)
+ @property
+ def position(self):
+ ordered = RefreshPackageQuery.objects.all().order_by("-priority")
+ for pos, obj in enumerate(ordered, start=1):
+ if obj == self:
+ return pos
+
def __unicode__(self):
return u'[%d] %s' % (self.priority, self.package)
diff --git a/euscanwww/djeuscan/templates/euscan/package.html b/euscanwww/djeuscan/templates/euscan/package.html
index 8c90efe..d0381a9 100644
--- a/euscanwww/djeuscan/templates/euscan/package.html
+++ b/euscanwww/djeuscan/templates/euscan/package.html
@@ -25,8 +25,9 @@
{% block content %}
-
- A refresh request is in progress, please wait...
+
+
A refresh request is in progress, please wait...
+
Queue position: {{ refresh_pos }}
@@ -34,10 +35,10 @@
{% if user.is_authenticated %}
-