[web2py] request vars data file

2022-02-18 Thread 黄祥
def barcode(): req_vars = request.vars #first_key = list(req_vars.keys() )[0] first_key = next(iter(req_vars) ) reader = BarCodeReader() results = reader.decode(first_key) return results """ curl -X POST --user admin:password -d '@filename.png' -i http://localhost:8000/te

[web2py] Request for direction to benchmark

2018-11-07 Thread mostwanted
Guys i am having a really hard time making a point of sale system with web2py, i have worked on the UI but I cant get it to make any sales at all. Has a point of sale system ever been made with web2py, if there is where can i find an example? Or if anyone is interested in assisting me with mine

[web2py] Request Storage.Sqlite for last Loggued User

2018-05-27 Thread Nicolas Hiblot
Hello All, I try to get the information of the last loggued user on my web2py application. The goal is to have the user_id number to fix some HTML tags I have got a SQLITE request #SELECT user_id FROM auth_event WHERE description LIKE '%connect%' AND time_stamp = (SELECT MAX(time_stamp)

[web2py] Request with login privileges hangs for a specific user account, how to debug it?

2018-04-02 Thread Lisandro
Hi there! I'm having this weird problen and I can't figure out how to debug it, I was hoping you can help me. When a user logs into my application, I set a cookie for the subdomain where the user is logged in and also I make the cookie valid for the main domain. This is working smoothly, we ha

[web2py] Re: Web2py request different behavior on local and online version (server code executes, but returns 404

2016-08-18 Thread Massimo Di Pierro
'.json' after > serverFunction) > > $.ajax({ > type: 'POST', > url: "{{=URL('default', 'serverFunction')}}", > data: {id: id}}); > > The server code executes, but returns a 404 error. > > On the online version, it

