How do I start a session in a Python web application? -
Based on this question.
I want to use a dictionary such as $ _ session / <> code in PHP for
which is available after running the command it happens.
I have a few things that may be related to your question ... it is not relevant to you But I think that others can come here with the exact question and can benefit from my (limited) experience .. because I had this question at one time too.
Speaking as someone who has a dragon (and never looked back) from PHP, I think it is useful to understand how the session works under the hood, it may not be not < / Em> It is a good idea to implement your session structure unless you want to understand more about session management or (b) something that does not offer the existing structure.
A good place to start always is the following line: Session data is stored elsewhere on the server and is indexed by a unique identifier (some kind of hash). This identifier goes back and forth between the customer and the server, usually in the form of a cookie or as part of the query string (url). For security sake, you may want to use an SSL connection or validate session ID with some other data (such as IP address). By default the PHP store files as sessions, but on a shared server that can have a security risk, so that you want to override session engines, so that you can store sessions in the database. The Python Web Framework has the same functionality.
When I started web programming in Python then I saw two things. First of all, PHP made it easy for language programmers (in 2003) to wrap up a lot of magic in language, to learn languages, but I did not teach a lot about how everything worked. Therefore, I found myself researching many topics about web applications, especially database connection pooling, URL mapping, sessions and threading. PHP (and the Django, which I think) is far away for you. Second, PHP is really dirty language;) but this work is complete!
Personally, I am using cherries for web development. In this, session management can be seen as a "tool" which you can turn on.
Comments
Post a Comment