Posted by romankrv |
|
Hi Herbert.
Can I use several a "Group" sphene. That is: in urls.py I sets dict as : defaultdict = { 'groupName': settings.NAME_GROUP_FORUM } but I want to use several groupName. Is it possible? What i must sets yet |
|
Posted by Herbert Poul |
|
community groups work best with the sphene.community.middleware.GroupMiddleware (and by setting the configuration setting 'SPH_HOST_MIDDLEWARE_URLCONF_MAP' - see the default settings_local.py provided by the CommunityDraft project.
if you require different groups for a single domain.. let me know your usecase, it can probably be solved without different community groups. Hey, we have Signatures !!! Great, isn't it ? ;) |
|
Posted by eXt |
|
Interesting topic, but I have an opposite question.
Is it possible to only have one group defined in urls.py and not to use neither GroupMiddleware, ThreadLocalsMiddleware, MultihostMiddleware nor navigation context processor? I've been testing such a configuration for a while (I use only board) and it looks it works well. I don't want to use these middlewares to avoid unnecessary processing as well as avoid Site switching which is done in community.middleware.py: def my_get_current(self): group = get_current_group() if not group: from django.conf import settings return self.get(pk=settings.SITE_ID) else: return Site( domain = group.baseurl, name = group.name ) The above caused some problems to me when using sitemaps generated for flatpages. I was getting: ValueError: 'Site' instance needs to have a primary key value before a many-to-many relationship can be used which is raised when m2m relation is used on object that is not saved (and dynamically created Site isn't saved). So to summarize: are all these middlewares really needed to run board? |
Please login to post a reply.