I have two applications one init and one cms. In init I have
a few functions for which the user needs to be logged in.
These functions only read from the database they do not
write to the database.
I thought I could use
session.connect(request, response, masterapp="cms")
to share the fact that a
Thanks for the explanation Anthony.
quarta-feira, 27 de Março de 2019 às 02:37:06 UTC, Anthony escreveu:
>
> What is the more secure way to transfer the modified_on?
>> Using
>> session.modified_on
>> or
>> form['hidden'].update(modified_on=form.record.modified_on)
>> and then
>> request.post_v
I have a SQLFORM.factory where I edit a record from a grid (the record is
selected in the grid and the user presses a button created with the grid's
selectable).
At the start of the edit function I read the record in question from the
database to fill the SQLFORM.factory fields.
If the user trie
Please show the code.
On Wednesday, March 27, 2019 at 6:40:26 AM UTC-4, João Matos wrote:
>
> I have a SQLFORM.factory where I edit a record from a grid (the record is
> selected in the grid and the user presses a button created with the grid's
> selectable).
> At the start of the edit function
I have 2 functions and i want to use the variable returned by one function
in another function, how can i achieve this?
I want to use resultsARE in *function1 *in the same way in *function2 *as
attempted in the highlited lines.
*FUNCTION1*
def companies():
*resultsARE=db.services(request.ar
Just to add to this, I've done some further testing and can confirm a few
more bits about the inconsistency.
Firstly the behaviour is not browser-specific, occurring in both firefox
and chrome.
Secondly it seems to fail always when running web2py normally. When running
in the debugger in pycha
I was able to solve it with the SQLFORM.factory hidden parameter.
Thanks.
quarta-feira, 27 de Março de 2019 às 11:10:07 UTC, Anthony escreveu:
>
> Please show the code.
>
> On Wednesday, March 27, 2019 at 6:40:26 AM UTC-4, João Matos wrote:
>>
>> I have a SQLFORM.factory where I edit a record from
You probably just need to rewind the file because request.vars already
loaded it.
request.vars.csvfile.file.seek(0)
candidate_file = request.vars.csvfile.file.read()
Instead you can just do:
candidate_file = request.vars.csvfile.value
Which uses the value of the file already got by request
--
On Wednesday, March 27, 2019 at 8:50:56 AM UTC-4, João Matos wrote:
>
> I was able to solve it with the SQLFORM.factory hidden parameter.
>
OK, but note that there is no need to have the user refesh the page to
proceed.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
It's not quite clear what you mean. Are these two functions two separate
controller actions? If so, it's not clear how you can share that variable,
as it is defined based on request.args(0) in the first function, but
presumably request.args(0) has a different meaning in the context of the
secon
Need to see your code.
On Wednesday, March 27, 2019 at 2:47:01 PM UTC-4, João Matos wrote:
>
> You mean to update the editing form with the new values from the record on
> the db without telling the user to press F5?
> How can I do it?
>
> Thanks.
>
--
Resources:
- http://web2py.com
- http://we
You mean to update the editing form with the new values from the record on
the db without telling the user to press F5?
How can I do it?
Thanks.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p
Have you tried adding the following in a model file of the "cms" app:
response.cookies['session_id_cms']['domain'] = '.yourdomain.com'
That should share the session cookie among all subdomains under the main
domain.
Anthony
On Wednesday, March 27, 2019 at 4:46:24 AM UTC-4, Annet wrote:
>
> I h
This is my code for the another table (it has the same situation, but
without using a SQLFORM.factory).
I posted this instead of the SQLFORM.factory, because it is simpler code.
My index function contains the grid
grid = SQLFORM.grid(
query,
csv=False, deletable=F
Could you not use:
*session.resultsARE= *
*to save it an reuse it and pass during the whole session ?*
*Ben Duncan*
DBA / Chief Software Architect
Mississippi State Supreme Court
Electronic Filing Division
On Wed, Mar 27, 2019 at 1:42 PM Anthony wrote:
> It's not quite clear what you
Hi Massimo --
I think I understand your point. But from where I sit it appears that
Redis cannot handle even VALUES as "bool". They now say it must be mapped
to an integer or a string. I'm pretty sure I'm not using a bool as a key
in any dictionaries (they make lousy keys) but I AM using num
It's not your values Joe, pickle serializes them as a string so they would
be fine. It's web2py session locked field which is True or False. It's
probably easy to fix this in redis_session.py
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/w
I don't see any code that checks for record change, but you could do
something like:
elif request.args and request.args[0] == 'edit':
if request.vars.modified_on != str(form.record.modified_on):
session.flash = 'Record change detected. Please try again.'
redirect(URL(args=requ
Ok this is what i am trying to achieve and have been struggling with for
weeks now, in the controller below I am searching for businesses that offer
desired services, after displaying all those businesses, from that very
list am trying to further filter through that list by searching for
busine
19 matches
Mail list logo