下面是我在Django 1.9.7中的models.py。从python manage.py shell执行以下Sub CheckValues(Target As Range, day As String)
If Target.value >= 0.6666 Then
Worksheets("ActivityTracker").ChartObjects(day & " Total Hours").Chart.SeriesCollection(1).Interior.Color = RGB(255, 204, 0)
MsgBox ("Warning: You have exceeded 16 hours on " & day & vbNewLine & "Current Time: " & Target.value * 24)
Else
Worksheets("ActivityTracker").ChartObjects(day & " Total Hours").Chart.SeriesCollection(1).Interior.Color = RGB(0, 102, 204)
End If
End Sub
会产生此错误
Book.object.title_count('book')
。
它是否在BookManager中定义?
AttributeError: 'Manager' object has no attribute 'title_count'
答案 0 :(得分:0)
我认为你的意思是对象 s :
Book.objects.title_count('book')
^