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

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

Merging #24 (438a121) into master (703aaa0) will decrease coverage by 3.62%.
The diff coverage is 7.01%.

@@            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     
Impacted Files Coverage Δ
djangocms_transfer/serializers/django_cms.py 0.00% <0.00%> (ø)
djangocms_transfer/utils.py 48.14% <33.33%> (-1.86%) ⬇️
djangocms_transfer/helpers.py 17.85% <50.00%> (ø)
djangocms_transfer/datastructures.py 50.00% <66.66%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? 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.

None yet

4 participants