shaunagm / actionrising

0 stars 0 forks source link

Implementing groups, step 1: adding group model #305

Open shaunagm opened 7 years ago

shaunagm commented 7 years ago

Hey all, this is the implementation of step 1 of adding groups, including some very basic tests.

I deviated from the spec (which has now been updated to reflect said deviation) by not creating a separate field/relationship table for admins. It occurred to me we could just use django_guardian for that. I think this will make things much cleaner, as the many-to-many relationships are now all handled between users and groups (other than the foreignkey between the groupprofile and the user who's the owner). The group extension now functions more like a profile, a model on which to hang extra data about the group, and has been named GroupProfile.

Please review, and when I get the thumbs up I'll move on to step 2.

Note: I ended up (I think unnecessarily) running a custom migration which I have not included in the PR. If you run into trouble (most likely manifesting as a 'Permission does not exist' or other permission-related error in the test suite) let me know!

Note x2: I'm going to create a new branch for each step of the implementation and open each PR against the previous step. This should make the work done in each step clear while allowing me to stay up to date with develop by rebasing the first step (this PR) off develop as needed. We can test the final PR on stage, and then merge them all at the same time, starting with this PR.