What I’m trying to do:
After publishing my application to a custom domain, I am seeing a weird issue where the whole app is “duplicated”, for at lack of a better term.
The app is looking as it should, however the application is “doubled”, meaning by scrolling down, I get another top bar, navigation bar and content page:
Both sites are functional, however I am using the Messaging module from anvil-extras, which seems to only make registrations on the “lower” page. Presumably due to that being the last that is loaded.
Has anyone experienced anything similar?
I hope I am explaining it in a way that makes sense.
If needed, I can provide a clone in a private message.
What I’ve tried and what’s not working:
I am using anvil-extras and HashRouting for my application, as well as using a application structure, which I have used before without issues.
I might be missing something simple, so I hope someone can be of assistance.
Code Sample:
Startup (client)
import anvil.users
import anvil.server
from anvil import open_form
from . import Globals
def startup():
try:
Globals.get_initial_data()
open_form('MainForm')
except anvil.users.AuthenticationFailed:
open_form('LoginForm')
except ValueError as ve:
pass
if __name__ == '__main__':
startup()
LoginForm (client)
from ._anvil_designer import LoginFormTemplate
from anvil import *
import anvil.server
from anvil.tables import app_tables
import anvil.users
class LoginForm(LoginFormTemplate):
def __init__(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)
def login_button_click(self, **event_args):
"""This method is called when the button is clicked"""
user = anvil.users.login_with_form(allow_remembered=True, allow_cancel=True)
if user:
from ..Startup import startup
startup()
If further code snippets are required, please let me know.