Workout With Friends
Stay fit with a little motivation
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Properties
wowf
scripts
indexer.py
Go to the documentation of this file.
1
from
wowf
import
models
2
from
wowf.lib
import
fulltext
3
from
wowf.lib.utils
import
get_subclasses
4
from
wowf.scripts
import
BaseCommand, make_main
5
6
7
class
UpdateIndexesCommand
(
BaseCommand
):
8
9
def
run
(self):
10
writer = fulltext.index.writer()
11
for
cls
in
get_subclasses
(models,
models.Base
):
12
if
cls.index_fields:
13
for
obj
in
cls.query.all():
14
obj.update_index(writer)
15
writer.commit()
16
17
18
main =
make_main
(UpdateIndexesCommand)
19
Generated on Sat Dec 15 2012 14:59:09 for Workout With Friends by
1.8.1.2