Mastering Development

Add matching values from one array to an array of original object

I have a users list like the following: [ { user: a, email:, events: [] }, { user: b, email: events: [] } ] And an events list: [ { user: a, start: 2020-01-01 end: 2020-01-02 }, { user: a, start: 2020-02-01 end: 2020-02-02 }, { user: b, start: 2020-03-01 end: 2020-03-02 }, […]

Development Heroku

Django API OneToOne relationship using Auth, User model, Views, Serializers

I’m trying to connect the HighScore model to my User model. This way I can save a HighScore instance for each User. No matter what I do, I get a 500 internal server error. I’ve tried creating a custom user model using AbstractUser. I’ve tried setting up OneToOne using settings.AUTH_USER_MODEL, and I’ve tried doing User […]