| 
                
               | 
              
                
               | 
              
                @@ -1,14 +1,16 @@ 
               | 
            
            
            
              | 
                1
               | 
              
                1
               | 
              
                 # -*- coding: utf-8 -*- 
               | 
            
            
            
              | 
                2
               | 
              
                2
               | 
              
                  
               | 
            
            
            
              | 
                
               | 
              
                3
               | 
              
                +from djadmin import ReadOnlyModelAdmin 
               | 
            
            
            
              | 
                3
               | 
              
                4
               | 
              
                 from django.contrib import admin 
               | 
            
            
            
              | 
                4
               | 
              
                5
               | 
              
                  
               | 
            
            
            
              | 
                5
               | 
              
                6
               | 
              
                 from pay.models import OrderInfo 
               | 
            
            
            
              | 
                6
               | 
              
                7
               | 
              
                  
               | 
            
            
            
              | 
                7
               | 
              
                8
               | 
              
                  
               | 
            
            
            
              | 
                8
               | 
              
                
               | 
              
                -class OrderInfoAdmin(admin.ModelAdmin): 
               | 
            
            
            
              | 
                9
               | 
              
                
               | 
              
                -    readonly_fields = ('order_id', 'prepay_id', 'transaction_id', 'unifiedorder_result', 'notify_msg')
               | 
            
            
            
              | 
                
               | 
              
                9
               | 
              
                +class OrderInfoAdmin(ReadOnlyModelAdmin, admin.ModelAdmin): 
               | 
            
            
            
              | 
                10
               | 
              
                10
               | 
              
                     list_display = ('order_id', 'photo_type', 'photo_status', 'from_uid', 'to_uid', 'pay_status', 'paid_at', 'reback_status', 'reback_at', 'status', 'created_at', 'updated_at')
               | 
            
            
            
              | 
                11
               | 
              
                11
               | 
              
                     list_filter = ('photo_type', 'photo_status', 'pay_status', 'reback_status', 'status')
               | 
            
            
            
              | 
                
               | 
              
                12
               | 
              
                +    readonly_fields = ('order_id', 'prepay_id', 'transaction_id', 'unifiedorder_result', 'notify_msg')
               | 
            
            
            
              | 
                
               | 
              
                13
               | 
              
                +    search_fields = ('prepay_id', 'transaction_id', 'group_id', 'session_id', 'photo_id', 'lensman_photo_id', 'from_uid', 'to_uid')
               | 
            
            
            
              | 
                12
               | 
              
                14
               | 
              
                  
               | 
            
            
            
              | 
                13
               | 
              
                15
               | 
              
                  
               | 
            
            
            
              | 
                14
               | 
              
                16
               | 
              
                 admin.site.register(OrderInfo, OrderInfoAdmin) 
               |