PDF template updates

This commit is contained in:
nikolark committed 2012-02-02 23:20:16 +01:00
1 parent a6040edc86
commit 7ed799e6d3
5 files changed
+44 -22

No files matched your search

+4 -3
View File
@@ -4,7 +4,7 @@ import os
import sys
from datetime import datetime
project_path = '/home/nikolark/dev/edb/mbftns/'
project_path = '/var/www/neuf.no/mbftns/mbftns/'
if project_path not in sys.path:
sys.path.append(project_path)
@@ -16,7 +16,8 @@ setup_environ(settings)
from main.models import *
from radius.models import *
# Find expired userpass objects, format into a list
# Find expired userpass objects, format into a list.
# Then use the id's in an inner query to delete them
# Note: Use this way of referencing since UserPass and Radcheck objects are in different DBs
up_ids = UserPass.objects.filter(log__expires__lte=datetime.now()).values_list('radcheck_id', flat=True)
# then use the id's in an inner query to delete them
Radcheck.objects.filter(id__in=list(up_ids)).delete()