Re: [web2py] DAL and schema

2012-03-04 Thread Johann Spies
On 2 March 2012 16:13, Bruce Wade wrote: > To use 2 different databases you require 2 connection strings. > Two schemas does not neccesarily mean two databases. In PostgreSQL a schema is a substructure in a database and you can have several schemas within the one database. A database connectio

Re: [web2py] Use the other login page instead of index

2012-03-04 Thread Bruno Rocha
the login is by default in defautl/user/login not in index. you can set your own controller and function. Create a new controller with a function to expose dict(form=auth()) and in models set: auth.settings.controller = "myothercontroller" auth.settings.function = "myfunction" I am not sure if

[web2py] Use the other login page instead of index

2012-03-04 Thread Sanjeet Kumar
I am using the index as my home page and i want to call the another controller for login when the user click on the login link

[web2py] Re: web2py[:]

2012-03-04 Thread weheh
+1 Nice look. One suggestion -- it would be nice to have the top "tabbed" navigation visible after diving into a slice. I went into the first slice and had to use the browser Back button to get back to the top ... that is before I tried clicking on the pizza man. Hmm ... now that I think of it, do

Re: [web2py] Cron Set up

2012-03-04 Thread Sanjeet Kumar
I am using the following model for test the cron : db.define_table(('emp'), Field('name')) and in crontab file inside the welcome app i am using the : */1 * * * * root *applications/welcome/modules/background_updater.py and makes the file inside the modules folder background_u

Re: [web2py] Cron Set up

2012-03-04 Thread Sanjeet Kumar
Thanks Bruno On Mon, Mar 5, 2012 at 10:16 AM, Bruno Rocha wrote: > > > On Mon, Mar 5, 2012 at 1:39 AM, Sanjeet Kumar wrote: > >> Can anyone explain me how i set up the background task in web2py > > > http://movu.ca/demo/article/show/31/web2py-cron-task > > Also in the book there is a topic talki

Re: [web2py] Cron Set up

2012-03-04 Thread Bruno Rocha
On Mon, Mar 5, 2012 at 1:39 AM, Sanjeet Kumar wrote: > Can anyone explain me how i set up the background task in web2py http://movu.ca/demo/article/show/31/web2py-cron-task Also in the book there is a topic talking about it. -- Bruno Rocha [http://rochacbruno.com.br]

[web2py] Cron Set up

2012-03-04 Thread Sanjeet Kumar
Can anyone explain me how i set up the background task in web2py

[web2py] Re: CRUD / SQLFORM.grid permissions

2012-03-04 Thread Serpent_Guard
I did do that at first, and it works great for displaying the right records, but the problem is that it doesn't do any kind of validation to make sure that the record you're trying to edit or view actually matches the query provided in the grid constructor. As in, I can replace the record ID i

[web2py] Re: 1.99.6 can't save, communications error

2012-03-04 Thread LightDot
Are you using apache with mod_wsgi? And your mod_wsgi group is www-data? How about the mod_wsgi user, also www-data or some app specific user? Perhaps you could post the relevant parts of your apache vhost configuration? Having root as file/directory owner is not permissive. That's restrictive

Re: [web2py] web2py 1.99.7 is OUT

2012-03-04 Thread Ovidio Marinho
ok Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br 83 8826 9088 - Oi 83 9334 0266 - Claro Brasil 2012/3/4 Massim

Re: [web2py] Re: 1.99.6 can't save, communications error

2012-03-04 Thread Marin Pranjić
I'm not sure about permissions, I keep default ones for development. I cannot reproduce your problem on ubuntu + rocket. I tried with the latest trunk and with 1.99.6. Works for me. I suggest copying your web2py folder, setting 777 permissions to web2py_copy (and all subfolders) and then try runni

[web2py] web2py 1.99.7 is OUT

2012-03-04 Thread Massimo Di Pierro
Same as 1.99.5 and 1.99.6 but should solve all the outstanding compatibility issues. Massimo

Re: [web2py] Re: web2py[:]

2012-03-04 Thread Bruno Rocha
users can choose the image for each post. http://zerp.ly/rochacbruno Em 04/03/2012 16:36, "Phyo Arkar" escreveu: > Very nice Bruno! > > only problem is topic icons are Humongous! > > On Sun, Mar 4, 2012 at 11:26 PM, lyn2py wrote: > >> Super! Very nice work Bruno :D >> >> On Mar 4, 11:51 am, Bru

Re: [web2py] Re: ondelete='CASCADE'

2012-03-04 Thread Jan Rozhon
Well, the problem is most likely in my (not) understanding the concept of cascade deletion. In my case, I try to create an interface application for network load tests. Each time I run a test with certain params I want them to be stored so the user can see them and repeat test whenever he wants

Re: [web2py] web2py[:]

2012-03-04 Thread Ricardo Pedroso
Bruno, it's simple awesome. I will be learning a lot reading the code. Thank you, Ricardo On Sat, Mar 3, 2012 at 11:27 PM, Bruno Rocha wrote: > > Hi, > > The new web2py[:] is alive! > > There are still some minor css issues and content organization to solve, I > hope to have it all done by the

