简体   繁体   中英

Django - Is there any way to generate some HTML parts on the fly without using the minidom or lxml libs?

I am trying to generate some HTML parts in a template directly using Django and python without the Django templating Engine, is there any way to do that just with what Django offers ?

NB: the main reason is that I don't have a model for the data i am trying to make forms for, so using 'ModelForm' is not an option for me since it require an ORM model, witch I don't have !

Cheers mates,

The best solution is to use Django Template Engine as @Daniel Roseman suggested. Specifically using the Forms without any bound to any Model is the solution i was looking for, here is SOF link: Can I have a Django form without Model

Hope this can help someone in the future, Thanks all for your suggestions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM