Ajout du tiret dans la définition d'un mot
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage / scripts / alertes_courriel.in
... / ...
CommitLineData
1#!/usr/bin/env python
2# -*- encoding: utf-8 -*-
3
4import sys, os, glob, time
5sys.path[0:0] = [
6 "%(directory)s",
7 "%(directory)s/auf_savoirs_en_partage",
8 ]
9os.environ['DJANGO_SETTINGS_MODULE'] = 'production'
10for d in glob.glob("%(directory)s/eggs/*"):
11 sys.path[0:0] = [d,]
12for d in glob.glob("%(directory)s/parts/*"):
13 sys.path[0:0] = [d,]
14
15from savoirs.models import Search
16
17recherches = Search.objects.filter(alerte_courriel=True)
18for recherche in recherches:
19 recherche.send_email_alert()