Skip to content

Conversation

@mrbazzan
Copy link
Collaborator

@mrbazzan mrbazzan commented Aug 8, 2025

This pull request address issue #73 .
It adds a management command to load data exported using djangocms-transfer.

It works by running docker compose --rm web python manage.py democontent demo-content/help.json.
I would like to remove the FILE positional argument from the command so it becomes
docker compose --rm web python manage.py democontent but we would need to finalise the content that
would be in the remote URI (which we would then use internally).

@mrbazzan mrbazzan requested a review from fsbraun August 8, 2025 20:37
Copy link
Member

@fsbraun fsbraun left a comment

Choose a reason for hiding this comment

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

Hi @mrbazzan ! I will give it a test run in the coming days. A few thoughts:

  • Is it possible to rename the folder to "democontent" to be consistent with the command?
  • Can the command list the options (i.e. files in the democontent folder) if you do not specify any?
  • If only a file name and no path is specified, can the command automatically read from the democontent folder?
  • Another option would be to call the new page "help-2" if "help" already existed.
@mrbazzan
Copy link
Collaborator Author

  • Another option would be to call the new page "help-2" if "help" already existed.

Hi @fsbraun, won't that cluster the page tree?
If there is help-2, we create help-3 and it continues like that.
Shouldn't the user be explicit about the page they want created?

@fsbraun
Copy link
Member

fsbraun commented Aug 12, 2025

  • Another option would be to call the new page "help-2" if "help" already existed.

Hi @fsbraun, won't that cluster the page tree? If there is help-2, we create help-3 and it continues like that. Shouldn't the user be explicit about the page they want created?

Alternatively, to avoid unintended clustering, you can add a --force option which would import (using the names as you suggested). So, without --force it would fail, and with --force you can add any page many times.

@mrbazzan
Copy link
Collaborator Author

mrbazzan commented Aug 13, 2025

Alternatively, to avoid unintended clustering, you can add a --force option which would import (using the names as you suggested). So, without --force it would fail, and with --force you can add any page many times.

I have added the --force option. django-cms creates the same title with different slug.

Copy link
Member

@fsbraun fsbraun left a comment

Choose a reason for hiding this comment

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

LGTM!

@fsbraun fsbraun merged commit aa65b1d into django-cms:main Sep 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants