def get_initial(self): initial = FormView.get_initial(self) for field_name in ['title', 'content']: session_key = 'unsaved_article_%s_%d' % (field_name, self.article.id) if session_key in self.request.session: content = self.request.session[session_key] initial[field_name] = content del self.request.session[session_key] return initial
def get_initial(self): initial = FormView.get_initial(self) initial["name"] = self.kwargs["pk"] return initial
def get_initial(self): initial = FormView.get_initial(self) initial['start'] = now() return initial
def get_initial(self): """ Automatically fills form fields for authenticated users. """ return FormView.get_initial(self)