Open GoogleCodeExporter opened 9 years ago
That seems like a good idea for me. But I can't really give you that much help
for
the moment.
If you can provide a patch that doesn't break any tests and cause big
performance
issues I will definitely include it in the code base.
Original comment by batiste....@gmail.com
on 13 Aug 2009 at 5:00
Hi,
Here is a patch I put together and that almost pass with all the tests. The
only big
problem is that it's quite difficult to make the site framework with a generic
key:
{{{
def get_content_slug_by_slug(self, slug):
"""Returns the latest :class:`Content <pages.models.Content>`
slug object that match the given
slug for the current site domain."""
content = self.filter(
type='slug',
content_type=PAGE_CTYPE,
body=slug
)
# this will not work with related object
if settings.PAGE_USE_SITE_ID:
content = content.filter(related_object__sites__id=settings.SITE_ID)
}}}
But it could be easily re factored to avoid this complicated SQL request.
What do you think? Is this detached really a useful feature? I am not 100%
convinced
myself about this.
Original comment by batiste....@gmail.com
on 29 Aug 2009 at 11:31
Attachments:
Original issue reported on code.google.com by
oli-...@thepcspy.com
on 4 Aug 2009 at 12:21