-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add organization to hearing #169
Conversation
class Organization(BaseModel): | ||
name = models.CharField(verbose_name=_('name'), max_length=255) | ||
admin_users = models.ManyToManyField( | ||
User, blank=True, related_name='admin_organizations' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use settings.AUTH_USER_MODEL
directly here -- aliasing it to User
makes the casual reader think it's not pluggable.
Missing tests. What is the actual desired serialization format for |
Also missing a migration. |
1e5543a
to
1d23f3d
Compare
1d23f3d
to
ce84be1
Compare
ce84be1
to
fc93db4
Compare
5c377be
to
fd80015
Compare
@@ -0,0 +1,41 @@ | |||
# -*- coding: utf-8 -*- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the -n
flag with makemigrations
to specify the migration's name. (auto
migration names are not very nice.)
fd80015
to
7e2f91f
Compare
7e2f91f
to
7b70c3f
Compare
@Rikuoja Rebase required. |
eb6901e
to
13b6ae9
Compare
Tossing the ball to @tuomas777 to review + merge. |
name = models.CharField(verbose_name=_('name'), max_length=255, unique=True) | ||
admin_users = models.ManyToManyField( | ||
settings.AUTH_USER_MODEL, blank=True, related_name='admin_organizations' | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this model shouldn't be in base.py
as it isn't used as a basis for anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, didn't realize that was the point :)
13b6ae9
to
5b733b7
Compare
('modified_at', models.DateTimeField(default=django.utils.timezone.now, editable=False, verbose_name='time of last modification')), | ||
('published', models.BooleanField(db_index=True, default=True, verbose_name='public')), | ||
('deleted', models.BooleanField(db_index=True, default=False, editable=False, verbose_name='deleted')), | ||
('id', models.CharField(blank=True, help_text='You may leave this empty to automatically generate an ID', max_length=32, primary_key=True, serialize=False, verbose_name='identifier')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this is a bit wrong because StringIdBaseModel
has changed, I think correct would be ('id', models.CharField(editable=False, max_length=32, primary_key=True, serialize=False, verbose_name='identifier'))
5b733b7
to
ed11ad3
Compare
LGTM! |
Required by #138