开发者

Is there a way to add fields onto Django's Sites Framework?

开发者 https://www.devze.com 2023-03-24 08:18 出处:网络
I really like the idea of the sites framework for making an application functional across multiple web sites. Is there a way to add fields ont开发者_如何学Goo the Site object for the database, or shou

I really like the idea of the sites framework for making an application functional across multiple web sites. Is there a way to add fields ont开发者_如何学Goo the Site object for the database, or should I just create a foreign-key one-to-one relationship?


Yes, use a model with a unique foreign key. Django will add it to Site as a reverse relationship.

0

精彩评论

暂无评论...
验证码 换一张
取 消