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 tools to import and export exercises #515
base: master
Are you sure you want to change the base?
Conversation
Another thing, make sure that the file is formatted according to PEP8. If you install flake8 and isort in the virtual env, you can check it with flake8 --config .github/linters/.flake8 isort automatically sorts the imports: |
And of course thanks for the PR, I hope I haven't made too many comments :) |
Thanks for the answer, I just saw one comment, I don't think it's that many haha I'm looking at the PEP8 formatting tomorow |
@@ -0,0 +1,4750 @@ | |||
# SOME DESCRIPTIVE TITLE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't check in the PO, at the moment it's a bit tricky becaue the exercise categories are extracted from the DB and need to be added as well. There's a script or a HOWTO somewhere. And the MO files are binary, I only compile and check them in before a release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh... I forgot to toss them out before the commit :x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👆🏻
I actually didn't post them! 🙈 Turns out, that if you add the comments as a review and not as regular comments, you have to accept them all after finishing |
Perfect, I have some bit of work I will do this week before pushing the proposal to the few changes on the workout mode. |
👍🏻👍🏻 |
Fixes done. I forgot to say, the two menus can be reached in the Training menu if the member has the "exercises.change_exercise" permission. You can export all the exercises or just the exercises for your language. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes done.
I forgot to say, the two menus can be reached in the Training menu if the member has the "exercises.change_exercise" permission.
You can export all the exercises or just the exercises for your language.
I was thinking about that. It would be OK for regular users to export the data for the exercises, e.g. to import them to their own instance, so we don't need to check for anything. But I'm not sure where to put the link, since it's something that 99% of users will not need. We can leave it where it is for the moment
<div class="card-body"> | ||
<h5 class="card-title">{% trans "number_all_exercices" %}: {{ number_exercises }}</h5> | ||
<div class="card-text"> | ||
<a class="btn btn-sm btn-primary" href="{% url 'exercise:export:export_exercises' 'all' %}">{% trans "export_all_exercices" %}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also remove the keyword translations here :)
<!-- | ||
Title | ||
--> | ||
{% block title %}{% trans "Export des exercices" %}{% endblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S'il vous plaît en anglais ;)
@@ -0,0 +1,4750 @@ | |||
# SOME DESCRIPTIVE TITLE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👆🏻
Why not in the user account page ? |
Proposed Changes
I created a tool to import and export exercises in xml format. It also includes images, converted to base64 and wrote in the xml file.
Other questions