def display(request): try: instance=Student.objects.get(email_id=request.user.email) except: return info(request) makers_board=MakersBoard.objects.filter(show=True) class_name=instance.class_name school_name=instance.school_name news_list=News.objects.raw("SELECT * FROM news_news WHERE for_class = %s and for_school=%s and show='1' ORDER BY news_date DESC", [class_name,school_name]) return render(request,'news/display.html',{'news_list': news_list,'student':instance,'makers':makers_board})
def index(request): try: instance=Student.objects.get(email_id=request.user.email) except: return info(request) for_class=str(instance.class_name) makers_board=MakersBoard.objects.filter(show=True) lesson_list=Lesson.objects.order_by('-added_date') context={'lesson_list':lesson_list,'student':instance,'class_name':for_class,'makers':makers_board} return render(request,'content/index.html',context)
def index(request): try: instance=Student.objects.get(email_id=request.user.email) except: return info(request) class_name=instance.class_name school_name=instance.school_name makers_board=MakersBoard.objects.filter(show=True) question_list=Question.objects.raw("SELECT * FROM discussions_question WHERE for_class = %s and for_school=%s and show='1' ORDER BY pub_date DESC", [class_name,school_name]) context = {'latest_question_list': question_list,'student':instance,'makers':makers_board} return render(request, 'discussions/discuss.html', context)
def index(request): try: instance=Student.objects.get(email_id=request.user.email) except: return info(request) class_name=instance.class_name school_name=instance.school_name makers_board=MakersBoard.objects.filter(show=True) question_list=Question.objects.raw('SELECT * FROM discussions_question WHERE for_class = %s and for_school=%s and show=1 ORDER BY pub_date DESC', [class_name,school_name]) context = {'latest_question_list': question_list,'student':instance,'makers':makers_board} return render(request, 'discussions/discuss.html', context)
def display(request): try: instance = Student.objects.get(email_id=request.user.email) except: return info(request) makers_board = MakersBoard.objects.filter(show=True) class_name = instance.class_name school_name = instance.school_name news_list = News.objects.raw( 'SELECT * FROM news_news WHERE for_class = %s and for_school=%s and show=1 ORDER BY news_date DESC', [class_name, school_name]) return render(request, 'news/display.html', { 'news_list': news_list, 'student': instance, 'makers': makers_board })