Hi guys,

I'm trying to solve a simple problem: add a message "You've logged out!" 
After redirecting user to login page. I got one nice solution at 
https://stackoverflow.com/questions/11393929/django-message-when-logout

from django.contrib.auth.views import LogoutView

class YourCustomLogoutView(LogoutView):

    def get_next_page(self):
        next_page = super(YourCustomLogoutView, self).get_next_page()
        messages.add_message(
            self.request, messages.SUCCESS,
            'You successfully log out!'
        )
        return next_page


This made me interested in checking what methods are available in 
LogoutView and which are good to be overloaded. I then was looking for the 
reference page in Django's doc.

I found several lines about `LogoutView` 
in 
https://docs.djangoproject.com/en/3.0/topics/auth/default/#django.contrib.auth.views.LogoutView,
 
but not every method of this class was given here. I know Django's doc has 
tutorials, topics and refs, ordered by detailedness. However, when I tried 
to use the search bar in django's website, also didn't get a ref page for 
LogoutView. (Also cannot find such a page in google)

This question can be generalized: If I'm looking for the detailed 
information of some django object, how can I obtain it efficiently?


Thanks and regards,
Zheng

-- 
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/f2c47ae9-63a6-437c-bd53-1ec9e75b520eo%40googlegroups.com.

Reply via email to