Make some fields on Speaker model optional.#155
Open
martey wants to merge 2 commits intopinax:masterfrom
Open
Conversation
This makes it easier to add/edit Speakers in the admin.
- Make User relationship optional (since some Speakers will not have a
User account associated with them if they are additional speakers to
a proposal) by setting blank=True.
- Make annotation field optional (similar to the field on the Sponsor
model).
- Make invite_email and invite_token fields optional by setting
blank=True, since conventional Speakers attached to User accounts do
not need these fields. This removes the uniqueness constraint from
invite_token, but since null=True was set on that field (see
https://docs.djangoproject.com/en/1.9/ref/models/fields/#django.db.models.Field.null),
it wasn't really unique anyway.
martey
added a commit
to pydata/symposion
that referenced
this pull request
Jan 20, 2017
This makes it easier to add/edit Speakers in the admin.
- Make User relationship optional (since some Speakers will not have a
User account associated with them if they are additional speakers to
a proposal) by setting blank=True.
- Make annotation field optional (similar to the field on the Sponsor
model).
- Make invite_email and invite_token fields optional by setting
blank=True, since conventional Speakers attached to User accounts do
not need these fields. This removes the uniqueness constraint from
invite_token, but since null=True was set on that field (see
https://docs.djangoproject.com/en/1.9/ref/models/fields/#django.db.models.Field.null),
it wasn't really unique anyway.
Note that this commit differs from the one in
pinax#155 in that the associated
migration is #4, not #3. This prevents migration conflicts within this
branch, but does not apply cleanly to master by itself.
CharFields should be set to empty strings, not None.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes it easier to add/edit Speakers in the admin.
User account associated with them if they are additional speakers to
a proposal) by setting blank=True.
model).
blank=True, since conventional Speakers attached to User accounts do
not need these fields. This removes the uniqueness constraint from
invite_token, but since null=True was set on that field (see
https://docs.djangoproject.com/en/1.9/ref/models/fields/#django.db.models.Field.null),
it wasn't really unique anyway.