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

created custom django_cms serializer to be able to handle django cms … #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

viliammihalik
Copy link

…filer images

Description

Added ability to define own serializer based on #14 and created serializers folder where is created new django_cms serializer which is able to transfer djangocms filer image as base64 string.

Checklist

  • I have opened this pull request against master
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on
    Slack to find a “pr review buddy” who is going to review my pull request.

super(Serializer, self).handle_fk_field(obj, field)


def Deserializer(object_list, **options):
Copy link

@robert-foreflight robert-foreflight Aug 9, 2022

Choose a reason for hiding this comment

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

Pep8: this should be lowercase if it's a function, however, it appears that you might have meant this to be a class with a deserialize method??? It seems by the name that is should be a class with maybe a static method. Anyway, just a nitpick

Copy link
Author

Choose a reason for hiding this comment

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

Hi, I can change it to lowercase. It was inspired by Django python serializer itself https://github.com/django/django/blob/main/django/core/serializers/python.py#L88

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

@robert-foreflight what do you think about that ?

@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Attention: Patch coverage is 7.01754% with 53 lines in your changes missing coverage. Please review.

Project coverage is 28.20%. Comparing base (703aaa0) to head (438a121).
Report is 17 commits behind head on master.

Files with missing lines Patch % Lines
djangocms_transfer/serializers/django_cms.py 0.00% 49 Missing ⚠️
djangocms_transfer/utils.py 33.33% 2 Missing ⚠️
djangocms_transfer/datastructures.py 66.66% 1 Missing ⚠️
djangocms_transfer/helpers.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #24      +/-   ##
==========================================
- Coverage   31.83%   28.20%   -3.63%     
==========================================
  Files          11       12       +1     
  Lines         377      429      +52     
  Branches       63       70       +7     
==========================================
+ Hits          120      121       +1     
- Misses        257      308      +51     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mihalikv
Copy link

@robert-foreflight Can you check this out?

@wfehr
Copy link
Contributor

wfehr commented Apr 25, 2024

This might be resolved with the changes from #20.
With now released version 1.0.2 you can define custom serializer handling which also enables custom processing for filer-images, e.g. ignoring them, creating a default image on import or transferring images with base64.

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.

4 participants