Django multiple databases router(Cross-database foreign key)

2011-03-24 Thread dy
Hi django devs, I have two models and need to store to different dbs.I want this field to be a foreign key from Test2, stored on the "test2" database, to the Test1 model stored on the "default" database.The codes are: # model in app test1,store to default class Test1(models.Model): name = mod

Separate context and rendering in forms

2021-03-14 Thread dy...@dyve.net
I've been working on packages that generate HTML based on Django forms for a while. I find myself duplicating certain parts of Django code, because there is no clear separation of the context (as in template context) that is being generated, and the HTML output. A small example of this is the code