Hi Stifan,
On 28/02/13 07:44, 黄祥 wrote:
a, i c, i get it to use sqlform.factory and if form accepted store it in
session for id and quantity, the main problem is in my view i make a
condition for view as grid or view as list, i don't think it can be done
by sqlform, since the form place is verti
a, i c, i get it to use sqlform.factory and if form accepted store it in
session for id and quantity, the main problem is in my view i make a
condition for view as grid or view as list, i don't think it can be done by
sqlform, since the form place is vertical, not horizontal, if you use the
lis
Hi Teddy,
Ignore my last - I'd overlooked that you were using "session=None". I'll
drink more coffee!
N.B. Using SQLFORM that way turns off some valuable protection.
As your other reply suggests, the lack of a form "action" may be the issue.
--
Regards,
PhilK
'a bell is a cup...until it
Hi,
On 28/02/13 07:28, 黄祥 wrote:
thank you so much for your recommendation, i think sqlform will store it
into database table not in session
It will - but you can use SQLFORM.factory to get the benefit of web2py's
form processing without using the db: -
http://web2py.com/books/default/chap
hi philip kilner,
thank you so much for your recommendation, i think sqlform will store it
into database table not in session, so that i'm not using it, because i
want to pull everything that user input first (using session), before they
checkout. i've tried a lot of things in here, such as, pu
please try this in your view:
*add_address.html [View]*
{{extend "layout.html"}}
Street:
Suburb:
Town:
Province:
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop rece
Hi,
On 28/02/13 07:01, 黄祥 wrote:
do you have any hints, correction or suggestion about this things?
I'd very strongly recommend using SQLFORM rather than rolling your own
forms, and components + LOAD rather than rolling your own Ajax.
Doing this stuff by hand is do-able but fiddly and tedi
Hi Teddy,
On 28/02/13 06:51, Teddy Nyambe wrote:
I am following the book example with modified tables, the form is not
being processed in the controller, what could be wrong with my code below:
I think it's the way you have constructed your form: -
*add_address.html [View]*
{{extend "layou
hi Philip Kilner,
actually, i'm just want to create the application shopping cart base on pos
online store that i've downloaded in web2py appliances. the things that i
asked here is that i want to modified the user can input the quantity in
form input and then add it into shopping cart (store i
I am following the book example with modified tables, the form is not being
processed in the controller, what could be wrong with my code below:
*db.py [Model]*
db.define_table("address",
Field("street", requires=IS_NOT_EMPTY()),
Field("suburb", requires =
Hi,
On 28/02/13 05:54, 黄祥 wrote:
i've tried to learn ajax callback using form(), but it's not work (no
error occured), did anyone know the solution for this?
thank you very much before
I'm having a little trouble understanding what you are doing here - I
would definitely use the tools that w
hi,
i've tried to learn ajax callback using form(), but it's not work (no error
occured), did anyone know the solution for this?
thank you very much before
here is my code:
*#controller*
def order_callback():
id=int(request.vars.id)
quantity=int(request.vars.quantity)
if request.vars
Niphold , i tried alot but i am not getting my required result, would you
like to do it for me by using AJAX.
plz modify my code where ever it needed to be.
on post i want to submit the form and on success call back i need
fancybox, where fancybox URL is default_group_select.
Thanks in advance.
I don't think you want to be specifying port 8000 on the provider. Start
the provider instance on 443 and either change the port to 443 in the url
or leave it off since 443 is the default for ssl.
On Wednesday, February 27, 2013 1:56:12 PM UTC-8, rh wrote:
>
> On Mon, 25 Feb 2013 01:35:41 -08
OK. I am going to make a video about this but I swear unless a bug was
introduced recently there is no gotchas in this.
On Wednesday, 27 February 2013 15:56:12 UTC-6, rh wrote:
>
> On Mon, 25 Feb 2013 01:35:41 -0800 (PST)
> CrC Nommack > wrote:
>
> > Hi I have the same problem, please help.
>
I still do not understand. Why index() is under returning some times json
and some times dict with a form? Who makes the ajax callback? If this to be
embedded in a large page? What is the JS?
On Wednesday, 27 February 2013 14:49:04 UTC-6, yashar wrote:
>
> def ajax_login_bare(self, username,
Hello,
I try to build my own form with FORM. Is there a way to use autocomplete on
a manual input of the form instead of using SQLFORM. How can I use widgets
on normal FORM input elements?
Best regards,
Joerg
--
---
You received this message because you are subscribed to the Google Groups
Hello world from scratch
download web2py and unzip it.
create a new app folder web2py/applications/*hello*
create a model file web2py/applications/hello/*models/model.py
*
# coding: utf-8
from gluon.tools import Auth
db = DAL("sqlite://hello.db")
auth = Auth(db)
auth.define_tables()
db.defin
This is an override of auth.login, which is being used in multiple pages,
not just views/default/user.html. Auth.login already did a lot of things
with custom CSS classes that I'd like to keep using. At the moment I'm
doing the following:
{{top_login_form = auth.login(next =
2013/2/26 Niphlod :
> never done it, but debugging a multiprocessing spawned process needs
> additional tuning http://pydev.org/manual_adv_remote_debugger.html
>
> PS: can I ask what is not working ? if it's a "focused" problem maybe I can
> come up with an answer .
I've fixed it , it was a proble
http://web2py.com/books/default/chapter/29/03#Simple-examples and
following
On Wednesday, February 27, 2013 9:27:15 PM UTC+1, Semy wrote:
>
> I'd like to try web2py, but my first impression was "Is there any way to
> build app from scratch? withouth 'magic wizzard'?"
>
> I like to know what
ehm ... request.application !
On Wednesday, February 27, 2013 10:26:51 PM UTC+1, RHC wrote:
>
> I'm trying to use javascript to automatically insert a link to a plugin
> web page within an application. However, the javascript, being a static
> file, has no way of generating a valid URL in the pr
I'd like to try web2py, but my first impression was "Is there any way to
build app from scratch? withouth 'magic wizzard'?"
I like to know what is going on, when I'm learning new framework and new
programming lang (I know python a bit, but I've never written any serious
app in that) and when I'
is the models/ folder empty ? in the controller/ folder is there only the
tests.py file ?
On Wednesday, February 27, 2013 10:15:22 PM UTC+1, OJ wrote:
>
> Massimo, sorry for stalking you, but could you (or somebody) make this
> work:
>
> Massimo wrote on github:
>
> wget http://web2py.com/examp
I'm trying to use javascript to automatically insert a link to a plugin web
page within an application. However, the javascript, being a static file,
has no way of generating a valid URL in the proper web2py fashion using a
URL helper.
I thought perhaps I could use the base element to re-define
you should join them and then do the ordering. auto-references are a nice
facility but comes with a price: you can't use them just like if your
records were in a single table to do a select or an update
db(db.table.refrence == db.refrencedtable.Field).select(db.table.ALL,
orderby=db.refrenc
your own template instead of the standard one defined in
views/default/user.html ?
On Wednesday, February 27, 2013 10:20:26 PM UTC+1, Chris wrote:
>
> Hello,
>
> I have a form that looks like this:
> {{top_login_form = auth.login(next =
> page_currentPath_get(request))}}
>
Why db.table.reference.Field (I presume you want say
: db.table.reference.fieldname) and not just
orderby=db.table.yourFKfieldname ??
Richard
On Wed, Feb 27, 2013 at 4:17 PM, BlueShadow wrote:
> Hi,
> I got two Tables lets call them table and referencedtable. table has a
> field which is a ref
Hello,
I have a form that looks like this:
{{top_login_form = auth.login(next =
page_currentPath_get(request))}}
{{top_login_form.elements('form')[0]['_class'] = 'login_form'}}
{{=top_login_form.custom.begin}}
Trouble is, auth.login calls SQLFORM and sets cust
Hi,
I got two Tables lets call them table and referencedtable. table has a
field which is a reference to referenced table. Now I like to select all
entries from table and order them by a field in the referenced table. In my
opinion it should work like this:
#defauft.py
rows=db().select(db.tabl
Massimo, sorry for stalking you, but could you (or somebody) make this work:
Massimo wrote on github:
wget http://web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip
cd web2py
mkdir applications/benchmark
cp -r applications/welcome/* applications/benchmark
rm applications/benchmark/mod
def ajax_login_bare(self, username, password):
"""
check user login and
return tuple of (boolean,msg) which first field is successfull login or not
and second is failure massage
"""
request = current.request
session = current.session
table_user
Have you taken a look at the field_id parameter for grid?
field_id must be the field of the table to be used as ID, for example
> db.mytable.id.
SQLFORM.grid(..., field_id = db.item.id,...) might be what you're looking
for if I'm understanding your correctly.
http://web2py.com/books/default/
You may also want to have a look at
http://web2py.com/books/default/chapter/29/10#Restful-Web-Services
and review the code examples in the trunk version in dal.py under function
parse_as_rest,
since this is still under development and the online book has not been
updated.
Regards,
Denes.
On
Is the decorated index function in the "mod" controller? If so, doesn't
this result in an infinite redirect loop (i.e., visit index -> no
session.active_mod -> redirect to index -> still no session.active_mod ->
repeat...)? Shouldn't the decorator either set a session.active_mod or
redirect to
Your decorator is wrong
this
def check_mod_set_active(callee):
if session.active_mod == None:
session.flash = 'No active module selected.'
redirect(URL('mod', 'index'))
else:
return callee
shoud be
def check_mod_set_active(callee):
def wrapper():
if s
Hi Zack,
this is a moderated group, so your first post(s) have to be approved before
they hit the group; this is done to minimize spam.
Your original post has been removed since it was a duplicate.
Hopefully you will get an answer to your problem soon.
Regards,
Denes
On Wednesday, February 27,
Hi guys I don't knwo whether this was posted the first time ok, so I am
reposting. basically I have an app that I want to check the existence of a
session parameter prior to accessing some functions. since these are
different functions in different controllers I created a model with the
folllow
Hi Dmitry,
option 3 is the closest one since references between keyed tables *must*
use tablename.fieldname,
but migrate=False should be added to each table unless it is specified in
the DB definition.
Please try again and let us know.
Regards,
Denes
On Wednesday, February 27, 2013 9:39:07
Hi,
I'm using auth.wiki() to document my app, and am failing to understand
how it interacts with the menu.
I've defined my wiki, and added it to the menu as I would any other
function. However, when I access it, both the menu defined /within/ the
wiki and the wiki menu itself appear in the m
On 27 Feb 2013, at 8:42 AM, greaneym wrote:
> Thanks for your help, Jonathan.
>
> I'm not sure if this is the intended or best way to use this but
> I looked in the manual more closely at absolute urls and this is what I added
> to my menu to get to the other location hosted on a different phy
You could do something like this in a model file or at the top of a
controller (outside any functions):
(auth.user or request.args(0) == 'login') or redirect(URL('default', 'user',args
='login'))
Anthony
On Wednesday, February 27, 2013 12:05:33 PM UTC-5, Philip Kilner wrote:
>
> Hi All,
>
> Th
Oops--for some reason (very likely me mucking things up) this was an issue
but has now magically resolved itself! Not quite sure why!
On Wednesday, 27 February 2013 20:30:21 UTC+8, Anthony wrote:
>
> Can you show some code and explain what you are expecting and what you are
> seeing instead?
>
>
Hi All,
This is one of those "I really ought to know this one" things...
I'm used to selectively requiring login, per function.
However, this is too easy to overlook!
Is there a quick way to require login for either every function in a
given controller, or for the entire app?
(Have scoured
Thanks for your help, Jonathan.
I'm not sure if this is the intended or best way to use this but
I looked in the manual more closely at absolute urls and this is what I
added to my menu to get to the other location hosted on a different
physical host.
On the models/menu.py file on host 1
(T('
I understand ... It really is something to think about. In this case we
would need an expert in database in general. At least we'd have to test
with all databases supported by DAL currently. We should not forget too
that we are talking about a particular situation .
On Wed, Feb 27, 2013 at 1:01 P
Fascinating I wonder if this logic should be built-in into executesql
somehow but I am not sure it it supported by all adapters and I am not sure
how it could be done.
On Wednesday, 27 February 2013 09:44:09 UTC-6, __pyslan__ wrote:
>
> For those interested, below the solution to the proble
Can you show a concrete example with code so we can reproduce it and debug
it? Please also open an issue so it is tracked.
On Wednesday, 27 February 2013 04:51:21 UTC-6, sander.vi...@gmail.com wrote:
>
> Good day,
>
> We're using web2py and loving it, but we ran into an issue with the
> sqlform.
Can you show an example of how to use it. I see it is not an action.
On Wednesday, 20 February 2013 08:00:50 UTC-6, yashar wrote:
>
>
> this is what i added in tools.py inside auth class, this is just
> modification of login() function and difference from main login_bare is
> this one also check
>
> It would be easy to integrate it, or any sort of lightbox like plugin,
with SQLFORM if there is the capability to give a template to SQLFORM().
>
> Looking at the documentation it doesn't seem that there is a way.
>
SQLFORM takes a formstyle argument, which can be a function/callable that
For those interested, below the solution to the problem:
def users():
user_id = auth.user_id
fields = [db.auth_user.generation, db.auth_user.id,
db.auth_user.first_name]
proc = 'CALL sp_recursive_start(' + str(user_id) + ');'
raw_rows = db.executesql(proc, fields=fields)
wh
jQuery('#source').change(function(){jQuery('#target').html(jQuery('#source').val().match(/\S+/g).length);})
On Wednesday, 27 February 2013 00:00:14 UTC-6, John Ho wrote:
>
> I would like to count the words as entered into the textareas of SQLFORM
> form. I've found several jQuery scripts, b
Found the solution. It works fine now.
I submit a ticket along with my solution for this.
http://code.google.com/p/web2py/issues/detail?id=1354&thanks=1354&ts=1361979432
On Tuesday, February 26, 2013 2:21:21 PM UTC-6, Omi Chiba wrote:
>
> How can I add margin both side of the page?
>
> I attache
Hello friends
There are a couple of legacy tables.
I try to create a reference between them.
= 1 ==
db.define_table('m_dsc_cards',
Field('cardid','string',notnull=True,unique=True),
primarykey=['cardid'],
)
db.define_table('m_dsc_clients',
Field('cn'
for the ugly print vars I use:
import logging
logger=logging.getLogger('web2py.app.yourappname')
logger.setLevel(logging.DEBUG)
logger.debug(msg)
2013. február 26., kedd 21:12:23 UTC+1 időpontban José L. a következőt írta:
>
> Hello,
> I'm working with async processes using the scheduler (with
Good day,
We're using web2py and loving it, but we ran into an issue with the
sqlform.grid. Quick sketch of my situation:
A relatively complex query is build up according to filter settings. This
recently included joins to other tables and not just one to many, but
many-to-many. Ie there is a
Hi, i'm getting mad using facebook.py, I cannot get it work.
Anyway, I have almost been able of using your facebook.py, but I am using
Google App Engine, so urllib doens't work there. Web2py book suggest using
fetch instead of urllib for GAE:
http://web2py.com/books/default/chapter/29/14#Fetchi
I would like to count the words as entered into the textareas of SQLFORM
form. I've found several jQuery scripts, but couldn't get them to work
yet. Any recommendations for such scripts?
I think this would be a nice feature to add into web2py.
--
---
You received this message because you a
or auth = Auth(db, controller='handle', function='user'), but that means
having to access /app/handle/user/login /app/handle/user/logout , etc ...
i.e. request.args are the same as for the /myapp/default/user/whatever
"url-style"
On Wednesday, February 27, 2013 12:34:01 PM UTC+1, Vixus wrote:
>
Can you show some code and explain what you are expecting and what you are
seeing instead?
On Wednesday, February 27, 2013 1:59:38 AM UTC-5, Calvin wrote:
>
> I am encountering a strange observation in that when accessing the Rows
> object for a given table, the object returns all the fields exc
Aha, I needed to read through all that stuff sometime. Might as well be now.
Thank you!
On Tuesday, February 26, 2013 11:46:50 AM UTC, Niphlod wrote:
>
> it's all configured using auth.settings
> see
> http://web2py.com/books/default/chapter/29/09?search=auth.settings.login_url
> and followi
If it's a recurrent and somewhat "fixed" format, code your own
serialization and use it...
https://github.com/niphlod/cs_monitor_plugin/blob/master/modules/plugin_cs_monitor/admin_scheduler_helpers.py#L42
https://github.com/niphlod/cs_monitor_plugin/blob/master/controllers/plugin_cs_monitor.py#L2
62 matches
Mail list logo