#24582: ModelAdmin.delete_view(). List of items on level 3 not converted to html
list
-------------------------------+--------------------------------------
     Reporter:  shultais       |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  new
    Component:  contrib.admin  |                  Version:  1.8
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by shultais):

 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

 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24582#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.86d6665ad5b972eeb62c3e2d6a186a48%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to