Example #1
0
def guest_index(request):
    doctors = DoctorDb().select();
    patients = PatientDb().select();
    context={
        'menu':1,
        'section':'guest_index.html',
        'doctNum':doctors.index(doctors[-1]) + 1,
        'patNum':patients.index(patients[-1]) + 1,
    };
    return render(request, 'guest_base.html', context);
Example #2
0
def index(request):
    doctors = DoctorDb().select();
    patients = PatientDb().select();
    context={
        'menu':1,
        'section':'index.html',
        'doctNum':doctors.index(doctors[-1]) + 1,
        'patNum':patients.index(patients[-1]) + 1,
        'loginuser': DoctorDb().selectone(request.session['suser']),
    };
    return render(request, 'base.html', context);