On Saturday, January 7, 2017 at 11:07:36 AM UTC-8, Anthony wrote:
>
> On Saturday, January 7, 2017 at 1:57:36 PM UTC-5, Brendan Barnwell wrote:
>>
>> The shared functionality involves DB access, so as far as I can tell it
>> cannot be abstracted into modules that would then be imported with a norm
On Thursday, January 12, 2017 at 11:50:16 AM UTC-8, Dave S wrote:
>
>
>
> On Thursday, January 12, 2017 at 11:36:32 AM UTC-8, Andrea Fae' wrote:
>>
>> request.env.http_referer contains all URL starting with http://..., I
>> need the last part after /. Thank you
>>
>
> Python has the urlparse funct
nice trick gael
thanks and best regards,
stifan
--
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 t
Hi Stifan.
I do it like that, for example for a table called cm1:
import os
from cStringIO import StringIO
#Original table
db.define_table('cm1',
Field('code', type='integer'),
Field('title_en', type='string'),
Field('title_it', type='string'))
#Ta
I use this solution, not so 'beautiful' but it works.
In the layout I save the current URL like this:
{{current_url = URL(args=request.args, vars=request.get_vars)}}
I do it in the layout like that I'm sure to always doing it.
After that you can add where you need it in a link this current_url as
Good day Luca/Massimo,
Can you show me the final code ..i'am trying to do exactly that.
(unsure of what you have done exactly in db.py)
Thanks
Le lundi 28 mars 2016 05:51:33 UTC-4, lucas a écrit :
>
> yes massimo,
>
> that almost worked. as suggested, i first changed it under the db.py
On Thursday, January 12, 2017 at 11:36:32 AM UTC-8, Andrea Fae' wrote:
>
> request.env.http_referer contains all URL starting with http://..., I need
> the last part after /. Thank you
>
Python has the urlparse functions. Indeed, web2py uses that stuff.
https://docs.python.org/2/library/urlpar
form.vars is a dict-like object, so not guaranteed to return keys in any
particular order. If the form is based on a db table, you can iterate
through db.table._fields. The form object also includes the list of field
names in form.fields.
Anthony
On Thursday, January 12, 2017 at 1:37:03 PM UTC
request.env.http_referer contains all URL starting with http://..., I need
the last part after /. Thank you
Il giorno giovedì 12 gennaio 2017 18:45:58 UTC+1, Gaurav Vichare ha scritto:
>
> request.env.http_referer contains link to the referrer page, i. e.
> previous page!
>
> On Thursday, Januar
On Thursday, January 12, 2017 at 7:53:05 AM UTC-8, lyn2py wrote:
>
> Well... after taking time out to write the entire story... my mistake.
>
The first step in code reviews is publishing the code :-) Does a lot to
clarify the mind!
Glad you found the issue and got it sorted, and thanks for r
Currently I see that the order in which the fields appear in form is not
same when i iterate through form.vars
I am using SQLFORM.
So how do I get the form.vars so that they appear in same order as they do
on the form?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
request.env.http_referer contains link to the referrer page, i. e. previous
page!
On Thursday, January 12, 2017 at 7:55:26 PM UTC+5:30, Andrea Fae' wrote:
>
> I don't know what is the previous page because this page can come from
> different pages...this is the problem...I want to reference the
I have LOAD component in my application. I made changes in web2py/routes.py
file and made my application default application, 'default' controller and
'index' function as defaults. Also added function list of default.py
controller in routes.py to distinguish between args and function
name(https
I do not know if this is the best way to do this, because it is not very
practical if you have several pages ..
2017-01-12 14:14 GMT-02:00 Áureo Dias Neto :
> you can take this:
>
> if user is in PageA, and click a button to go to another page, pass the
> name of the actual page as arg, before re
you can take this:
if user is in PageA, and click a button to go to another page, pass the
name of the actual page as arg, before redirect.. example:
-user is in PageA:
on the button that redirect to another X page:
form.add_button("Annulla",URL('default','PageX',args='PageA'))
when user is on
Well... after taking time out to write the entire story... my mistake.
In define_tables > Field, I assigned it (a long time ago) as "string"
instead of "integer". So the comparison was switched around, because it was
comparing a single digit, e.g. 5, to a double digit number, like 15. It's
all
imagine table with thousands data
e.g.
name quantity price
product a 10 1
product b 15 11000
and every several months (5 or 6 months) the supplier send the update of
the product price
is it possible to import csv that can update some existing data (*not
insert new data*) in existing table
Hi guys, I just wanted to confirm this.
The web2py book (link =
http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#callbacks-on-record-insert-delete-and-update)
says:
"The return values of these callback should be None or False. If any of the
_before_* callback re
My server is in UTC, my client is in Europe (time zones) .When client
searches on a date time field the datetime string is sent in local time.
The grid is showing datetime in local time as it should,using the great
timezone plugin
(didn't work also before Breksit:-)
--
Resources:
- http://web2
Hi, I am getting a problem with a custom widget
(https://github.com/daxslab/web2py-typeahead/blob/master/modules/plugin_typeahead/typeahead.py)
using SQLFORM, everything works fine but with the edit form, when I
click on submit button the form is not updated with the new value (the
new value is
I don't know what is the previous page because this page can come from
different pages...this is the problem...I want to reference the previous
page... thank you
Il giorno martedì 10 gennaio 2017 11:48:42 UTC+1, Áureo Dias Neto ha
scritto:
>
> example:
>
> form.add_button("Annulla",URL('default
Hello,
I want to use both local and domain AD authentication.
I did the job but I want to see Profile and change password ONLY for local
users and not for domain users.
How to do?
Thank you
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2
When I use *db.executesql* like so:
birthdays = db.executesql("SELECT * FROM auth_user WHERE DAYOFYEAR(curdate()
-2) < dayofyear(dateOfBirth) "
"AND DAYOFYEAR(curdate()) +7 >=
dayofyear(dateOfBirth) "
"AND employeeState_id = {1} AND location_i
Feel free to open a Github issue, or better yet, send a pull request.
Depending on your use case, another option is to instead decorate the
call() action in order to pass in extra args (you can strip them out of
request.args and request.vars before the service method gets called).
Anthony
On W
24 matches
Mail list logo