Anonymous user
Boston Python Workshop/Saturday/Web app project: Difference between revisions
Boston Python Workshop/Saturday/Web app project (view source)
Revision as of 22:11, 5 March 2011
, 13 years ago→Finally: Write your first view
Line 520:
This is the simplest view possible. Save the views.py file, then go to "/polls/" in your browser, and you should see your text.
Now let's add a few more views by adding to the views.py file. These views are slightly different, because they take an argument (which, remember, is passed in from whatever was captured by the regular expression in the URLconf):
def detail(request, poll_id):
|