Login

Snippets by danigm

Snippet List

Declaring django views like web.py views

I work a little with [web.py framework](http://webpy.org/) and I like a lot the view definition. For each view you define a class and in that class you can define two method, GET and POST. If the http request is a GET request the GET method will be called and if http request is a POST request the POST method is called. Then you can define common stuff in another method that could be called inside each method, and you have a class for each view.

  • views
  • class
  • web.py
Read More

danigm has posted 1 snippet.