Django get field rendering as string -


How do I get field rendering from html after the form init?

I am trying to add custom HTML in the form like this:

  class baseform (form): render_port = forms Booleanfield (required = false, initial = false) def __init __ (self, * args, ** kwargs): super (baseform, self) .__ init __ (* args, ** kwargs) html_rendering = str (self.fields [ 'Render_report'])  

conflicting part str (self.fields ['render_report']) . How do I get the html rendering of render_report? Of course, str () does not work.

After some headbanking, here is the catch: _ _ fetch__ of the rendered field form _ _ ( ).

So I had to change self ['render_report]' for self.fields ['render_report'] ]]


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -