예제 #1
0
 def save_model(self, request, obj, form, change):
     obj.employe_id = self.model.employe.id
     # If the book is from this session
     if not self.model.session:
         session = Session.session_null()
     else:
         session = self.model.session
     obj.session_id = session.id
     obj.save()
예제 #2
0
 def __init__(self, *args, **kwargs):
     super(VenteAdmin, self).__init__(*args, **kwargs)
     self.model.session = Session.current_session()
예제 #3
0
파일: admin.py 프로젝트: marconius/EnceFAL
 def __init__(self, *args, **kwargs):
     super(VenteAdmin, self).__init__(*args, **kwargs)
     print(Session.current_session())
     self.model.session = Session.current_session()
예제 #4
0
파일: views.py 프로젝트: AESSUQAM/EnceFAL
def acceuil(request):
    return render_to_response('encefal/index.html',
                              {'next_session':Session.next_session(), 'current_session':Session.current_session()},
                              RequestContext(request))
예제 #5
0
def acceuil(request):
    return render_to_response(
        'encefal/index.html', {
            'next_session': Session.next_session(),
            'current_session': Session.current_session()
        }, RequestContext(request))