2012-03-01 66 views
0

diclaimer:我是新來的蟒蛇,但有在Drupal初學者:Python或Django的is_new

編程經驗

我在這裏以下教程(http://www.djangobook.com/en/2.0/chapter08/ ),其中作者寫道以下

def foo_view(request): 
    m_list = MyModel.objects.filter(is_new=True) 
    return render_to_response('template1.html', {'m_list': m_list}) 

我搜索,網上書(沒有給出的解釋),印刷蟒蛇.096版的書(沒有給出解釋),並隨機通過谷歌(會話光引用搜索),但我仍然不確定什麼是新的意思,特別是在這種情況下。

想法?

+0

愛是愛的越來越絆倒的東西叫做'is_new'因爲你是新的諷刺)。 – 2012-03-01 20:40:32

+0

哈哈! is_amused – 2012-03-01 21:22:56

回答

1

is_new是一個場,使模型

+1

Doh!謝謝一堆! – 2012-03-01 20:04:16