Revision 7c4bc8de

b/flowspec/models.py
318 318
        if self.status not in ['EXPIRED', 'ADMININACTIVE', 'ERROR']:
319 319
            expiration_days = (self.expires - datetime.date.today()).days
320 320
            if expiration_days < settings.EXPIRATION_NOTIFY_DAYS:
321
                return expiration_days
321
                return "%s" %expiration_days
322 322
            else:
323 323
                return False
324 324
        else:
b/templates/user_routes.html
170 170
	<td style="text-align: center;">{{route.get_then|safe|escape}}</td>
171 171
	<td style="text-align: center; ">
172 172
		<span 
173
		{% if route.days_to_expire %}
173
		{% if route.days_to_expire and route.days_to_expire >= 0 %}
174 174
		class="expiresclass" 
175 175
		style="border-bottom:2px dashed red;" 
176
        title="Expires in {{route.days_to_expire}} day{{route.days_to_expire|pluralize}}"
176
        title="Expires {% ifequal route.days_to_expire '0' %}today{% else%}in {{route.days_to_expire}} day{{ route.days_to_expire|pluralize }}{% endifequal %}"
177 177
		{% endif %}>{{route.status}}
178 178
		</span>
179 179
	</td>

Also available in: Unified diff