Changeset 4678c5e in OpenWorkouts-current for ow/views/user.py


Ignore:
Timestamp:
Apr 23, 2019, 6:41:11 PM (5 years ago)
Author:
Borja Lopez <borja@…>
Branches:
current
Children:
e57b2df
Parents:
9f3c353
Message:

(#71) Keep the "distance/time/elevation" filter when clicking on bars
in the profile yearly stats chart

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ow/views/user.py

    r9f3c353 r4678c5e  
    284284    month = int(request.GET.get('month', now.month))
    285285    week = request.GET.get('week', None)
     286    # filter_by can be 'distance', 'time' or 'elevation', defaults to
     287    # 'distance' if no value is provided
     288    filter_by = request.GET.get('filter_by', 'distance')
    286289    workouts = user.workouts(year, month, week)
    287290    totals = {
     
    321324        'current_week': week,
    322325        'totals': totals,
    323         'profile_stats': profile_stats
     326        'profile_stats': profile_stats,
     327        'filter_by': filter_by
    324328    }
    325329
Note: See TracChangeset for help on using the changeset viewer.