November 2015
Beginner to intermediate
840 pages
26h 30m
English
Startup Objects in a View with StartupFormIt should come as no surprise that the views to interact with StartupForm and NewsLinkForm to create new objects will be almost identical to TagCreate or PostCreate.
For StartupCreate, as you can see in Example 9.28, the only differences are these:
1. The value of the class attribute template_name
2. The value of the class attribute form_class
Example 9.28: Project Code
organizer/views.py in 59bb59cf69
5 from .forms import StartupForm, TagForm . ... 9 class StartupCreate(View): 10 form_class = StartupForm 11 template_name = 'organizer/startup_form.html' 12 13 def get(self, request): 14 return render( 15 request, ...
Read now
Unlock full access