port to django

`create_session_data`