Thank you very much Pankaj Palmate, I really appreciate it. I have tried using def get(self, request, *args, **kwargs) but This method is not been invoked, Actually the thing is that, I am calling this ClassBasedView by an anchor tag, which passes URL to this link and I need to get the information in which is present in the URL, I am confused, weather the request initiated by an anchor tag is a get request or not, Indeed get method does not worked here,
I once again thank you very much pankaj palmate On Tue, Nov 16, 2021 at 9:41 AM pankaj palmate <pankajpalmate61...@gmail.com> wrote: > Also request in def get itself > > On Tue, 16 Nov, 2021, 9:40 am pankaj palmate, < > pankajpalmate61...@gmail.com> wrote: > >> def get(self, pk, *args,**kwargs ) : >> .......body.......... >> >> On Tue, 16 Nov, 2021, 2:57 am Aadil Rashid, <aadil10121...@gmail.com> >> wrote: >> >>> Hello my dear Friends, I have a question regarding Class Based Views. >>> >>> If we have a url e.g, >>> path('item/<str:slug>/', views.funView) >>> >>> We can handle it in Function Based Views, >>> By simply >>> def funView(request, slug) : >>> #logic >>> return render(request, "tempName") >>> >>> >>> We can even pass this slug as a context in this template, >>> >>> >>> My question is how can we achieve this by using class Based Views. >>> >>> >>> Thanks in advance. >>> >>> -- >>> 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 django-users+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/CAAYXZx_Sn2BBhPWZXi_zEECN-x7wu9sDQJfYeVH31oHhemptpQ%40mail.gmail.com >>> <https://groups.google.com/d/msgid/django-users/CAAYXZx_Sn2BBhPWZXi_zEECN-x7wu9sDQJfYeVH31oHhemptpQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > 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 django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAPyMU1%2BNbEnuO6nDL_hmo6zqVq6cE7SN%3DciA_JgbyZxwcft0Pw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAPyMU1%2BNbEnuO6nDL_hmo6zqVq6cE7SN%3DciA_JgbyZxwcft0Pw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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 django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAYXZx9-Jx3Cm7TzU-weg8Q1gMh203L3ssGThSZh4Uy%3DQM5RLg%40mail.gmail.com.