Hi Folks,

I'm trying to build a web app that has many sites, all of which share the same 
code and database.  I'm therefore using the Sites framework, but I need to 
hide the site that is being edited in the admin.

I have done this where my model has a Foreign Key of site, mainly by defining 
the link as follows:

site = 
models.ForeignKey(Site,default=Site.objects.get_current().id,editable=False)

this is a foreign key to site, where the default is the current site, and the 
user can't edit it in the admin.

This is fine, but I've just started using Flatpages (and 
http://code.google.com/p/django-databasetemplateloader/) to manage the HTML 
in my site.  Both of these have many to many links, and as they're in 
contrib, I can't easily change the model without copying it.

Is there a way to default the Site in Flatpages (to a single site even though 
it's a many to many) and not have it editable in new forms admin?

Thanks,

Tim.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to