python date jquery .change

$(document).ready(function(){
        var v = '{{ A }}';
        if (v)
            $('#A option[value*="'+v+'"]').attr('selected', 'selected');
        $('#A').change(function(){
            var t = $("#A option:selected").val();
            window.location.href = '{% url url %}'+'?limit_time='+t;
        });
    });  


<select id='A' name="A">
                <option value="">全部</option>
                <option value="">近三个月</option>
                <option value="">三个月前</option>
            </select>


from datetime import date, timedelta
limit_time = request.GET.get('A')
if limit_time:
    now = date.today()
    t = now + timedelta(days=-90)
    if limit_time == u'':

你可能感兴趣的:(python date jquery .change)