Exemple #1
0
 def list(self):
     """ Redefine list to print """
     Server.list(self)
     try:
         for categorie in self.rqst:
             print "%s, %s, %s" % (categorie["id"],
                                   categorie["nom"],
                                   categorie["count"]
                                  )
     except Exception as ex:
         print ex
Exemple #2
0
 def list(self):
     """ Redefine list to print """
     Server.list(self)
     try:
         for tag in self.rqst:
             print "%s, %s, %s" % (tag["id"],
                                   tag["nom"],
                                   tag["valeur"]
                                  )
     except Exception as ex:
         print ex
Exemple #3
0
 def list(self):
     """ Redefine list to print """
     Server.list(self)
     try:
         for compte in self.rqst:
             print "(%2d) - %s / %s, %s -  %s" % (compte["id"],
                                                  compte["nom"],
                                                  compte["type"],
                                                  compte["numero"],
                                                  compte["cle"]
                                                 )
     except Exception as ex:
         print ex
Exemple #4
0
 def list(self):
     """ Redefine list to print """
     Server.list(self)
     try:
         for montant in self.rqst:
             print "%s, %s, %s, %s, %s, %s" % (montant["id"],
                                               montant["montant"],
                                               montant["description"],
                                               montant["categorie_nom"],
                                               montant["categorie_id"],
                                               montant["ecriture_id"],
                                              )
     except Exception as ex:
         print ex
Exemple #5
0
 def list(self):
     """ Redefine list to print """
     Server.list(self)
     try:
         for banque in self.rqst:
             print "%s, %s %s %s - %s %s" % (banque["nom"],
                                             banque["adresse"],
                                             banque["cp"],
                                             banque["ville"],
                                             banque["code_banque"],
                                             banque["code_guichet"]
                                            )
     except Exception as ex:
         print ex
Exemple #6
0
 def list(self):
     """ Redefine list to print """
     Server.list(self)
     try:
         if isinstance(self.rqst, list):
             for response in self.rqst:
                 print "%s - %40s | %8s | %2s | %15s / (%s/%s)" % (response["date"],
                                                                   response["nom"],
                                                                   response["montant"],
                                                                   response["type"],
                                                                   response["categorie"],
                                                                   response["id"],
                                                                   response["montant_id"],
                                                                  )
         elif isinstance(self.rqst, dict):
             for key, value in self.rqst.iteritems():
                 print "%s -> %s" % (key, value)
     except Exception as ex:
         print ex
Exemple #7
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)
Exemple #8
0
 def __init__(self, parser=None):
     """ Init class to manage parse argument """
     Server.__init__(self, parser)
     self.rest_method = "tag"
     self.database = (DBTag,)
Exemple #9
0
    def __init__(self, parser=None):
        """ Init class to manage parse argument """

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