Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Sign-in page gets 500 code when debug sets to False #10

Open
datascienceqing opened this issue Nov 16, 2022 · 0 comments
Open

Sign-in page gets 500 code when debug sets to False #10

datascienceqing opened this issue Nov 16, 2022 · 0 comments

Comments

@datascienceqing
Copy link

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Windows10, python3.7, django3.2.14,
class CustomUser(AbstractUser, PermissionMixin):
id = models.AutoField(primary_key=True)
username = models.CharField(max_length=50, blank=True, null=True, unique=True)
email = models.EmailField(_('email address'), unique=True)
objects = CustomUserManager()

class CustomUserManager(BaseUserManager):
def create_user(self, email, password, **extra_fields):
email = self.normalize_email(email)
user = self.model(email =email, **extra_fields)
user.set_password(password)
user.save()
return user

No changes in index function in view.py

When debug=True in settings.py, everything works great. Admin page works as the project without the ms-identity-platform integrated. But when debug is set to False. The sign-in page(auth/status.html) throws 500 code.

Any log messages given by the failure

System check identified no issues. After click the login link, got the below error message:
"GET / HTTP /1.1" 500 651

Expected/desired behavior

Works the same in both debug settings.

OS and Version?

Windows 10

Versions

python3.7, django3.2.14, ms-identity-python0.16.6

Mention any other details that might be useful

When I just clone this repo and do "python manage.py runserver localhost:8080" in sign-in folder, then click into the sign-in link. After sigin-in, the https:localhost:8080/admin url shows "Not found". Does it mean admin page is disabled?


Thanks! We'll be in touch soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants