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
I've installed this module to try, on admin site I created a form and save it, when I viewed on site it send me this error:
'bool' object is not callable
File "projectX\venv\lib\site-packages\forms_builder\forms\views.py" in get 39. if login_required and not request.user.is_authenticated():
Exception Type: TypeError at /forms_builder/test-form-builder/ Exception Value: 'bool' object is not callable
-------------- Possible fix: forms_builder\forms\views.py
def get(self, request, *args, **kwargs): context = self.get_context_data(**kwargs) login_required = context["form"].login_required username = request.POST.get('username') password = request.POST.get('password') user = authenticate(username=username, password=password) if login_required and user is not None: #if login_required and not request.user.is_authenticated(): path = urlquote(request.get_full_path()) bits = (settings.LOGIN_URL, REDIRECT_FIELD_NAME, path) return redirect("%s?%s=%s" % bits) return self.render_to_response(context)
The text was updated successfully, but these errors were encountered:
You need to import too:
from django.contrib.auth import authenticate
Sorry, something went wrong.
Github source is not having this issue.
No branches or pull requests
I've installed this module to try, on admin site I created a form and save it, when I viewed on site it send me this error:
'bool' object is not callable
File "projectX\venv\lib\site-packages\forms_builder\forms\views.py" in get
39. if login_required and not request.user.is_authenticated():
Exception Type: TypeError at /forms_builder/test-form-builder/
Exception Value: 'bool' object is not callable
-------------- Possible fix: forms_builder\forms\views.py
The text was updated successfully, but these errors were encountered: