Login

Tag "_html_output"

Snippet List

Changing the look of newforms as_table with a custom BaseForm

I wanted to mark rows with an erroneous input with 'class="error"' and move the errorlist below the input tag so I wrote a NormalRowFormatter which behaves like a format string by overwriting \_\_mod\_\_. Examples: class MyForm(PrettyBaseForm, forms.Form): # add your fields here SomethingForm = form_for_model(Something, form=PrettyBaseForm)

  • newforms
  • error
  • baseform
  • as_table
  • pretty
  • prettybaseform
  • _html_output
  • style
Read More

1 snippet posted so far.