mirror of
https://github.com/wger-project/wger.git
synced 2026-02-18 00:17:51 +01:00
Some further fixes after merging master in here
This commit is contained in:
@@ -82,7 +82,7 @@ def view(request, id, slug=None):
|
||||
|
||||
template_data = {}
|
||||
template_data['comment_edit'] = False
|
||||
template_data['back_url'] = reverse('exercise-overview')
|
||||
template_data['back_url'] = reverse('exercise:exercise:overview')
|
||||
|
||||
# Load the exercise itself
|
||||
exercise = cache.get(cache_mapper.get_exercise_key(int(id)))
|
||||
|
||||
@@ -171,5 +171,5 @@ class RoutineExerciseConfigSerializer(serializers.Serializer):
|
||||
for lang in mapper:
|
||||
out[lang] = mapper[lang].pk
|
||||
|
||||
return {'name': unicode(obj['config'].routine_exercise.exercise_mapper),
|
||||
return {'name': "{0}".format((obj['config'].routine_exercise.exercise_mapper)),
|
||||
'ids': out}
|
||||
|
||||
44
wger/manager/migrations/0003_auto_20141225_1323.py
Normal file
44
wger/manager/migrations/0003_auto_20141225_1323.py
Normal file
@@ -0,0 +1,44 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('manager', '0002_auto_20141223_1412'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='weightconfig',
|
||||
name='dynamic_mode',
|
||||
field=models.CharField(max_length=7, choices=[('last', 'Last workout'), ('2weeks', 'Best workout in last 2 weeks'), ('4weeks', 'Best workout in last 4 weeks')], help_text='Select the time frame used to select your base weight.', default='last', verbose_name='Dynamic mode'),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='weightconfig',
|
||||
name='increment_mode',
|
||||
field=models.CharField(max_length=7, choices=[('static', 'Static'), ('dynamic', 'Dynamic')], help_text='Select the mode by which the weight increase is determined. "Static" increases the weight by a specific amount, "dynamic" can do that based on your workout performance.', default='static', verbose_name='Mode'),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='weightconfig',
|
||||
name='value',
|
||||
field=models.CharField(max_length=7, choices=[('weight', 'Constant value'), ('percent', 'Percent')], default='weight', verbose_name='Weight unit'),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='weightconfig',
|
||||
name='weight_unit',
|
||||
field=models.CharField(max_length=2, choices=[('kg', 'Metric (kilogram)'), ('lb', 'Imperial (pound)')], default='kg', verbose_name='Weight unit'),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='workoutsession',
|
||||
name='impression',
|
||||
field=models.CharField(max_length=2, choices=[('1', 'Bad'), ('2', 'Neutral'), ('3', 'Good')], help_text='Your impression about this workout session. Did you exercise as well as you could?', default='2', verbose_name='General impression'),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
||||
@@ -901,7 +901,7 @@ class WeightConfig(models.Model):
|
||||
'''
|
||||
|
||||
value = models.CharField(verbose_name=_('Weight unit'),
|
||||
max_length=2,
|
||||
max_length=7,
|
||||
choices=VALUE,
|
||||
default=VALUE_WEIGHT)
|
||||
'''
|
||||
|
||||
@@ -171,7 +171,7 @@ any part of it once you have added it to your list.{% endblocktrans %}</p>
|
||||
|
||||
<h4>{% trans "Options" %}</h4>
|
||||
<p>
|
||||
<a href="/workout/routines/{% verbatim %}{{data.routine.short_name}}{% endverbatim %}/pdf" {% auto_link_css flavour %}>
|
||||
<a href="/workout/routine/{% verbatim %}{{data.routine.short_name}}{% endverbatim %}/pdf" {% auto_link_css flavour %}>
|
||||
<img src="{% static 'images/icons/save.svg' %}"
|
||||
width="32"
|
||||
height="32"
|
||||
@@ -182,7 +182,7 @@ any part of it once you have added it to your list.{% endblocktrans %}</p>
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a href="/workout/routines/{% verbatim %}{{data.routine.short_name}}{% endverbatim %}/create-schedule" {% auto_link_css flavour %}>
|
||||
<a href="/workout/routine/{% verbatim %}{{data.routine.short_name}}{% endverbatim %}/create-schedule" {% auto_link_css flavour %}>
|
||||
<img src="{% static 'images/icons/status-on.svg' %}"
|
||||
width="32"
|
||||
height="32"
|
||||
|
||||
@@ -61,7 +61,8 @@ class RoutinePdfExportTestCase(WorkoutManagerTestCase):
|
||||
session['routine_config'] = {'round_to': 2.5,
|
||||
'max_squat': 120,
|
||||
'max_bench': 130,
|
||||
'max_deadlift': 150}
|
||||
'max_deadlift': 150,
|
||||
'unit': 'kg'}
|
||||
session.save()
|
||||
|
||||
# Create a PDF for all available routines
|
||||
|
||||
@@ -79,7 +79,7 @@ def view(request, id, slug=None):
|
||||
ingredient = get_object_or_404(Ingredient, pk=id)
|
||||
cache.set(cache_mapper.get_ingredient_key(ingredient), ingredient)
|
||||
template_data['ingredient'] = ingredient
|
||||
template_data['back_url'] = reverse('ingredient-list')
|
||||
template_data['back_url'] = reverse('nutrition:ingredient:list')
|
||||
template_data['form'] = UnitChooserForm(data={'ingredient_id': ingredient.id,
|
||||
'amount': 100,
|
||||
'unit': None})
|
||||
|
||||
Reference in New Issue
Block a user