Skip to content
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 admin.py; add serializer overrides + chat_settings #4

Merged
merged 14 commits into from
Jun 7, 2022

Conversation

ckcollab
Copy link
Contributor

No description provided.

('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chat_room_memberships', to=settings.AUTH_USER_MODEL)),
],
),
migrations.AddField(
Copy link
Contributor

@gibsonbailey gibsonbailey Mar 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only concern here is compatibility with applications already running chit-chat. Not massively important though.

What could make sense is:

  1. Create new m2m ,members_tmp, with though model.
  2. Create data migration to load new field with old field's data.
  3. Delete old m2m field.
  4. Rename new m2m members_tmp => members.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushed this up, hand tested a couple times, should worky!

Comment on lines 24 to 27
# Override default serializers..
if hasattr(settings, 'CKC_CHAT_SERIALIZERS'):
for name, module in settings.CKC_CHAT_SERIALIZERS.items():
chat_settings['SERIALIZERS'][name] = module
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm making sure this guy is covered in a test right now.

@gibsonbailey gibsonbailey merged commit 683fc43 into master Jun 7, 2022
@gibsonbailey gibsonbailey deleted the better-serializer-overrides branch June 7, 2022 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants