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
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
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)
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
'.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
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
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
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
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,
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
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
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
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
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
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_
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
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
>
> 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
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,
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,
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,
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'
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.
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
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
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.
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 =
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
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 ??
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
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
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
I feel like if I'm going to try and learn model-less app development, it's
time to re-evaluate other frameworks.
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
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
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
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
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
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
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?
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?
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
>
+1
+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
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
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
I'd like to hear from anyone who's successfully using web2py with FastCGI,
especially if you're using routes.py.
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
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'
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
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
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
67 matches
Mail list logo