1
 var params = {
            year: escape(year.val()),
            month: escape(month.val()),
            day:  escape(day.val()),
         };

  $(window.location).attr('href', getUrlSlug()+'enquiry/thanks/?year='+params.year+'&month='+params.month+'&day='+params.day);

Now in my teplate url its displaying as:

http://127.0.0.1:8000/venues/adc-dfds-hds-kdfdf-fd-dfd/enquiry/thanks/?year=2012&month=9&day=13

Now i want use the date in my template as follows

<p>Your chosen date is {{params.year}},{{params.month}},{{params.day}}</p>

i am not sure of syntax any help please...

4

1 に答える 1

4

To dispaly the above values in a template I just used the below code....

{{request.GET.year}},{{request.GET.month}},{{request.GET.day}}

if to use the same in a view we need to use

request.GET.get('year')
request.GET.get('month')
request.GET.get('day')
于 2012-09-11T10:00:13.320 に答える