1

I am using Pyforms for generating forms. But, I have to use stylesheet/css/html-api in my pyforms. I also follow step which have been given on this link. I want to know how to add css and making my layout beautiful. Can you please give me a better solution for that

jpaugh
  • 6,634
  • 4
  • 38
  • 90
Ashish Aware
  • 169
  • 2
  • 15

2 Answers2

1

If you're using the PyForms version 3.0, you can do this:

  1. Import the settings

    from pyforms import settings as formSettings
    
  2. Modify the PYFORMS_STYLESHEET variable

    formSettings.PYFORMS_STYLESHEET = cssFilePath
    

It works for me.

0

Youu can add a css stylesheet by importing settings and adding a settings.py file where you reference the css file.

from pysettings import conf
import settings
conf+=settings

settings.py

PYFORMS_STYLESHEET = "stylesheet.css"

See the accompany tutorial.

Error404
  • 719
  • 9
  • 30