How to process a form (via get or post) using class-based views?
问题 Im trying to learn class-based views, for a detail or list view is not that complicated. I have a search form and I just want to see if I send a query to show up the results. Here is the function code (is not mine, is from a django book): def search_page(request): form = SearchForm() bookmarks = [] show_results = False if 'query' in request.GET: show_results = True query = request.GET['query'].strip() if query: form = SearchForm({'query': query}) bookmarks = Bookmark.objects.filter(title_