arrange date-products data on admin

17 views
Skip to first unread message

Jun Tanaka

unread,
Sep 27, 2014, 1:42:40 AM9/27/14
to django...@googlegroups.com
Hello,

I have a question on a way to arrange date-products data on admin. I want to make it looke like 
date                  productA
09/26  9:00       5              
09/26 10:00      8              
09/26 13:00      4              
09/27  9:00       9              
09/27 10:00      4             
09/27 13:00      9              

|
|
|
V
date               09/26          | 09/27
9:00                 5                    9
10:00               8                    4
13:00               4                    9  


models.py
class Products(models.Model):
    date = models.DateTimeField(auto_now=True)
    productA = models. IntegerField()



I prefer to fix it within admin.py, not by editing HTML. 
Any advise would be appreciated.

Collin Anderson

unread,
Sep 29, 2014, 3:57:34 PM9/29/14
to django...@googlegroups.com
Django doesn't have a way to group items like that in the admin. Though, checkout out date_hierarchy if you haven't seen it.

Reply all
Reply to author
Forward
0 new messages