コード例 #1
0
ファイル: run.py プロジェクト: campaigncollege/cleansweep
        print __doc__
    elif "--load" in sys.argv:
        from cleansweep.loaddata import main
        root_dir = sys.argv[1+sys.argv.index("--load")]
        main(root_dir)
    elif "--load-files" in sys.argv:
        from cleansweep.loaddata import main_loadfiles
        sys.argv.remove("--load-files")
        filenames = sys.argv[1:]
        main_loadfiles(filenames)
    elif "--add-member" in sys.argv:
        from cleansweep.loaddata import add_member
        index = sys.argv.index("--add-member")
        place = sys.argv[index+1]
        name = sys.argv[index+2]
        email = sys.argv[index+3]
        phone = sys.argv[index+4]
        add_member(place, name, email, phone)
    elif "--worker" in sys.argv:
        from cleansweep.core.mailer import run_worker
        run_worker()
    elif "--init" in sys.argv:
        from cleansweep.loaddata import init
        init()
    else:
        try:
            port = int(sys.argv[1])
        except IndexError:
            port = 5000
        main(port=port)
コード例 #2
0
ファイル: manage.py プロジェクト: RaghavPro/cleansweep
def add_member(place, name, email, phone):
    "Adds a member to the database."

    from cleansweep.loaddata import add_member

    add_member(place, name, email, phone)
コード例 #3
0
ファイル: manage.py プロジェクト: yashodhank/cleansweep
def add_member(place, name, email, phone):
    "Adds a member to the database."

    from cleansweep.loaddata import add_member
    add_member(place, name, email, phone)