Найти - Пользователи
Полная версия: AttributeError
Начало » Центр помощи » AttributeError
1
Sodia
Dobry den'. Pomagite ne poimy ge oshibsya

 from Main.models import BTZ, TYPE_CHOICES
@render_to('studentside/student_btz.html')
def student_btz(request):
    semester = Settings.objects.all()[0].current_semester
    stream = request.session["current_stream"]
    btzs = BTZ.objects.filter(specialty=stream.direction.specialty, course=stream.course, study_language=stream.study_language,semester=semester).order_by('type', 'subject', 'department')
    d = dict(TYPE_CHOICES)
    for btz in btzs:
        btz.type = d[btz.type]
    return {"btzs": btzs}

Oshibka
AttributeError at /student/student_btz/
'NoneType' object has no attribute ‘direction’
FishHook
Eto znachit, chto v request.session net klucha “current_stream”
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB