O'Reilly logo

Django Unleashed by Andrew Pinkham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9.2.2 Implementing a Webpage to Create Tags

We now understand the behavior necessary for creating webpages that interact with Django forms. In the next two subsections, we create a view based on the pseudocode we just built, followed by the creation of a URL pattern for our view.

9.2.2.1 Implementing TagCreate

We can now program a function view for creating a Tag object by translating the pseudocode from the end of last section into Python. Open /organizer/views.py and create a basic function view called tag_create(), as shown in Example 9.5.

Example 9.5: Project Code

organizer/views.py in 25b7d634af

23   def tag_create(request): 24   pass

We can take the pseudocode from the last section and fill in the view with comments. Our first goal ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required