Kev siv Session hauv python yog dab tsi?
Kev siv Session hauv python yog dab tsi?

Video: Kev siv Session hauv python yog dab tsi?

Video: Kev siv Session hauv python yog dab tsi?
Video: Google Colab - Searching for News with Python! 2024, Hlis ntuj nqeg
Anonim

Cov kev sib tham lub moj khaum tso cai rau koj khaws thiab khaws cov ntaub ntawv arbitrary ntawm ib lub xaib-tus neeg tuaj saib. Nws khaws cov ntaub ntawv ntawm tus neeg rau zaub mov sab thiab paub daws qhov kev xa thiab tau txais cov ncuav qab zib. Cov ncuav qab zib muaj a kev sib tham ID - tsis yog cov ntaub ntawv nws tus kheej (tshwj tsis yog koj siv lub ncuav qab zib raws li backend).

Hais txog qhov no, dab tsi yog kev sib tham hauv python?

Kev sib tham yog lub sijhawm luv thaum tus neeg siv khoom nkag mus rau hauv lub server thiab tawm ntawm nws. Cov ntaub ntawv, uas yuav tsum tau tuav nyob rau hauv no kev sib tham , yog khaws cia rau hauv tus neeg siv khoom browser. A kev sib tham nrog rau txhua tus neeg tau txais kev pab tau muab a Kev sib tham ID. Cov Kev sib tham cov ntaub ntawv khaws cia rau saum cov ncuav qab zib thiab cov neeg rau zaub mov kos npe rau lawv cryptographically.

Tsis tas li, kev sib tham ua haujlwm li cas hauv Python? Kev sib tham variables nco cov ntaub ntawv los ntawm kev thov kom thov, thiab tshwj xeeb rau txhua tus neeg siv. Cov ntaub ntawv tus account yog ib hom ntaub ntawv khaws cia rau hauv a kev sib tham khoom. Raws li kev sib tham variables yog cov neeg siv tshwj xeeb, lawv tsis tuaj yeem siv los qhia cov ntaub ntawv ntawm cov neeg siv - rau qhov web app khaws cov ntaub ntawv hauv cov ntaub ntawv.

Ntawm no, qhov kev thov kev sib ntsib hauv python yog dab tsi?

Cov Kev sib tham khoom tso cai rau koj mus txuas ntxiv qee qhov tsis sib xws thov . Nws tseem ua rau cov ncuav qab zib hla txhua qhov thov ua los ntawm Kev sib tham piv txwv. A kev sib tham khoom muaj tag nrho cov txheej txheem ntawm lub ntsiab Thov API. Cov txheej txheem-theem parameters override kev sib tham tsis muaj.

Dab tsi yog kev siv lub hauv paus kev sib tham hauv Django?

Kev sib tham yog cov mechanism siv los ntawm Django (thiab feem ntau ntawm Is Taws Nem) rau kev taug qab ntawm "xeev" nruab nrab ntawm qhov chaw thiab ib qho browser tshwj xeeb. Kev sib tham tso cai rau koj khaws cov ntaub ntawv tsis txaus ntseeg ib tus browser, thiab muaj cov ntaub ntawv no muaj nyob rau ntawm lub xaib thaum twg browser txuas.

Pom zoo: