We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HI Jeff, here's a snap of what we discussed last regarding function patterns.
@login_required def tune_list(request): user = request.user tunes = RepertoireTune.objects.select_related("tune").filter(player=user) tune_count = len(tunes) template_name = "tune/list.html" if request.method == "POST": search_form = SearchForm(request.POST) if search_form.is_valid(): search_terms = search_form.cleaned_data["search_term"].split(" ") results = return_search_results(request, search_terms, tunes, search_form) tunes = results.get("tunes") tune_count = results.get("tune_count") else: search_form = SearchForm() data_dict = {"tunes": tunes, "search_form": search_form, "tune_count": tune_count} request.session["tune_count"] = tune_count return render( request, template_name=template_name, context=data_dict, )
The text was updated successfully, but these errors were encountered:
jwjacobson
No branches or pull requests
HI Jeff, here's a snap of what we discussed last regarding function patterns.
The text was updated successfully, but these errors were encountered: