Self hosted FLOSS fitness/workout, nutrition and weight tracker
Merge branch 'master' into rep-options
Roland Geider33f70bfa0078
diff --cc wger/manager/helpers.pyindex f0d448228,0a4bc659b..709d29f53--- a/wger/manager/helpers.py+++ b/wger/manager/helpers.py@@@ -127,9 -177,14 +177,14 @@@ def render_workout_day(day, nr_of_weeks# Put everything together and manually set some of the widthst = Table(data, style=table_style)if len(t._argW) > 1:- t._argW[0] = 0.6 * cm # Numbering- t._argW[1] = 4 * cm # Exercise- t._argW[2] = 3 * cm # Repetitions+ if only_table:+ t._argW[0] = 0.6 * cm # Numbering+ t._argW[1] = 8 * cm # Exercise+ t._argW[2] = 3.5 * cm # Repetitions+ else:+ t._argW[0] = 0.6 * cm # Numbering+ t._argW[1] = 4 * cm # Exercise- t._argW[2] = 2.5 * cm # Repetitions++ t._argW[2] = 3 * cm # Repetitionsreturn KeepTogether(t)diff --cc wger/manager/views/pdf.pyindex b3a667f31,adc0ad3d8..a62b12ab7--- a/wger/manager/views/pdf.py+++ b/wger/manager/views/pdf.py@@@ -111,8 -113,15 +113,14 @@@ def workout_view(request, id, images=FaGenerates a PDF with the contents of the workout, without table for logs'''- # Create the HttpResponse object with the appropriate PDF headers.- response = HttpResponse(content_type='application/pdf')+ '''+ Generates a PDF with the contents of the given workout-+ See also+ * http://www.blog.pythonlibrary.org/2010/09/21/reportlab+ * http://www.reportlab.com/apis/reportlab/dev/platypus.html+ '''+ comments = bool(int(comments))+ images = bool(int(images))# Load the workoutif uidb64 is not None and token is not None:@@@ -316,4 -173,4 +172,4 @@@# Create the HttpResponse object with the appropriate PDF headers.response['Content-Disposition'] = 'attachment; filename=Workout-{0}-table.pdf'.format(id)response['Content-Length'] = len(response.content)-- return response++ return response