On Jan 2, 2019 2:03 AM, "Suresh" <[email protected]> wrote: > > def chapter(request, course_name=None, slug=None): > place = Chapter.objects.get(course__course_name=course_name, slug=slug) > > add_link_form = AddLinkForm(request.POST or None) > add_txt_form = AddTxtForm(request.POST or None) > file_upload_form = FileUploadForm(request.POST or None, request.FILES or None) > > queryset_txt_block = TextBlock.objects.filter(text_block_fk__id= place.id) > queryset_yt_link = YTLink.objects.filter(yt_link_fk__id=place.id) > queryset_files = FileUpload.objects.filter(file_fk__id=place.id) > > context = { > "title": place.chapter_name, > "course_name": course_name, > "slug": slug, > "add_link_form": add_link_form, > "add_txt_form": add_txt_form, > "queryset_yt_link": queryset_yt_link, > "queryset_txt_block": queryset_txt_block, > "queryset_files": queryset_files, > "path": "Profile", > "redirect_path": "profile", > "file_upload_form": file_upload_form, > }
What would you like us to do? Personally I won't / can't do anything with the code you sent because I don't know what error you got nor do I know the environment in which you run that code. I sure wish my crystal ball ball was working. If I ran that code I would get an error reporting unknown name Chapters. So give us enough so that we could at least get started. If you got a trace back please copy and paste the entire traceback. If you included an attachment it did not come through. Bob Gailer -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAP1rxO4mECG4b81R%3DN6xWjzvE6ewC5Y7y4Q6AbZbonT_RzDc7A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

