[python] &soutez :-)
Jakub Vysoky
jakub na borka.cz
Středa Duben 11 16:08:20 CEST 2018
+1 za urlparse
2018-04-10 12:43 GMT+00:00 Petr Blahos <petrblahos na gmail.com>:
> Asi budu v menšině, ale parsovat a znovu skládat - to bych v tomto případě
> nedělal.
>
> separator = "&" if "?" in reload_redirect['Location'] else "?"
> reload_redirect['Location'] += separator + "param=1"
>
> --
> Petr
>
> http://www.blahos.com/ <http://petr.blahos.com/>
> http://traceability.cz/
>
> 2018-04-10 14:05 GMT+02:00 starenka . <starenka0 na gmail.com>:
>
>> aha, pozde. mazu se. kthxbai
>>
>> ---
>> In Perl you shoot yourself in the foot, but nobody can understand how you
>> did it. Six months later, neither can you. | print 'aknerats'[::-1]
>>
>> On Tue, Apr 10, 2018 at 2:04 PM, starenka . <starenka0 na gmail.com> wrote:
>>
>>> a co urlparse?
>>>
>>> ---
>>> In Perl you shoot yourself in the foot, but nobody can understand how
>>> you did it. Six months later, neither can you. | print 'aknerats'[::-1]
>>>
>>> 2018-04-10 13:41 GMT+02:00 <azurit na pobox.sk>:
>>>
>>>> Ja by som najskor zozbieral vsetky parametre do pola a potom tesne pred
>>>> odoslanim hlaviciek:
>>>>
>>>> if redirect_parameters:
>>>> reload_redirect['Location'] += "?%s" % "&".join(redirect_parameters)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Citát Petr Messner <petr.messner na gmail.com>:
>>>>
>>>>
>>>> Nevim, neznam, asi uz ani nejsem webovy vyvojar :D
>>>>>
>>>>> Navrhuju to schovat do funkce:
>>>>>
>>>>> reload_redirect['Location'] = append_redirect_param(
>>>>> reload_redirect['Location'], 'param=1')
>>>>>
>>>>> def append_redirect_param(...):
>>>>> ....
>>>>>
>>>>>
>>>>> Petr M.
>>>>>
>>>>>
>>>>> 2018-04-10 13:09 GMT+02:00 Vláďa Macek <macek na sandbox.cz>:
>>>>>
>>>>> Zdar,
>>>>>>
>>>>>> vyhlasuju soutez o nejhezci alternativu pro toto:
>>>>>>
>>>>>> reload_redirect['Location'] += '#param=1'.replace('#', '&' if '?' in
>>>>>> reload_redirect['Location'] else '?')
>>>>>>
>>>>>> Webovi vyvojari jiste zalezitost znaji.
>>>>>> Tesim se ;-)
>>>>>>
>>>>>> Vlada
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Python mailing list
>>>> python na py.cz
>>>> http://www.py.cz/mailman/listinfo/python
>>>>
>>>> Visit: http://www.py.cz
>>>>
>>>
>>>
>>
>> _______________________________________________
>> Python mailing list
>> python na py.cz
>> http://www.py.cz/mailman/listinfo/python
>>
>> Visit: http://www.py.cz
>>
>>
>
> _______________________________________________
> Python mailing list
> python na py.cz
> http://www.py.cz/mailman/listinfo/python
>
> Visit: http://www.py.cz
>
>
--
Jakub Vysoky
mob: +420 605 852 377
jab: jakub.vysoky na gmail.com
twit: https://twitter.com/kvbik
------------- další část ---------------
HTML příloha byla odstraněna...
URL: <http://www.py.cz/pipermail/python/attachments/20180411/c3accda2/attachment.html>
Další informace o konferenci Python