[web2py] Web2py request different behavior on local and online version (server code executes, but returns 404

2016-08-16 Thread Ur. Kr.
s a 404 error in both cases, executing the server code. Cross-posting from here: http://stackoverflow.com/questions/38870171/web2py-request-different-behavior-on-local-and-online-version-server-code-execu -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com

[web2py] request

2015-05-20 Thread KevC
Hi community! I have a question about how use variables. I wanna use a "INPUT" like a variable, I don't wanna the strings or integer or text, etc that there is in the "INPUT". I only use the INPUT, I need to do a comparison. What can I do? Maybe Can I use a "request"? But, How? Thanks My best

Re: [web2py] request table name

2015-04-12 Thread 黄祥
brilliant as always, never thought that the callback can be rearranged on the list. thank you so much Anthony for show me the way. best regards, stifan On Sunday, April 12, 2015 at 8:48:06 AM UTC+7, Anthony wrote: > > OK, the problem is that with record versioning, there is a common filter > ap

Re: [web2py] request table name

2015-04-11 Thread Anthony
OK, the problem is that with record versioning, there is a common filter applied that excludes records with is_active=False. The _after_update callback gets called *after* the is_active field has been set to False (which happens when the table's _before_delete callback is called). As a result,

Re: [web2py] request table name

2015-04-10 Thread Anthony
Can you post a minimal app that reproduces the problem? On Friday, April 10, 2015 at 3:50:45 AM UTC-4, 黄祥 wrote: > > can not, with auth.signature n record versioning, the Set Object can not > be processed further when it goes to the f['is_active'] == False. It just > can be use as is Set Object

Re: [web2py] request table name

2015-04-09 Thread Anthony
The _before_delete callback should work with auth.signature and record versioning. Note, however, that with record versioning, a special _before_delete callback is added that does an update with is_active=False. So, in addition to adding your own _before_delete callback, your _before_update cal

Re: [web2py] request table name

2015-04-09 Thread 黄祥
thank you so much anthony. it seems need _before_delete callback, with some condition (auth.signature disable or create custom auth.signature). ref: https://groups.google.com/forum/#!searchin/web2py/_before_delete$20callback$20/web2py/didLpxEKT38/mRzmEgHCQeEJ best regards, stifan > -- Resourc

[web2py] [Request] LDAP/FreeIpa Schema support

2015-04-09 Thread Vicente Carro
Hi, We had a hard time configuring web2py to authorise using our LDAP/FreeIPa schema. More precisely getting the groups of the user. At the end we had to do a few changes directly in ldap_auth.py, that's not ideal but at least it's working. Could be possible for you to add one mode in LDAP even

Re: [web2py] request table name

2015-04-08 Thread Anthony
Actually, it turns out you need to use the _before_delete callback -- it should be executed, even when using record versioning. Anthony On Wednesday, April 8, 2015 at 5:14:00 PM UTC-4, 黄祥 wrote: > > the delete call back execute on after update callback can't passed the set > object to get an id

Re: [web2py] request table name

2015-04-08 Thread 黄祥
the delete call back execute on after update callback can't passed the set object to get an id deleted. e.g. def after_update_event(s, f, table): table_input = s.select().first() if 'is_active' in f and f['is_active'] == False: current.db.auth_event.insert(time_stamp = current.request.now, client_

Re: [web2py] request table name

2015-04-08 Thread Anthony
Don't check the Row object -- instead, directly inspect the update fields: if 'is_active' in f and f.is_active == False: [log delete event] else: [log update event] If you have some tables that aren't tracking revisions, then you will need a standard _after_delete callback for those. An

Re: [web2py] request table name

2015-04-08 Thread 黄祥
just follow your hints, it works well n avoid me having an ugliness code (for put insert n update callback for every defined tables), but as describe later the before callback is still not work after following your hints. actually i kinda love the idea to set the is_active into False rather tha

Re: [web2py] request table name

2015-04-08 Thread Anthony
> > tested using before_delete callback is not work, because the main problem > of webp2y imho is when using record_versioning or auth.signature, the > record is not actually deleted, just set the field is_active into False / > off, so the before_delete callback is not execute, the solution jus

Re: [web2py] request table name

2015-04-08 Thread Anthony
I think the problem with the original code is that it adds the callback to the auth_event table itself, so when there is an insert on that table, it goes into infinite recursion. Instead, just skip that table when adding the callbacks: [db[table]._after_insert.append(partial(after_insert_event,

Re: [web2py] request table name

2015-04-08 Thread 黄祥
the problem is in the looping, but the partial from functools do the trick, thank you so much anthony. the solution is not use the looping, but put everything on it's own table definition, and if using in form level, just passed it using partial too. tested it work fine in form level (oncreate,

Re: [web2py] request table name

2015-04-08 Thread 黄祥
already tried it but return an error e.g. define all tables on db_wizard_0.py *models/db_wizard_event.py* from functools import partial def after_insert_event(f, id, table): db.auth_event.insert(time_stamp = request.now, client_ip = request.client, user_id = auth.user_id,

Re: [web2py] request table name

2015-04-07 Thread Anthony
In a model, after all tables have been defined, you could do something like this: from functools import partial def after_insert_event(f, id, table): db.auth_event.insert(time_stamp = request.now, client_ip = request. client, user_id = auth.user_id, origin = '%s/%s'

Re: [web2py] request table name

2015-04-07 Thread 黄祥
basically i've already create a function for it, either put it on form level or database level, but the problem is i can't get the table name to put it on auth_event table (description field). *e.g. event recorded on form level* def oncreate_event(form): db.auth_event.insert(time_stamp = request.

Re: [web2py] request table name

2015-04-07 Thread Richard Vézina
If it is not in args or vars, I guess you can't have it!! At least from the URL... You better look from backend side for this, postgres log for instance... Richard On Tue, Apr 7, 2015 at 11:12 AM, 黄祥 wrote: > i've already read it before, what i want to achieve is get the table name > for every

Re: [web2py] request table name

2015-04-07 Thread 黄祥
i've already read it before, what i want to achieve is get the table name for every database table interaction and put it on auth_event. already checked in documentation about request but couldn't find it. already checked from response.toolbar() too but still can't find it. ref : http://web2py.c

Re: [web2py] request table name

2015-04-07 Thread Richard Vézina
You may consider this : http://www.web2pyslices.com/slice/show/1618/basic-usage-statistics-log-what-your-users-do I use this for 3 years and it works great... Richard On Tue, Apr 7, 2015 at 10:45 AM, 黄祥 wrote: > hi, > > i want to create a user activity history log, and put it on auth_events. >

[web2py] request table name

2015-04-07 Thread 黄祥
hi, i want to create a user activity history log, and put it on auth_events. in the description i want to have the table name that interacted with (CUD (Create, Update, Delete) ) e.g. when created new record, i want to have something like this in auth_event description = 'Table Product ID 8 is

Re: [web2py] Request vars - basic question

2015-02-20 Thread Richard Vézina
request.vars value are plain string. If you pass a json as a var for instance ?input=JSON_CONSTRUCT You will have to use simplejson.load(request.vars.input) To restore the plain text JSON_CONSTRUCT from the ajax call into a JSON object. Here doc for python lib json : https://docs.python.org/2/li

[web2py] Request vars - basic question

2015-02-20 Thread clara
Hello, I am making an Ajax call and calling a controller with the json data I need to process in the controller. The problem I am having (and I am sure the answer will be simple and I will hate myself for the silly question ) is that if I select request.vars.input, its value is not a json obje

[web2py] Request Password not working correct

2015-01-05 Thread Ramashish Gaurav
Hi all, I have deployed my app on internet. At initial stage, every thing was working great. No bugs. When a user would register himself, a confirmation email would be successfully sent to the user's registered email id. Even the 'Lost Password' option was working correct. Now I made some chang

[web2py] Request for assistance

2014-11-21 Thread mmoradrrrr
I am in the process of creation of synthesis site looking at other sites, do any of you can aide true value of some books for aggregate roads, aggregate sites, and thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sourc

[web2py] request password generates an infite loop?

2014-09-10 Thread Martin Weissenboeck
I have a fresh copy of w2p 2.9.9 and I have tried the request_reset_password function. It generates an email with a text like http://127.0.0.1:8000/testupdate/default/user/reset_password/14104... It's the right auth_user.reset_password_key That's ok, but if I try this link I get an error message f

[web2py] python web2py request encoding character in string

2014-02-19 Thread Raul Santos Moreno
Hello, first salute all those who belong to this group and thanks in advance. I have a question that I've been trying to solve: I'm using web2py for a project and one of the drivers I have to detect the characters of a string as parameter to pick the url. The problem is that I need a text enc

[web2py] request desktop site is not work when open web2py admin in mobile

2014-01-02 Thread 黄祥
hi, i figure it out that request desktop site is not work when open web2py admin in mobile, is it normal? i think i can use upload and install packed installation from mobile when request desktop site is enable. i test it with chrome and firefox on android but got the same result. thanks and b

[web2py] Request password reset not working

2013-12-23 Thread Bastiaan van der Veen
I have a auth table with usernames ( auth.define_tables(signature=True, username=True)) and my forgot password is not working anymore. It's the standard function: def user(): """ exposes: http:///[app]/default/user/login http:///[app]/default/user/logout http:///[ap

[web2py] Request: Error Traceback Page: Requested URL with Arguments

2013-10-25 Thread BlueShadow
Hi, I would love to see a little addition to the error page: A line where it displays the entire URL with all the arguments. I know its already under the request button. but its spread and I have to search for it every time. it would really speed up my process of looking for an error. And I guess

[web2py] Request: Course about Web2py & TDD + pledge for cash

2013-08-12 Thread Arnon Marcus
Have you seen this? www.google.co.il/url?q=http://www.kickstarter.com/projects/1369857650/real-python-for-web-development-featuring-web2py&sa=U&ei=7L8IUpv9JITBhAfO3ICgAg&ved=0CAgQFjAA&sig2=O3-v5BoCopi7PkTsHu1ruA&usg=AFQjCNETtaOj7l8Urfb41wH-_hxcATQg0w -- --- You received this message because yo

[web2py] Request: Course about Web2py & TDD + pledge for cash

2013-08-11 Thread Mika Sjöman
Hi I am trying to get started with TDD and web2py, but it is really hard since I do not have a CS degree. I have been studying this two courses at Coursera, and especially the former is awesome (I did not like the Intro to Systematic program design so much) https://class.coursera.org/programmi

Re: [web2py] request args

2012-11-17 Thread Paul Rykiel
tried casting the request.args(0) as an int, it does not work I am afraid. I capture the request.arg(0) in the variable and if I print the variable tag_no I see a value in there so I don't know. On Wednesday, November 14, 2012 4:58:05 AM UTC-6, David Sorrentino wrote: > Hello Paul, > > reque

Re: [web2py] request args

2012-11-14 Thread Vinicius Assef
Are you passing the argument "1" in your URL? On Tue, Nov 13, 2012 at 9:28 PM, Paul Rykiel wrote: > Hi just learning WEB2py and I have a question: > > why do i get an error on this code > *** This code errors out, but when I replace "tag_no" with 1 for record id > 1, it works, also the variable

Re: [web2py] request args

2012-11-14 Thread David Sorrentino
Hello Paul, request.args[0] returns a string, and for *Rows = db(db.bike.id==tag_no).select() *you need an integer. Try this: tag_no = int(request.args(0)) > And let me know. Cheers, David On 14 November 2012 00:28, Paul Rykiel wrote: > Hi just learning WEB2py and I have a question: > > why

[web2py] request args

2012-11-14 Thread Paul Rykiel
Hi just learning WEB2py and I have a question: why do i get an error on this code This code errors out, but when I replace "tag_no" with 1 for record id 1, it works, also the variable "tag_no" has a 1 as a value when i type in an argument 1 on the end of the URL * def tag(): tag_no =

[web2py] REQUEST: Flag if database changes

2012-07-11 Thread Jason Brower
I wonder if the following would be good: A flag would be marked True if there has been an auto-migration. Then you could check if a change has happened and fix items in your database, but not need to search every time a page is run. For example, if there are items that have a None and now need to

[web2py] Request all function from a controller

2012-03-19 Thread Hassan Alnatour
Dear ALL , How can i get all the functions in a controller ?? i know i can get the function am in using request.function but how can i get them all ??

Re: [web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread Johann Spies
On 28 February 2012 00:25, Anthony wrote: > Also, keep in mind that "model-less" can mean many things. It doesn't > necessarily entail the highly class-based approach you see in Bruno's > Movuca. It could mean simply moving some standard table definitions from > model files into functions in modu

Re: [web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread Anthony
Also, keep in mind that "model-less" can mean many things. It doesn't necessarily entail the highly class-based approach you see in Bruno's Movuca. It could mean simply moving some standard table definitions from model files into functions in modules. In fact, I think Bruno's class-based design

Re: [web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread Bruno Rocha
On Mon, Feb 27, 2012 at 5:31 PM, pbreit wrote: > I feel like if I'm going to try and learn model-less app development, it's > time to re-evaluate other frameworks. I do not agree, web2py has a lot of features, executed "models" and global scope are not the only good feature of web2py, we can ha

Re: [web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread pbreit
I feel like if I'm going to try and learn model-less app development, it's time to re-evaluate other frameworks.

Re: [web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread Johann Spies
On 27 February 2012 10:49, Bruno Rocha wrote: > Massimo and Mariano are developing a conditional model_map, so you will be > able to choose which model files to run for each requested controller, it > will be a very good add to web2py. > > Maybe it will be included only in web2py 2.0. > > Good ne

Re: [web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread Bruno Rocha
Massimo and Mariano are developing a conditional model_map, so you will be able to choose which model files to run for each requested controller, it will be a very good add to web2py. Maybe it will be included only in web2py 2.0. I still think we need a model-less approach using modules, and it n

[web2py] Request for some formal guidelines on models in modules

2012-02-27 Thread Johann Spies
The thread in this mailing list with the subject "*model less apps (a blog example)" *and some other remarks about using model-less applications for better speed and memory usage is the background of this email.I would be glad if the guidelines (not necessarily recipes) on this can become part of

[web2py] Request to tag releases on github repo

2012-01-18 Thread Praneeth
Hello Massimo, It would be great if you could tag a release while committing to github. It will enable us to fetch the latest stable release from github easily - Instead of looking at the VERSION file and backtracking the commit no to checkout to. Thanks, Praneeth

[web2py] request reset password

2011-12-07 Thread Constantine Vasil
I implemented request_reset_password in a separate url to have more control on the design. The email comes with the link pointing to: /reset_password. I am clicking on the link and I can change the password but the button showing on reset_password form is "Request Reset Password" like the button

[web2py] Request same function on .change event.

2011-10-07 Thread annet
I have a registration form with a drop down list showing services, depending on the service the user registers for a custom form should display. Normally the user follows a link and the service is set based on request.args(0): form=SQLFORM(db.register) form.vars.service=request.args(0) I customiz

Re: [web2py] request - mmodal examples

2011-07-16 Thread Ismael Serratos
Same here any example? On Fri, Jul 15, 2011 at 7:23 PM, niknok wrote: > I just "discovered" this modal plugin: web2py.com/plugins/default/ > mmodal > > Sorry for being a little slow, but would someone please post an > example of how I can use crud inside modals?

[web2py] request - mmodal examples

2011-07-15 Thread niknok
I just "discovered" this modal plugin: web2py.com/plugins/default/ mmodal Sorry for being a little slow, but would someone please post an example of how I can use crud inside modals?

Re: [web2py] request for error log to default to "list by ticket"

2010-12-20 Thread Thadeus Burgess
I think it depends on what mode. In production, I want to view by exception In development, by ticket would be more appropriate. -- Thadeus On Sat, Dec 18, 2010 at 5:11 PM, Kuba Kucharski wrote: > +1 >

Re: [web2py] request for error log to default to "list by ticket"

2010-12-18 Thread Kuba Kucharski
+1

Re: [web2py] request for error log to default to "list by ticket"

2010-12-18 Thread Bruno Rocha
+1 the same for me (to be honest I thonk it is so hard to manage tickets by exception, it is a nice feature as report, but I think teh default should be by ticket. 2010/12/18 weheh > 99.99% of the time when I visit the error log, it's to see the latest > ticket. In a recent release, the error lo

[web2py] request for error log to default to "list by ticket"

2010-12-18 Thread weheh
99.99% of the time when I visit the error log, it's to see the latest ticket. In a recent release, the error log started to default to "list by exception". This is a nice feature, but I almost never use it. So I'm always forced to click on "list by ticket" and then click on the first item. If othe

[web2py] Request for a logo - PluginCentral

2010-10-24 Thread Thadeus Burgess
I am working on plugin central, finally have some free time to devote to the project. However I am a horrible artist, and wonder if anyone would like to help me with designing a logo? This is my color scheme White - body content #5E99E7 - Links & main color (a light blue) #F5F4EF - Grey, page bac

[web2py] request for fcgi users

2010-10-22 Thread Jonathan Lundell
I'd like to hear from anyone who's successfully using web2py with FastCGI, especially if you're using routes.py.

Re: [web2py] request with args

2010-04-28 Thread Thadeus Burgess
session.flash = "message" On this note, I would almost like to suggest a patch to the usage of response.flash. Currently it is just a string, however I suggest that we make it standard to use it as a list. Several times I have had my response.flash overwritten by either a plug-in or my own when I

Re: [web2py] request with args

2010-04-28 Thread Jonathan Lundell
On Apr 28, 2010, at 9:30 AM, annet wrote: > In one of my functions I redirect the user to another function. I > would like to notify the user that he has been redirect by setting a > flash message, the problem is the args in the url. This is the > function: > > if > request==URL(r=request,a='crm'

[web2py] request with args

2010-04-28 Thread annet
In one of my functions I redirect the user to another function. I would like to notify the user that he has been redirect by setting a flash message, the problem is the args in the url. This is the function: if request==URL(r=request,a='crm',c='clublocatormail',f='update_form'): response.f

[web2py] request for beta testers for a web2py application

2010-02-01 Thread coolaid
The site provides editing and proofreading services. The service is designed with non-native English speakers in mind and offers very fast turn-around times (think business emails and blog posts). http://standardminds.com I'm offering free proofreading to beta testers! PM me for a coupon. Please

[web2py] Request/Idea

2010-01-18 Thread Jason Brower
I think it would be nifty to have an interface (app store?) to install and remove pluggins from your web2py installation. I suppose that feature should be at the application level and not the web2py level. Any thoughts on it? It could parse a feed and then from it's name could tell if it's been i