arrange date-products data on admin

17 lượt xem
Chuyển tới thư đầu tiên chưa đọc

Jun Tanaka

chưa đọc,
01:42:40 27 thg 9, 201427/9/14
đến 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

chưa đọc,
15:57:34 29 thg 9, 201429/9/14
đến 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.

Trả lời tất cả
Trả lời tác giả
Chuyển tiếp
0 tin nhắn mới