Skip to content
This repository was archived by the owner on May 28, 2020. It is now read-only.
This repository was archived by the owner on May 28, 2020. It is now read-only.

Automatically set logged-in user as the administrator when creating a university  #56

Open

Description

@mitchdowney

I'd like to exclude the administrators field entirely from the CreateView, and have the logged-in user automatically set as the administrator for the university. Then include a note that tells the user "you can add additional administrators by editing your university page after you create it".

I tried to go ahead and do this on my own, because I already implemented something like this for the Run for Office/CandidateCreateView, where the logged-in user is automatically set as the user for the candidate profile that will be created.

However, I was unsuccessful because the administrators attribute is a ManyToManyField, and I only know how to do this for ForeignKey fields...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions