Hi!

Now in py4web it will be (if POST vars): 
request.forms.message or request.POST.message

or if GET vars:
request.query.message or request.GET.message


понедельник, 24 февраля 2020 г., 20:11:02 UTC+5 пользователь Maurice Waka 
написал:
>
> Hi 
> I can't make a head or tail out of this.
> What changed from e.g. 'request.vars.messag'?
> DO you have any example I can use?
> Regards
>
> On Monday, February 24, 2020 at 2:17:22 AM UTC+3, Val K wrote:
>>
>> p4web `request` is bottle request, see 
>> https://bottlepy.org/docs/dev/api.html#bottle.Request 
>>
>> On Monday, February 24, 2020 at 12:30:29 AM UTC+3, Maurice Waka wrote:
>>>
>>> New issue with py4web.
>>>
>>> Whats the new code for request.vars??
>>>
>>> I get this error:
>>>
>>>
>>> Traceback (most recent call last):
>>>  File "/home/maurice/.local/lib/python3.6/site-packages/bottle.py", 
>>> line 1397, in __getattr__
>>>  var = self.environ['bottle.request.ext.%s'%name]
>>> KeyError: 'bottle.request.ext.vars'
>>>
>>> During handling of the above exception, another exception occurred:
>>>
>>> Traceback (most recent call last):
>>>  File "/home/maurice/py4web/py4web/core.py", line 551, in wrapper
>>>  ret = func(*func_args, **func_kwargs)
>>>  File "/home/maurice/py4web/py4web/core.py", line 512, in wrapper
>>>  ret = func(*args, **kwargs)
>>>  File "apps/_scaffolds/controllers.py", line 86, in index
>>>  if request.vars:
>>>  File "/home/maurice/.local/lib/python3.6/site-packages/bottle.py", 
>>> line 1400, in __getattr__
>>>  raise AttributeError('Attribute %r not defined.' % name)
>>> AttributeError: Attribute 'vars' not defined.
>>>
>>>
>>>

-- 
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 because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/74846e2b-48a6-4cd6-9c1d-d9af401cd631%40googlegroups.com.

Reply via email to