#2644: Object listing in Admin Panel lists all objects even when "objects"
manager
is changed
--------------------------------------------------+-------------------------
Reporter: Piotr Malinski <[EMAIL PROTECTED]> | Owner: adrian
Type: defect | Status: new
Priority: normal | Milestone:
Component: Admin interface | Version: 0.95
Severity: normal | Keywords:
--------------------------------------------------+-------------------------
For example a model class:
{{{
class Category(models.Model):
objects = CurrentSiteManager()
site = models.ForeignKey(Site, blank=True,
default=settings.SITE_ID)
cat_name = models.CharField(maxlength=255, verbose_name="Category
Name") # name of the category
cat_order = models.PositiveSmallIntegerField(default=0,
verbose_name="Order") # order of categories on the forum-categories list
class Meta:
verbose_name = "Category"
verbose_name_plural = "Categories"
class Admin:
list_display = ('cat_name', 'cat_order', 'site')
fields = (
(None, {
'fields': ('cat_name', 'cat_order')
}),)
def __str__(self):
return self.cat_name
}}}
It uses Sites to add/edit/show objects for current site by SITE_ID. The
problem is that in Admin Panel list of objects will show all objects, not
only from current site, while editing will work only for objects assigned
to current site (other will get Page not found (404) when trying to edit
them). Admin Panel should use THECLASS.objects.all() in this case...
--
Ticket URL: <http://code.djangoproject.com/ticket/2644>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---