try:
user = UniversityDetails.objects.get(email=email)
except UniversityDetails.DoesNotExist:
user = None
I also see you’re storing your passwords in plaintext (a big security no-no!). Consider using the built-in auth system instead.
More Related Contents:
- django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. plz help me out plz
- django template system, calling a function inside a model
- Django: Display Choice Value
- is there a way to loop over two lists simultaneously in django?
- How to change the file name of an uploaded file in Django?
- Django – form.save() is not creating ModelForm
- Override a form in Django admin
- How do I call a Django function on button click?
- QuerySet, Object has no attribute id – Django
- Django DoesNotExist
- Django 2.1.3 Error: __init__() takes 1 positional argument but 2 were given
- Django foreign key relation in template
- Django dynamic model fields
- Django set default form values
- Creating a dynamic choice field
- Django, creating a custom 500/404 error page
- How to create an object for a Django model with a many to many field?
- django abstract models versus regular inheritance
- Getting TypeError: __init__() missing 1 required positional argument: ‘on_delete’ when trying to add parent table after child table with entries
- Get all related Django model objects
- Django Rest Framework and JSONField
- django.db.migrations.exceptions.InconsistentMigrationHistory
- How do I use Django templates without the rest of Django?
- Writing a __init__ function to be used in django model
- Class has no objects member
- Customize/remove Django select box blank option
- How does the order of mixins affect the derived class?
- Unable to import path from django.urls
- Django Multiple Databases – relation does not exist; LINE 1: SELECT COUNT(*) AS “__count” FROM
- Django admin: How to display the field marked as “editable=False” in the model?