Display some free text in between Django Form fields

前端 未结 8 665
无人及你
无人及你 2021-02-04 09:00

I have a form like the following:

class MyForm(Form):

  #personal data
  firstname = CharField()
  lastname = CharField()

  #education data
  university = Char         


        
8条回答
  •  庸人自扰
    2021-02-04 09:07

    For those into a similar situation as the author, I recommend falling back to CSS and the :before and/or :after pseudoselectors either on the input or the label elements of the form. They work just as well and could make your life a lot easier as you can still use {{ form.as_p }}.

提交回复
热议问题