Revision c1509909
b/flowspec/models.py | ||
---|---|---|
6 | 6 |
from django.contrib.auth.models import User |
7 | 7 |
from utils import proxy as PR |
8 | 8 |
from ipaddr import * |
9 |
from datetime import *
|
|
9 |
import datetime
|
|
10 | 10 |
import logging |
11 | 11 |
from flowspec.tasks import * |
12 | 12 |
from time import sleep |
... | ... | |
49 | 49 |
) |
50 | 50 |
|
51 | 51 |
|
52 |
def days_offset(): return datetime.now() + timedelta(days = settings.EXPIRATION_DAYS_OFFSET)
|
|
52 |
def days_offset(): return datetime.date.today() + datetime.timedelta(days = settings.EXPIRATION_DAYS_OFFSET)
|
|
53 | 53 |
|
54 | 54 |
class MatchPort(models.Model): |
55 | 55 |
port = models.CharField(max_length=24, unique=True) |
... | ... | |
167 | 167 |
# def delete(self, *args, **kwargs): |
168 | 168 |
# response = delete.delay(self) |
169 | 169 |
# logger.info("Got delete job id: %s" %response) |
170 |
def has_expired(self): |
|
171 |
today = datetime.date.today() |
|
172 |
if today > self.expires: |
|
173 |
return True |
|
174 |
return False |
|
170 | 175 |
|
171 | 176 |
def is_synced(self): |
172 | 177 |
found = False |
b/templates/base.html | ||
---|---|---|
3 | 3 |
<head> |
4 | 4 |
<title>GRNET's FoD :: {% block title %}{% endblock %} </title> |
5 | 5 |
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> |
6 |
<META HTTP-EQUIV="Expires" CONTENT="-1"> |
|
6 |
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT"> |
|
7 |
|
|
7 | 8 |
<script src="/static/js/jquery.min.js" type="text/javascript"></script> |
8 | 9 |
<link rel="stylesheet" type="text/css" href="/static/css/base.css"> |
9 | 10 |
<link rel="stylesheet" type="text/css" href="/static/css/smoothness/jquery-ui-1.8.13.custom.css"> |
Also available in: Unified diff