Val K, thank you now I use list wich contain dicts without json and all
work.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message b
Finally, the session is saved on disk or in db or in cookies between requests,
web2py uses pickle to do that, so all that you store in the session must be
pickable. In your case it is enough to trasform your class object into dict,
you don't need to convert it into json
--
Resources:
- http://
Val K, yes I want transfer class objects in list like variable at first.
Then I tried save that variable in session, but it was unsuccess too. And
now I serialised all objects in list like that
json.dumps(my_object.__dict__) append all of them in list and save in
session.
вс, 5 янв. 2020 г., 12:19
You want to keep python object in memory between requests? - it is bad idea.
You should transform it to something that can be saved on disk or in db and
recreate it in each request
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (So
Eric, I tried use sessions but have error, becouse as I understood session
can't store user class objects. *"Don't store user-defined classes in
session"* - in book. Then I serialised object to json like that:
json.dumps(temp_double_class.__dict__) and in my fubction use that code:
def importTi
I can give more details.
I have nine files with timetable for each faculty in excel. I saved all of
them in csv and my task was create parser for read each class (university
subject) to database for each group. Parser was written now, and all
classes in my variable type of list.
Class structure:
Transfer from where to where? things like objects may have a complex state
and cannot be reliably serialized. They can be rebuilt.
What is your use case?
Massimo
On Sunday, 29 December 2019 20:34:49 UTC+1, Константин Комков wrote:
>
> Hello!
>
> How can I transfer my variable type of list, whi
Have you tried with a session variable?
El domingo, 29 de diciembre de 2019, 12:34:49 (UTC-7), Константин Комков
escribió:
>
> Hello!
>
> How can I transfer my variable type of list, which contain my classes to
> another function in controller. I tried vars and args in URL function but
> my cl
8 matches
Mail list logo