Re: [web2py] Re: What's the best way to throttle a web2py thread?

2012-03-04 Thread Ricardo Pedroso
On Sat, Mar 3, 2012 at 5:54 AM, Massimo Di Pierro wrote: > Not sure I understand the issue but you should not have time.sleep in code. > It causes the threads to live longer then necessary and make you vulnerable > to DoS attacks. Of course, sleep is more like a simple hack. If the app is for int

Re: [web2py] Re: web2py[:]

2012-03-04 Thread Michele Comitini
+1 Il 04 marzo 2012 20:35, Phyo Arkar ha scritto: > Very nice Bruno! > > only problem is topic icons are Humongous! > > > On Sun, Mar 4, 2012 at 11:26 PM, lyn2py wrote: >> >> Super! Very nice work Bruno :D >> >> On Mar 4, 11:51 am, Bruno Rocha wrote: >> > On Sun, Mar 4, 2012 at 12:37 AM, Massim

Re: [web2py] Re: Alphabetical Pagination

2012-03-04 Thread Anthony
> > Actually request.vars['search'] doesn't produce a KeyError, at least now > how I am using it. You're right, the other access methods won't produce a KeyError either. request.vars.search is a little easier, though (and the more common way to do it). Anthony

[web2py] Re: Trying to limit the amount of HTML cruft in controllers

2012-03-04 Thread Anthony
> > > If you need to customize the form object, you can use server-side DOM > manipulation > > If I understand correctly, this about getting a lot of things > generated automatically/magically, then fighting tooth and nail to > turn them in almost what you want? I can't help thinking of this a

[web2py] Re: Trunk from GIT?

2012-03-04 Thread Anthony
> > The mdipierro one looks to be the latest stable version. I was looking > for the trunk version. The mdipierro/web2py repository on Github appears to be latest trunk, in sync with the hg version on Google Code. Anthony

Re: [web2py] Re: ondelete='CASCADE'

2012-03-04 Thread Anthony
> > Thanks for your quick response, Anthony. If I got it correctly, it would > be working as expected if I changed the test_id type from integer to id. I > gave it a try, but it only raised some errors (missing required field) > Changing "test_id" to type "id" should work, but you might need to

Re: [web2py] Re: web2py[:]

2012-03-04 Thread Phyo Arkar
Very nice Bruno! only problem is topic icons are Humongous! On Sun, Mar 4, 2012 at 11:26 PM, lyn2py wrote: > Super! Very nice work Bruno :D > > On Mar 4, 11:51 am, Bruno Rocha wrote: > > On Sun, Mar 4, 2012 at 12:37 AM, Massimo Di Pierro < > > > > massimo.dipie...@gmail.com> wrote: > > > Thank

[web2py] Re: 1.99.6 can't save, communications error

2012-03-04 Thread Lewis
Well, that might have been the problem so I changed permissions. But, I still get communication error. I gave the group in which web2py runs (www-data) rwx permissions to the module file in question. Also, to the modules directory, the specific application directory, and the web2py applications

[web2py] Re: Trunk from GIT?

2012-03-04 Thread Massimo Di Pierro
web2py was not owned my be. Now it is. I will move trunk from mdipierro/web2py to web2py/web2py. Probably later today. On Sunday, 4 March 2012 10:52:46 UTC-6, lyn2py wrote: > > The mdipierro one looks to be the latest stable version. I was looking > for the trunk version. > The web2py one is a

[web2py] Re: Difference between storing session in memcache v/s DB

2012-03-04 Thread Massimo Di Pierro
Sessions with web2py on GAE must go in DB, else they are not reliable (you may find yourself logged out because cache is cleared). On Saturday, 3 March 2012 23:12:34 UTC-6, Sushant Taneja wrote: > > Hi, > > I am creating an application for deployment on GAE. > I would like to know the advantages

Re: [web2py] Re: ondelete='CASCADE'

2012-03-04 Thread Jan Rozhon
Thanks for your quick response, Anthony. If I got it correctly, it would be working as expected if I changed the test_id type from integer to id. I gave it a try, but it only raised some errors (missing required field) and more importantly, it did not allow me to insert this field manually. Is

Re: [web2py] 1.99.6 can't save, communications error

2012-03-04 Thread Marin Pranjić
Did you check permissions? On Sun, Mar 4, 2012 at 7:37 PM, Lewis wrote: > Anyone else? Tried 3 different browsers and two machines. Tried > restarting apache and web2py. Still can't save. Not fatal, but it is > nice to use the web editor for little changes. > > Thanks. > > BTW: I am posting

[web2py] Re: ondelete='CASCADE'

2012-03-04 Thread Anthony
Note, when you create a table with define_table, it automatically creates a field called "id" of type "id", which serves as the record ID. In your test_counts table, the test_id field is therefore referencing the "id" field of the tests table, not the test_id field, which is just a regular inte

[web2py] 1.99.6 can't save, communications error

