Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why is my Aleart Message not appearing after the user login wasn't correct? Django, html, css

This is the Script in my signIn.html

{% if messg %}
<script>
  aleart("{{messg}}");
</script>
{% endif %}
 

This is my Django View

def postsign(request): 
    email = request.POST.get("email")
    passw = request.POST.get("pass")
    try:
        user = auth.sign_in_with_email_and_password(email,passw)
    except:
        message="Invalid credentials - try again"
        return render(request, "signIn.html", {"messg":message})
    print(user)
    return render(request, "welcome.html", {"e":email})

def signIn(request):
    return render(request, "signIn.html")

I was expecting an Aleart message on my screen that the Login was not correct.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Im not sure, but i think you got the wrong spell. Can you change spells aleart to alert?

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading