Answer the question
In order to leave comments, you need to log in
How to turn list values into querystring in Django?
In the view, a list with dates of the format (2015.07.31 (Friday)) is formed and passed to the template, after which it is displayed in a loop - how to turn the list values into a query string of the format (?y=2015&m=7&d=31) and remove "Friday"? Can this be done in the template, otherwise I didn't find a suitable filter for some reason!?
Answer the question
In order to leave comments, you need to log in
In your code, work with timers is done incorrectly. You seem to assume that when a variable is written, the previous timer is destroyed - but this works differently. What happens is that the functions intro_start and intro_start2 never stop. Each run of lines spawns another "thread" intro_start and intro_start2. Because they change global variables, the move gets faster and faster.
A little fix and it will be ok: https://codepen.io/AlexNetkachov/pen/wRrdOL?editor...
date¶
Formats a date according to the given format.
Uses a similar format as PHP's date() function ( php.net/date ) with some differences.
>>> d
datetime.date(2015, 1, 1)
>>> d.strftime('?y=%Y&m=%m&d=%d')
'?y=2015&m=01&d=01'
>>>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question