Thanks Ahmed
Please tell me if I'm correct or not in saying the SchoolUser has School as
a foreign key the school will not have to be authenticated with djoser in
order to register for example or login?
On Mon, Nov 27, 2023 at 6:53 PM Ahmed Iftikhar
wrote:
> # models.py
> from django.contrib.au
# 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
I am taking it that there is more than one "school"? If so, surely
it's is just a many-to-many relationship.
On 27 Nov 2023, at 09:33, Okkert Joubert wrote:
Good morning all,
I made a custom user model for a school, it is currently working
with djoser authentication, now what I want to add
Good morning all,
I made a custom user model for a school, it is currently working with
djoser authentication, now what I want to add is for the school to add
users, so my School model is a foreignkey in SchoolUser is this possible
firstly and secondly can I add the djoser authentication to the
4 matches
Mail list logo