Is there a simple way to have both the user login form enabled and use the design interface?
I’ve been commenting out the user login fields to allow design edits, but I’m fearful I’ll end up deploying without the login form enabled.
Thoughts?
Is there a simple way to have both the user login form enabled and use the design interface?
I’ve been commenting out the user login fields to allow design edits, but I’m fearful I’ll end up deploying without the login form enabled.
Thoughts?
Hi @mike and welcome to the forum,
You can use the anvil.designer
module
if not anvil.designer.in_designer:
anvil.users.login_with_form()
I haven’t had a coffee yet, but I’m not sure I understand the problem or @stucork’s solution…?
I’m assuming it’s a custom component or layout that calls login with form which the designer doesn’t allow.
Ahh, gotchya. I think the coffee helped, too…
Thank you @stucork - this is exactly what I needed.
You’re correct; I had a custom template that invoked login_with_form(), the template on all other forms, thus the designer was only working on the single template.