2011-07-02 2 views
0

이것은 내가 본 중에 가장 이상하고 비논리적 인 오류입니다. 나는 장고 + mongoengine을 사용하고 내보기는 말할 수 있어요 : index.html을 기사를 통해 내가 루프, 사람들은 항상 제시 할 때이상하게 이상한 django-mongoengine 오류

def index(request, template_name='index.html'): 

    articles = Article.objects.order_by('-date_added') 

    for i in articles: # test to see if the ordering works 
     print i.title # ok, prints correctly all the titles ordered_by "-date_added" 

    return render_to_response(template_name, locals(), context_instance=RequestContext(request)) 

그러나 같은 순서 ('DATE_ADDED')

order_by을했다 경우

취 했나요? 내가 놓친 게 있니? 어떤 제안? 이것은 나를 미치게 만들 것입니다. ...

답변

0

해독 : 이것은 실제로 몽고 엔진 버전과 관련된 문제였습니다. 그냥 mongoengine의 dev 지점에서 설치하십시오 ...

+0

어떤 버전의 버그가 있었습니까? – dcrosta

+0

지금도 사용할 수있는 솔루션입니다. 여기에 실제로 해결책을 찾은 곳이 있습니다. https://github.com/hmarr/mongoengine/issues/190 – hymloth