Opened 4 years ago
Closed 4 years ago
#32194 closed Bug (invalid)
Issue while rendering view with Django 3.1.3.
Reported by: | @deathdater | Owned by: | nobody |
---|---|---|---|
Component: | Generic views | Version: | 3.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
def studiolist_page(request,*args,**kwargs): studiomaster={'studio_master_key':StudioMaster.objects.all()} studiolist_all=StudioDetails.objects.filter(studio_status=10) city_query=request.GET.get("cty") studio_type_query=request.GET.get("s_type") genre_query=request.GET.get("gnre") baseprice_query=request.GET.get("price") studiolist={'studio_list_key':studiolist_all} print(6) x=len(studiolist.get('studio_list_key')) if x==0: y='Sorry!! No Studios Available Here !!' else: y=str(x)+' Fresh Studios Served !!' messages.success(request,y) return render(request,'studiomaster/studiocard_list.html',studiolist,studiomaster)
I also have tried changing the template to find if its an issue with html, but the result is same, So I assume that it might be something to do with the View handling itself.
To my surprise this works fine in Django 2.2 but loads html code on the browser when being rendered so the template is being called but the loading has some abnormal behaviour .
Any help here is greatly appreciated.
Attachments (1)
Change History (2)
by , 4 years ago
Attachment: | Screen Shot 2020-11-14 at 12.05.10 PM.png added |
---|
comment:1 by , 4 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Summary: | Issue while rendering view with Django 3.1.3 using render function that works fine with Django 2.2 → Issue while rendering view with Django 3.1.3. |
Note:
See TracTickets
for help on using tickets.
It looks that you passed
studiomaster
to thecontent_type
which is not correct. Please don't use Trac as a support channel and use one of them in you have further questions.Closing per TicketClosingReasons/UseSupportChannels.