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 onto the Site
object for the database, or should I just create a foreign-key one-to-one relationship?
Asked
Active
Viewed 538 times
2

Naftuli Kay
- 87,710
- 93
- 269
- 411
1 Answers
6
Yes, use a model with a unique foreign key. Django will add it to Site as a reverse relationship.

Cat Plus Plus
- 125,936
- 27
- 200
- 224
-
So there's no way of directly associating it so it doesn't have to `join` it in SQL? Otherwise, you've answered my question :) – Naftuli Kay Jul 31 '11 at 21:13
-
@TKKocheran: Without editing contrib.site.models, or replacing contrib.site entirely, no. – Cat Plus Plus Jul 31 '11 at 21:44