Ejemplo n.º 1
0
    def __init__(self, parser=None):
        """ Init class to manage parse argument """

        Server.__init__(self, parser)
        self.rest_method = "ecriture"
        self.database = (DBEcriture,)
        self.tag = None
        self.tag_id = None
        self.cache_categorie = None
        if self.attribut.has_key('tag'):
            self.tag = self.attribut['tag']
            del self.attribut['tag']
        if self.options.cmd == 'list' and \
                not self.filter.has_key('compte_id'):
            print "-f compte_id=<id> is mandatory"
            sys.exit(1)
        if self.options.cmd == 'create' and \
                not self.attribut.has_key('compte_id'):
            print "-a compte_id=<id> is mandatory"
            sys.exit(1)
Ejemplo n.º 2
0
Archivo: tag.py Proyecto: micmc/compta
 def __init__(self, parser=None):
     """ Init class to manage parse argument """
     Server.__init__(self, parser)
     self.rest_method = "tag"
     self.database = (DBTag,)
Ejemplo n.º 3
0
    def __init__(self, parser=None):
        """ Init class to manage parse argument """

        Server.__init__(self, parser)
        self.rest_method = "categorie"
        self.database = (DBCategorie,)