Need help on RedirectView

10 views
Skip to first unread message

Hello Singh

unread,
Jun 20, 2021, 8:21:48 AM6/20/21
to django...@googlegroups.com
Now I am trying Django class based view through Django documentation it going well, but I a problem in RedirectView.

There is `update_counter()` method I don't understand what it is doing and where it come from. I highlight it in the given image.

Please help me
Thanks developers
IMG_20210620_173106.jpg

David Nugent

unread,
Jun 20, 2021, 8:52:36 AM6/20/21
to django...@googlegroups.com
It is just a method on the Article model. Don't copy-paste what is there, understand what it is doing.

In this example, update_counter() will be defined in Article(models.Model), probably in models.py in the app. You obliged to use anything like this in your redirect.

HTH,

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEoS0z44Zkf2TJNuay6AU1imCdu5ALmuHSzxJxLtgKS_R69wfQ%40mail.gmail.com.

Hello Singh

unread,
Jun 20, 2021, 9:16:47 AM6/20/21
to django...@googlegroups.com
Thanks, David Sir
It help me a lot.

Reply all
Reply to author
Forward
0 new messages