In recent years REST (REpresentational State Transfer) has emerged as the standard architectural design for web services and web APIs. In this article I'm going to show you how easy it is to create a RESTful web service using Pythonand the Flask microframework. What is REST? The characteristics of a REST system are defined by six design rules: Client-Server: There … Continue reading Designing a RESTful API with Python and Flask
Testing Flask Applications¶
The origin of this quote is unknown and while it is not entirely correct, it is also not far from the truth. Untested applications make it hard to improve existing code and developers of untested applications tend to become pretty paranoid. If an application has automated tests, you can safely make changes and instantly know … Continue reading Testing Flask Applications¶
Sql query in Odoo model
@api.multi def get_all_so(self, name=None): sql = "select * from sale_order where name like '%s%' order by name desc;" % name self.env.cr.execute(sql) res_all = self.env.cr.fetchall() #fetchall() will return an array of dictionaries return res_all @api.multi def get_so(self, name=None): sql = "select * from sale_order where name like '%s' order by name desc;" % name self.env.cr.execute(sql) #fetchone() … Continue reading Sql query in Odoo model
Welcome to My New Blog
Be yourself; Everyone else is already taken. — Oscar Wilde. This is the first post on my new blog. I’m just getting this new blog going, so stay tuned for more. Subscribe below to get notified when I post new updates.