2012-03-04 Thread Lewis
Anyone else? Tried 3 different browsers and two machines. Tried restarting apache and web2py. Still can't save. Not fatal, but it is nice to use the web editor for little changes. Thanks. BTW: I am posting less not because I am working less, but because I understand web2py better and everyth

[web2py] Re: Trying to limit the amount of HTML cruft in controllers

2012-03-04 Thread fabien
On Mar 3, 2:22 pm, Anthony wrote: > With SQLFORM (and .factory), the submit button is added automatically--you > can access the input widget via form.custom.submit. Thanks. I was looking for it in widgets. > Note, if your form is based on a db table, you should be able to use SQLFORM > itself

Re: [web2py] Re: Ubuntu 11.10 Internal error Ticket issued: unrecoverable

2012-03-04 Thread Richard Vézina
tk is there... Richard On Sat, Mar 3, 2012 at 9:07 PM, Bruce Wade wrote: > You installed the tk library correct? On Ubuntu I had the same issue, it > looks like we are missing a package. > > > On Sat, Mar 3, 2012 at 1:11 PM, Richard Vézina < > ml.richard.vez...@gmail.com> wrote: > >> Ok, after

[web2py] ondelete='CASCADE'

2012-03-04 Thread Jan Rozhon
Hi all, I have a newbie question regarding the cascade delete of referenced database entries. Basically, I have these two tables: tab = DAL('sqlite://tab.sqlite') tab.define_table('tests', Field('test_id', 'integer', required=True, default=''), Field('test_pid',

[web2py] Re: web2py[:]

2012-03-04 Thread lyn2py
Super! Very nice work Bruno :D On Mar 4, 11:51 am, Bruno Rocha wrote: > On Sun, Mar 4, 2012 at 12:37 AM, Massimo Di Pierro < > > massimo.dipie...@gmail.com> wrote: > > Thank you Bruno. I agree with Anthony. this is a amazing work. I will > > mention it during the pycon talk. > > > Who did the log

[web2py] Re: Trunk from GIT?

2012-03-04 Thread lyn2py
The mdipierro one looks to be the latest stable version. I was looking for the trunk version. The web2py one is a previous stable version. Looks like hg is the only one with the trunk? I may have to reinstall hg. On Mar 4, 12:31 am, pbreit wrote: > Looks like it's still at: > git clonehttps://gi

Re: [web2py] Re: Alphabetical Pagination

2012-03-04 Thread Bruce Wade
Actually request.vars['search'] doesn't produce a KeyError, at least now how I am using it. if request.vars['search']: # do something else: # do something The else is called when if request.vars['search'] doesn't exist probably also because it is a Storage object :D URL(.., vars=[]) I lear

Re: [web2py] Re: Alphabetical Pagination

2012-03-04 Thread Anthony
> > if request.vars['search']: > request.vars is a Storage object, so you can do request.vars.search rather than request.vars['search'] or request.vars.get('search'). If 'search' doesn't exist, it will simply return None (rather than a KeyError). > LI(A(T(letter), _href=URL('directory',

Re: [web2py] Re: Alphabetical Pagination

2012-03-04 Thread Bruce Wade
Search class: class Search util.Search: T = current.T categories = { "a": [ T("Abattoirs"), T("Accountants"), T("Administration Services"), T("Adventure Activity"), T("Advertising-Point of Sale"), T("Agricultur

[web2py] search in tables

2012-03-04 Thread peter
On Bruno's new site for weby2py slices, search works like one would expect. eg searching putting - pingback plugin - in the search box finds slices that contain both pingback and plugin. Now in my experience of sqlform.grid, this does not happen in its search box. If one puts two words in the searc

[web2py] Re: Alphabetical Pagination

2012-03-04 Thread Anthony
In the view, maybe something like: {{import string}} {{for browse_type in ['category', 'listing', 'locality', 'brand']:}} {{=CAT('Browse by ', browse_type, ' ', *[A(letter, _href=URL('default', 'browse', args=[browse_type, letter])) for letter in string.uppercase])}} {{pass}} That

[web2py] Re: Change redirect if Delete is checked on update form

2012-03-04 Thread Anthony
> > I also wasn't aware of response.toolbar(), thanks. I tried it out just for > academic purposes and I'll remember it for the future. > Note, it is included in the generic.html view for local requests (i.e., when request.is_local is True). Anthony

[web2py] Re: 404 on 'list index out of range' errors?

2012-03-04 Thread Anthony
> > Thanks. The technical aspects go a bit above my head but this is a good > post for me to bookmark and use as a jumping off point for some reading. > > After switching out .first() but before adding the 404 redirect I was > getting a ' 'NoneType' object has no > attribute 'title'' error. T

Re: [web2py] Alphabetical Pagination

2012-03-04 Thread Praveen Bhat
Hello Bruce, Yes something like that.. Regards Praveen On Sunday, 4 March 2012 14:08:56 UTC+5:30, Detectedstealth wrote: > > You mean something like this attached screen shot? > > On Sat, Mar 3, 2012 at 11:03 PM, Praveen Bhat wrote: > >> Hello, >> >> I have a Listings page for Businesses an