One admin for multiple sites

Posted by valya on Stack Overflow See other posts from Stack Overflow or by valya
Published on 2010-04-05T09:34:24Z Indexed on 2010/04/05 9:43 UTC
Read the original article Hit count: 525

Filed under:
|
|

I have two sites with different SITE_IDs, but I want to have only one admin interface for both sites.

I have a model, which is just an extended FlatPage:

# models.py
class SFlatPage(FlatPage):
    currobjects = CurrentSiteManager('sites')

    galleries = models.ManyToManyField(Gallery)
    # etc

# admin.py
class SFlatPageAdmin(FlatPageAdmin):
    fieldsets = None

admin.site.register(SFlatPage, SFlatPageAdmin)
admin.site.unregister(FlatPage)

I don't know why, but there are only pages for current site in admin interface. On http://site1.com/admin/ I see flatpages for site1, on http://site2.com/admin/ I see flatpages for site2. But I want to see all pages in http://site1.com/admin/ interface! What am I doing wrong?

© Stack Overflow or respective owner

Related posts about django

Related posts about django-sites