python manage.py startapp pincode_auth_app
# pincode_auth_app/models.py from django.contrib.auth.models import
AbstractUser from django.db import models class CustomUser(AbstractUser):
pin_code = models.CharField(max_length=4, blank=True, null=True)
***
# pincode_auth_app/admin.py from
# models.py
from django.contrib.auth.models import AbstractUser
from django.db import models
class School(models.Model):
# Your School model fields
class SchoolUser(AbstractUser):
school = models.ForeignKey(School, on_delete=models.CASCADE)
# Add other custom fields as needed
Obfuscation can make the code less readable, but it won't provide strong
security. There are Python tools like *pyobfuscate *that can be used for
this purpose. However, keep in mind that this is not encryption, and
determined attackers can still reverse engineer obfuscated code.
While you can
It's possible that there is a migration state issue. Try running the
following commands:
*python manage.py migrate zeropython manage.py migrate *
This will revert all migrations for the specified app and then migrate all
apps to the initial state. Be cautious, as this will reset your
4 matches
Mail list logo