Opened 10 years ago
Closed 10 years ago
#24582 closed Uncategorized (worksforme)
ModelAdmin.delete_view(). List of items on level 3 not converted to html list
Reported by: | Никита Шультайс | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.8 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Attachments (1)
Change History (5)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
My models
# -*- coding: utf-8 -*- import uuid from django.db import models from django.contrib.postgres.fields import ArrayField, HStoreField, IntegerRangeField from django.contrib.auth.models import User class Category(models.Model): name = models.CharField(max_length=100) class Meta: verbose_name = u"category" verbose_name_plural = u"categories" ordering = ("name",) def __unicode__(self): return self.name class Product(models.Model): active = models.BooleanField(default=True) category = models.ForeignKey( Category, default=None, null=True, verbose_name=u"category", ) name = models.CharField(max_length=100) price = models.DecimalField(decimal_places=0, max_digits=10, blank=True, default=0) quantity = models.IntegerField(default=0) # Для Postgresql sizes = ArrayField( base_field=models.IntegerField(), size=8, verbose_name=u"Sizes", blank=True, null=True, default=None ) sizes_full = HStoreField( u"Sizes and quantity", blank=True, null=True, default=None ) age = IntegerRangeField(blank=True, null=True, default=None) class Meta: verbose_name = u"product" verbose_name_plural = u"products" def __unicode__(self): return self.name COLORS = [ ["", u"---"], ["black", u"black"], ["white", u"white"], ["red", u"red"], ["blue", u"blue"], ["green", u"green"], ["yellow", u"yellow"], ] class ProductVideo(models.Model): product = models.ForeignKey(Product) duration = models.DurationField() code = models.TextField(u"YouTube code") class Meta: verbose_name = u"video" verbose_name_plural = u"video" def __unicode__(self): return u"video %s" % self.id class Color(models.Model): product = models.ForeignKey(Product) color = models.CharField(max_length=10, default="", choices=COLORS) quantity = models.IntegerField(default=0) class Meta: verbose_name = u"color" verbose_name_plural = u"colors" unique_together = ("product", "color") def __unicode__(self): return u"%s: %s" % (self.product.name, self.get_color_display()) class Order(models.Model): user = models.ForeignKey(User, verbose_name=u"user") id = models.UUIDField(primary_key=True, editable=False, default=uuid.uuid4) product = models.ForeignKey(Product) quantity = models.IntegerField(default=1) class Meta: verbose_name = u"order" verbose_name_plural = u"orders" def __unicode__(self): return u"Order %s" % self.id
comment:3 by , 10 years ago
I couldn't reproduce your screenshot. Attaching a screenshot of what I see.
by , 10 years ago
Attachment: | admin-delete-category.png added |
---|
comment:4 by , 10 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Please reopen if you can provide more detailed steps, thanks!
Note:
See TracTickets
for help on using tickets.
Could you please share your models? I couldn't reproduce this from the relationships you described. Here is what I tried: