-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Feature #159236209] Export and Import workouts #31
base: develop
Are you sure you want to change the base?
Conversation
9197080
to
cbd7199
Compare
Pull Request Test Coverage Report for Build 532
💛 - Coveralls |
{% block options %} | ||
<div class="dropdown"> | ||
<button class="btn btn-success dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> | ||
Add workout | ||
<span class="caret"></span> | ||
</button> | ||
|
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.
Kindly remove these irrelevant blank lines, you added.
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1"> | ||
<li><a href="{% url 'manager:workout:add' %}?cycle=micro">Microcycle: One week plan</a></li> | ||
<li><a href="{% url 'manager:workout:add' %}?cycle=meso">Mesocycle: Two to six weeks plan</a></li> | ||
<li><a href="{% url 'manager:workout:add' %}?cycle=macro">Macrocycle: One year plan</a></li> | ||
</ul> | ||
|
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.
Kindly remove these irrelevant blank lines, you added.
wger/manager/views/workout.py
Outdated
|
||
from django.shortcuts import render, get_object_or_404 | ||
from django.shortcuts import render, redirect, get_object_or_404 |
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.
Kindly remove unused import redirect
.
wger/manager/views/workout.py
Outdated
@@ -48,6 +64,8 @@ | |||
WgerDeleteMixin | |||
) | |||
from wger.utils.helpers import make_token | |||
from django.http import HttpResponse |
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.
Kindly move these imports to the top of the file.
wger/manager/views/workout.py
Outdated
messages.info(request, 'No File was Chosen for Importation!') | ||
return HttpResponseRedirect('overview') | ||
|
||
file = request.FILES['workoutfile'] |
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.
Move file
into the try block and use one try
block
cbd7199
to
7a4592e
Compare
* Create the export url action handler * Implement export and import workouts functionality * Test export and import workouts functions * Resolve flake8 errors * Remove unused modules * Remove unnecessary blank lines * Correct imports and structure of the try statements [Delivers #159236209]
7a4592e
to
bb64fb8
Compare
What does this PR do?
Description of Task to be completed?
How should this be manually tested?
https://github.com/andela/wg-wits.git
.cd wg-wits
ft-export-workouts-159236209
branch.virtualenv -p python3 venv-django
thensource venv-django/bin/activate
python manage.py runserver
http://127.0.0.1:8000/en/workout/overview
to go to the workouts view.What are the relevant pivotal tracker stories?
#159236209
Screenshots (if appropriate)