Hello
I look the example in the book but i have a question, i need to delete
one record but i have no idea how to do:
for add a record i do as follow:
def magazz(self, *args, **kwargs):
                if args and args[0] == 'add':
                        b=""
                        submit_action = "/salva_nuovo/0"
                if args and args[0] == 'edit':
                        from sqlobject import SQLObjectNotFound
                        try:
                                b=Magazzino_fo.get(args[1])
                                values =kwargs
                        except SQLObjectNotFound:
                                values = ""
                                flash = "Questo materiale non esiste ne voui 
aggiungere uno
nuovo?"
                        submit_action = "/salva_nuovo/%s" %args[1]
                return dict(form=magazzinofo_form, values=b, 
action=submit_action)
def salva_nuovo(self, ID, **kwargs):
                print 'salvato(): ID=', ID, 'Kwargs=', kwargs
                from sqlobject import SQLObjectNotFound
                try:
                        b=Magazzino_fo.get(ID)
                        b.set(**kwargs)
                except SQLObjectNotFound:
                        Magazzino_fo(**kwargs)
                raise redirect("/index")

But if i have to delete the record i don't know what to do

Can you help me pls
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to