Does anyone have any sample code showing how to call the Web2py 'ajax'
function from a menu? I currently have this as a link on a page, and I'd
like to move it to a menu item:
New
Thanks
--
Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en
I want to change the interface language to English. According to some
post, I change the language of Chrome browser to En, relaunched web2py
and it didn't work. Can anyone help me out?
--
Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en
On 22 April 2010 08:07, NoNoNo wrote:
> I want to change the interface language to English. According to some
> post, I change the language of Chrome browser to En, relaunched web2py
> and it didn't work. Can anyone help me out?
I just added Afrikaans to a page. The name af-af.py did not work for
[Off topic]
Cool, another Afrikaans speaking person that uses web2py! Totally sweet, or
rather "uitstekend". Hi Johan!
[Off topic]
Nicolaas van der Merwe
--
If we hit that bullseye, the rest of the dominoes should fall like a house
of cards. Checkmate. -Z. Brannigan
On Thu, Apr 22, 2010 at 1
Sure.
In short: everything works ok.
In detail - see below.
(Pdb) l 1
1 # -*- coding: utf-8 -*-
2
3 exec('from applications.%s.modules import cfg' %
request.application)
4 db = DAL('oracle://%s/%...@%s'%(cfg.oralogin,cfg.orapassword,cfg.oradb),
pool_size=10)
5
6 db.de
Aargh...
You asked to check _date_ type of field. But it works ok too:
-> import pdb;pdb.set_trace()
(Pdb) l 1
1 # -*- coding: utf-8 -*-
2
3 exec('from applications.%s.modules import cfg' %
request.application)
4 db = DAL('oracle://%s/%...@%s'%(cfg.oralogin,cfg.orapassword,cfg
I managed to get both of those problems sorted. Thank you for your
input!
Attached below is the rough code I used:
@auth.requires_membership('administrators')
def create():
# set up groups to be put into
groups = db().select(db.auth_group.ALL)
group_fields = []
group_lookup = {}
Database: PostgreSQL
web2py: 1.76.5
Database migration doesn't seem to be working. I've added a new field
to my database, and sql.log says the table has been successfully
altered.
ALTER TABLE performer ADD musicbrainz_guid VARCHAR(512);
timestamp: 2010-04-19T20:55:38.147015
However, when I try t
I want to display the contents (files) of a folder and be able to
click and download the files. How is this accomplished within a
controller? leads? any examples out there? I know there is os.path,
os.listdir and glob. Do I have to import the modules in Web2Py?
Thanks
--
Subscription settings
Can you show us the line with a query code?
--
Kuba
--
Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en
due to some strange code that I produced I found that form.accepts
will swallow the formkey etc.
def index():
return dict()
def noformsubmit():
form = form_factory(Field('tag_name'))
msg = 'no'
for i in range(1):
if form.accepts(request.vars, session):
msg = 'y
Tagging is a good idea. I will add that.
By the way, email me personally and I can give permission to edit
pages.
On Apr 22, 12:40 am, Kuba Kucharski wrote:
> SUMMARIZE:
>
> could we improve web2py documentation dramatically w/o creating a lot
> of new content just by tagging?
>
> FULL:
>
> Afte
we should have both af.py and af-af.py should be treated as different
languages. if you send me your translation I will be happy to include
it.
Massimo
On Apr 22, 5:07 am, Johann Spies wrote:
> On 22 April 2010 08:07, NoNoNo wrote:
>
> > I want to change the interface language to English. Accor
something like this?
def folder():
import os
return dict(files=TABLE(*[TR(TD(f)) for f in os.listdir('/
path/')]))
On Apr 22, 7:48 am, greenpoise wrote:
> I want to display the contents (files) of a folder and be able to
> click and download the files. How is this accomplished within a
>
massimo, you could use my improved tagging plugin if you want to
it allows single users to create tags for single record and display
tag clouds for a single record, table, and a general tag cloud
On Apr 22, 3:35 pm, mdipierro wrote:
> Tagging is a good idea. I will add that.
>
> By the way, email
will try and post. Thanks
dan
On Apr 22, 9:39 am, mdipierro wrote:
> something like this?
>
> def folder():
> import os
> return dict(files=TABLE(*[TR(TD(f)) for f in os.listdir('/
> path/')]))
>
> On Apr 22, 7:48 am, greenpoise wrote:
>
>
>
> > I want to display the contents (files)
just make sure you NEVER do os.chdir() that is not thread safe and
breaks web2py.
On Apr 22, 8:49 am, greenpoise wrote:
> will try and post. Thanks
>
> dan
>
> On Apr 22, 9:39 am, mdipierro wrote:
>
> > something like this?
>
> > def folder():
> > import os
> > return dict(files=TABLE(*[
Can you email it to me, to make sure I have the latest?
On Apr 22, 8:46 am, selecta wrote:
> massimo, you could use my improved tagging plugin if you want to
> it allows single users to create tags for single record and display
> tag clouds for a single record, table, and a general tag cloud
>
>
Hi Christian,
you can check http://www.web2pyslices.com/main/slices/take_slice/77
I have not tried it yet but thought let you know about it.
Thanks
On Apr 20, 10:10 am, howesc wrote:
> Rohan,
>
> Someone pointed out gaema (http://code.google.com/p/gaema/) on the
> group a couple of weeks ago
Something like this is now in trunk. Just do
db = DAL(...)
please take a look.
On Apr 21, 1:12 am, Igor Gassko wrote:
> Could you please post on this thread, once there's built-in solution
> for keeping pooled connections alive?
> For now, I've seen that you may end up with several dead connect
It works. Thanks. Is this TABLE(*[TR(TD(f)) for the purpose of the
view?
On Apr 22, 10:01 am, mdipierro wrote:
> just make sure you NEVER do os.chdir() that is not thread safe and
> breaks web2py.
>
> On Apr 22, 8:49 am, greenpoise wrote:
>
> > will try and post. Thanks
>
> > dan
>
> > On Apr
sure, i'm adding some improvements right now, will send it soon
On Apr 22, 4:02 pm, mdipierro wrote:
> Can you email it to me, to make sure I have the latest?
>
> On Apr 22, 8:46 am, selecta wrote:
>
>
>
> > massimo, you could use my improved tagging plugin if you want to
> > it allows single us
On Apr 21, 10:41 pm, mdipierro wrote:
> It is crytical that the my_hmac_key in your example be the same as
> auth.settings.hmac_key
>
> On Apr 21, 10:09 pm, Jonathan Lundell wrote:
>
>
>
> > On Apr 21, 2010, at 7:09 PM, mdipierro wrote:
>
> > > NO. You cannot use
>
> > > password=IS_CRYPT()(pas
On Apr 21, 10:09 pm, Jonathan Lundell wrote:
> On Apr 21, 2010, at 7:09 PM, mdipierro wrote:
>
> > NO. You cannot use
>
> > password=IS_CRYPT()(passwd)[0])
>
> > You must use
>
> > password=db.auth_user.password.requires[0](passwd)[0])
>
> > the reason is that IS_CRYPT() by default uses MD5 whil
I wrote a blog post on fixutres and pre-loading your database with default data.
http://thadeusb.com/weblog/archive/2010/4/21/using_fixtures_in_web2py/36
I am looking for an implementation to load YAML files that consists of
one file (it only has to perform loading on the most basic YAML
objects)
On Apr 22, 2010, at 7:55 AM, Patrick wrote:
>
>
> On Apr 21, 10:09 pm, Jonathan Lundell wrote:
>> On Apr 21, 2010, at 7:09 PM, mdipierro wrote:
>>
>>> NO. You cannot use
>>
>>> password=IS_CRYPT()(passwd)[0])
>>
>>> You must use
>>
>>> password=db.auth_user.password.requires[0](passwd)[0])
Of course, accepts() is not ment to be called multiple times. The
reason it swallows is because it uses sessions to prevent double
submission. So basically calling form.accepts twice is like double
submitting the form from your controller.
To avoid protection against double submission, just call
`
I know. I am just saying our community is growing, and it will be soon
when there are enough of us who are willing to test a release before
it is marked as stable.
I have already started working on my update script on the server...
#update.sh
#!/bin/bash
# first SSH into the machine,
# then run
Hi,
there any way to authenticate against the users defined at the server
database?
That is, pass user and password in db = DAL (...)
Regards,
Jose
--
Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en
Yes, for the view. It is web2py helpers constructing valid XHTML code
that is properly escaped.
Also, for situations like this, the X-Sendfile header would be perfect !
--
Thadeus
On Thu, Apr 22, 2010 at 9:25 AM, greenpoise wrote:
> It works. Thanks. Is this TABLE(*[TR(TD(f)) for the purpos
I am guessing the helper is TABLE? How would I use it though? I used
glob instead of listdir to predefine wildcards and it worked fine.
What is X-Sendfile?
thanks
Dan
On Apr 22, 11:35 am, Thadeus Burgess wrote:
> Yes, for the view. It is web2py helpers constructing valid XHTML code
> that is p
ticket_master = db.auth_user.insert(first_name=fname,
last_name=lname,
email=maile,
password=db.auth_user.password.requires[0](passwd)[0]))
unless you have a custom auth_user model. In that case depdends on the
password validator(
LOL. Good.
On Apr 22, 10:32 am, Thadeus Burgess wrote:
> I know. I am just saying our community is growing, and it will be soon
> when there are enough of us who are willing to test a release before
> it is marked as stable.
>
> I have already started working on my update script on the server...
db = DAL('postgres://username:passw...@hostname:port/dbname')
auhenticate against the database authentication. If you want to
authenticate against the OS username:password of the db owner, you
must create a ssh tunnel. That must be done outside web2py.
On Apr 22, 10:34 am, Jose wrote:
> Hi,
>
>
X-Sendfile is a special header that if it contains a path to a file,
the webserver will ignore everything in response.body and serve the
file that X-Sendfile header points to.
You can read more about it in a recent post.
http://groups.google.com/group/web2py/browse_thread/thread/69c871c1f9d89d62#
I know I have been talking about x-sendfile alot lately
Is there any reason that rocket should support it?
--
Thadeus
On Tue, Apr 20, 2010 at 4:06 PM, mdipierro wrote:
> ok. will fix this soon.
>
> On Apr 20, 4:03 pm, Timothy Farrell wrote:
>> Ton's of references in epydoc. Those will
On Apr 22, 10:18 am, Thadeus Burgess wrote:
> I wrote a blog post on fixutres and pre-loading your database with default
> data.
>
> http://thadeusb.com/weblog/archive/2010/4/21/using_fixtures_in_web2py/36
Nice - thanks!
>
> I am looking for an implementation to load YAML files that consists of
Sorry for chime in. Do you guys have a convenient way to input a file
path via browser? I've tried these.
1) INPUT(_name='the_path') # User have to type it
2) INPUT(_name='a_file', _type='file')
This is assuming that the web server is running on local machine as a
desktop application. However, in
Sorry for chime in. Do you guys have a convenient way to input a file
path via browser? I've tried these.
1) INPUT(_name='the_path') # User have to type it
2) INPUT(_name='a_file', _type='file')
This is assuming that the web server is running on local machine as a
desktop application. However, in
On Apr 22, 11:03 am, mdipierro wrote:
> ticket_master = db.auth_user.insert(first_name=fname,
> last_name=lname,
> email=maile,
>
> password=db.auth_user.password.requires[0](passwd)[0]))
>
> unless you have a custom auth_user mod
On Apr 21, 4:32 pm, Patrick wrote:
> I have been learning web2py and decided to create a simple ticket
> system. Thus far I've been able to read the book/documentation or look
> at others code and been able to hack my way through most issues.
> However in my situation I need to have a default us
On Apr 22, 10:32 am, Thadeus Burgess wrote:
> I know. I am just saying our community is growing, and it will be soon
> when there are enough of us who are willing to test a release before
> it is marked as stable.
>
I assume Massimo runs his tests before committing anything, but do not
really kn
On 22 abr, 13:06, mdipierro wrote:
> db = DAL('postgres://username:passw...@hostname:port/dbname')
I meant to enter user and password from a form
Jose
--
Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en
> I meant to enter user and password from a form
??
you mean you want to authenticate to your database with creditentials
from auth_user table???
--
Kuba
--
Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en
On Apr 22, 2010, at 9:32 AM, Patrick wrote:
> I'm sorry your solution *does* work, I misread it in the reply, the
> formatting got off and I was treating it like a separate variable. So
> it works! When you first start web2py the user gets created (and every
> time the user gets deleted as well. I
This is the first I'd heard of x-sendfile so I looked it up. It seems
to work to off-load work from the application server to the web-server
for serving large files.
In theory, there would be no real benefit from this in Rocket since
Rocket and web2py run in the same process. Serving a file
On Apr 22, 12:18 pm, Jonathan Lundell wrote:
> On Apr 22, 2010, at 9:32 AM, Patrick wrote:
>
> > I'm sorry your solution *does* work, I misread it in the reply, the
> > formatting got off and I was treating it like a separate variable. So
> > it works! When you first start web2py the user gets c
On 22 abr, 14:10, Kuba Kucharski wrote:
> > I meant to enter user and password from a form
>
> ??
>
> you mean you want to authenticate to your database with creditentials
> from auth_user table???
>
I do not really need anything.
A few days ago showing web2py asked me as validated when there
I just wrote a blog post on this!
http://groups.google.com/group/web2py/browse_thread/thread/1a522db61b5e5d44
--
Thadeus
On Thu, Apr 22, 2010 at 1:12 PM, Patrick wrote:
>
>
> On Apr 22, 12:18 pm, Jonathan Lundell wrote:
>> On Apr 22, 2010, at 9:32 AM, Patrick wrote:
>>
>> > I'm sorry your
On Apr 22, 10:18 am, Thadeus Burgess wrote:
> I wrote a blog post on fixutres and pre-loading your database with default
> data.
>
> http://thadeusb.com/weblog/archive/2010/4/21/using_fixtures_in_web2py/36
>
> I am looking for an implementation to load YAML files that consists of
> one file (it
Bookmarked.
On Apr 22, 1:24 pm, Thadeus Burgess wrote:
> I just wrote a blog post on this!
>
> http://groups.google.com/group/web2py/browse_thread/thread/1a522db61b...
>
> --
> Thadeus
>
>
>
> On Thu, Apr 22, 2010 at 1:12 PM, Patrick wrote:
>
> > On Apr 22, 12:18 pm, Jonathan Lundell wrote:
> >
My question is, which controller takes careof the upload field in
web2py??? Web2py makes it easy to upload a file but I want to know
how it does it so I can write a function based on it.
Thanks
dan
--
Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en
Take a look at welcome/controllers/default.py->def download
And http://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#291
And http://code.google.com/p/web2py/source/browse/gluon/sql.py#2667
And http://code.google.com/p/web2py/source/browse/gluon/sql.py#2694
And http://code.google.com/p
wow thats rough!! over 3,000 lines of coding. thanks!! :-)
On Apr 22, 4:07 pm, Thadeus Burgess wrote:
> Take a look at welcome/controllers/default.py->def download
>
> Andhttp://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#291
>
> Andhttp://code.google.com/p/web2py/source/browse/
Hi,
Bit of a noob question (sorry) but I'd like to add a page "/user/
combinedLogin" to my app, which combines the login and register forms,
but can't work it out. This:
if request.args(0)=="login":
=auth.login()
=auth.register()
works fine, but I'd like to expose a new url (/user/combin
Most of it is done in the Field.store() method in sql.py. In fact you
can do
db.mytable.insert(filefield=db.mytable.filefield.store(stream,filename='original_filename.txt'))
On Apr 22, 3:27 pm, greenpoise wrote:
> wow thats rough!! over 3,000 lines of coding. thanks!! :-)
>
> On Apr 22, 4:0
How about
{{extend 'layout.html'}}
Login
{{=auth.login()}}
Register
{{=auth.register()}}
On Apr 22, 3:49 pm, scausten wrote:
> Hi,
>
> Bit of a noob question (sorry) but I'd like to add a page "/user/
> combinedLogin" to my app, which combines the login and register forms,
> but can't work it ou
in newcron.py line 242 the code allows an empty string to be added to
the lines array, that parsecronline() returns None for.
perhaps line 242 should be changed from:
lines = [x.strip() for x in cronlines if not
x.strip().startswith('#')]
to something like:
lines = [x.strip() for x in cronlines i
You are right.
On Apr 22, 4:14 pm, howesc wrote:
> in newcron.py line 242 the code allows an empty string to be added to
> the lines array, that parsecronline() returns None for.
>
> perhaps line 242 should be changed from:
> lines = [x.strip() for x in cronlines if not
> x.strip().startswith('#'
Hi,
To get rid of the "undefined variable" warnings in eclipse you can
define names as globals in the preferences.
(Eg to remove the warnings for request, response, db, T, auth, etc...)
Preferences -> PyDev -> Editor -> Code Analysis
Under the "undefined" tab, you find "Consider the following nam
When using validator IS_INT_IN_RANGE(1900,2100) and a value of
2100 is entered an error message of 'enter an integer between
1900 and 2099' is displayed. A value of 1900 is accepted.
Seams like the range of the validator should be inclusive for BOTH
ends. I have not check
On Apr 22, 2010, at 4:28 PM, dave wrote:
> When using validator IS_INT_IN_RANGE(1900,2100) and a value of
> 2100 is entered an error message of 'enter an integer between
> 1900 and 2099' is displayed. A value of 1900 is accepted.
It's using the Python notion of a range, f
I'm interested in only there letters 'a..z' and 'A..z'. I'm sure its
easy with regx, but I'm looking to see how such would be defined it it
was native to web2y. I'm a database/batch guy, but this framework
makes it look like I know what I'm doing with a GUI !!!
--
Subscription settings: http:/
Perfect. Will try. Thanks again!
Dan
On Apr 22, 4:51 pm, mdipierro wrote:
> Most of it is done in the Field.store() method in sql.py. In fact you
> can do
>
> db.mytable.insert(filefield=db.mytable.filefield.store(stream,filename='original_filename.txt'))
>
> On Apr 22, 3:27 pm, greenpoise wro
On Apr 22, 2010, at 4:56 PM, dave wrote:
> I'm interested in only there letters 'a..z' and 'A..z'. I'm sure its
> easy with regx, but I'm looking to see how such would be defined it it
> was native to web2y. I'm a database/batch guy, but this framework
> makes it look like I know what I'm doing
The problem happens in this requires
IS_NOT_IN_DB(db(db.companyapplication.application==request.vars.application),db.companyapplication.company,error_message='combination
of company en application already in database')]
because the field naming choice makes it impossible to tell apart in
request
When using the packaged web2py distribution, is thare a way to use
assert statements for development, then switch them off for production
use?
Not knowing the details of how .pyo files are used, I tested this by
inserting an 'assert 1==2' and compiling that controller file with -
O, but the optim
I too have tried this without success.
I seems that you cannot use a custom form together with SQLFORM with
record=
Is that true?
Paul
On Apr 9, 6:14 am, JmiXIII wrote:
> Hello,
>
> I'm using a SQLFORM with a html custom (as described in book/7.2 =>
> SQLFORM in HTML)
> My fonction inside my c
You can. Did you try
{{=form.custom.begin}}
{{=form.custom.end}}
On Apr 22, 11:35 pm, Paul Wray wrote:
> I too have tried this without success.
>
> I seems that you cannot use a custom form together with SQLFORM with
> record=
> Is that true?
>
> Paul
>
> On Apr 9, 6:14 am, JmiXIII wrote:
>
>
69 matches
Mail list logo