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()
def __init__(self, *args, **kwargs): super(VenteAdmin, self).__init__(*args, **kwargs) self.model.session = Session.current_session()
def __init__(self, *args, **kwargs): super(VenteAdmin, self).__init__(*args, **kwargs) print(Session.current_session()) self.model.session = Session.current_session()
def acceuil(request): return render_to_response('encefal/index.html', {'next_session':Session.next_session(), 'current_session':Session.current_session()}, RequestContext(request))
def acceuil(request): return render_to_response( 'encefal/index.html', { 'next_session': Session.next_session(), 'current_session': Session.current_session() }, RequestContext(request))