springform
raw JSON → 0.6.5 verified Sat May 09 auth: no python
A simple templating system for Python class files. Current version: 0.6.5. Release cadence: irregular.
pip install springform Common errors
error AttributeError: module 'springform' has no attribute 'Template' ↓
cause springform renamed Template to Form in version 0.4.0.
fix
Use
from springform import Form instead of Template. Warnings
gotcha Version 0.4.0 renamed `Template` to `Form`. If using older code, update imports and references. ↓
fix Replace `Template` with `Form` in your code.
gotcha Version 0.6.5 fixed a bug where base class was copied instead of inheriting class. Ensure you are using 0.6.5+ to avoid incorrect template replication. ↓
fix Upgrade to 0.6.5 or later.
Imports
- Form
from springform import Form
Quickstart
from springform import Form
# Define a form class
class MyForm(Form):
pass
# Create instance
form = MyForm()
print(form)