summaryrefslogtreecommitdiff
path: root/papillon/poll_cleaning.py
blob: 993a5b4875aed46100787cba1e0d65d06ff257ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python
# -*- coding: utf-8 -*-

'''
Clean the old polls
'''

import os
import sys

# django settings path
os.environ['DJANGO_SETTINGS_MODULE'] = 'papillon.settings'

# add the parent path to sys.path
curdir = os.path.abspath(os.curdir)
sep = os.path.sep
sys.path.append(sep.join(curdir.split(sep)[:-1]))


from papillon.polls.models import Poll

for poll in Poll.objects.all():
    poll.checkForErasement()