James Bennett wrote:
> Otherwise, the admin will only be able to show objects for the site
> that's hosting it.
and that is what I want to do, when I use
objects = CurrentSiteManager()
site = models.ForeignKey(Site)
Admin Panel list all objects from the table but allows to edit only
those from
On 9/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> objects = CurrentSiteManager()
> site = models.ForeignKey(Site)
Just keep in mind that if you want to share an instance of the admin
across multiple sites *and* use the CurrentSiteManager, you need to do
this:
objects = models.Manager()
o
[EMAIL PROTECTED] wrote:
> using Sites is good for forums and wikis...
not "is" but "isn't" :)
--~--~-~--~~~---~--~~
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
using Sites is good for forums and wikis... and it require some
hacking... unless I cheat :)
hm... If I add:
objects = CurrentSiteManager()
site = models.ForeignKey(Site)
to each of my models classes it seems that it will do the hacking part
for non Admin Panel views, now how to make Admin Panel
I actually looked into this yesterday and came up with the following
modification to db/models/options.py around line 37
def __setattr__(self, name, value):
if (settings.DB_PREFIX != '' and name == 'db_table' and value !=
''):
self.__dict__[name] = DB_PREFIX + "_" + value
else:
On 8/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I want to make few sites which will use the same django apps and the
> problem is with table prefixes as using one database would be nice.
> There is db_table for my tables but django tables can't be changed that
> way - users and permissi
6 matches
Mail list logo