Re: [web2py] Re: REF: Question of Modifying the behaviour of the @auth.requires_login()

2013-12-19 Thread Teddy Nyambe
Thanks for the head start, will look at those options! On Thu, Dec 19, 2013 at 5:54 PM, Anthony wrote: > You can probably start with the Auth.requires() decorator and modify as > needed: https://github.com/web2py/web2py/blob/master/gluon/tools.py#L3201 > > Anthony > > > On Thursday, December 19

[web2py] how can i join 3 tables and output a the all three together joined in web2py?

2013-12-19 Thread deepak sandhu
model: # coding: utf8 db.define_table('dept', Field('name',unique=True,label='Department Name'), format='%(name)s') db.define_table('course', Field('dept_id','reference dept'), Field('name',unique=True,l

Re: [web2py] Re: Online classes

2013-12-19 Thread Johann Spies
How did you download it? Johann On 19 December 2013 23:39, António Ramos wrote: > I get error > unable to install application notifier > > i´m using > 2.6.4-stable+timestamp.2013.09.26.13.34.47 > > > 2013/12/19 Johann Spies > >> +1 >> >> >> On 19 December 2013 20:50, Cliff wrote: >> >>> The

[web2py] Re: Trouble setting up database that chooses predefined options.

2013-12-19 Thread Cliff
Hi Dave Thanks for the reply! That was somewhat the path I was on. I like the boolean idea. Where I am hung up now though is how I would list all the bowl games on a page then update picks, like how i mentioned before. Would I be able to use SQLFORM to do this? This is my database setup, i have

[web2py] Re: Trouble setting up database that chooses predefined options.

2013-12-19 Thread Dave S
On Thursday, December 19, 2013 6:29:33 PM UTC-8, Dave S wrote: > > > > On Thursday, December 19, 2013 11:30:20 AM UTC-8, Cliff wrote: >> >> Hello. >> >> General question here. Me and some friends guess who is going to win >> NCAAF bowl games so I thought I would try and make an app for it. So I

[web2py] Re: Pycon 2014?

2013-12-19 Thread Massimo Di Pierro
There will be a web2py tutorial. I will say more when I know more. ;-) On Thursday, 19 December 2013 15:42:33 UTC-6, Simon Ashley wrote: > > Just contemplating the 4+ days to get to and from Pycon '14 (Montreal) and > although its not on the schedule, wondering if there will be any web2py > invo

[web2py] Re: Trouble setting up database that chooses predefined options.

2013-12-19 Thread Dave S
On Thursday, December 19, 2013 11:30:20 AM UTC-8, Cliff wrote: > > Hello. > > General question here. Me and some friends guess who is going to win NCAAF > bowl games so I thought I would try and make an app for it. So I started > off making a table for users, games, picks. > > Users -> Person

[web2py] Re: footer content aligned left when reverse proxied

2013-12-19 Thread Massimo Di Pierro
that's definitively a bug.fixing it in trunk. Thanks. On Thursday, 19 December 2013 12:08:59 UTC-6, DeanK wrote: > > I noticed that in web2py.css: > > .center {width:100; text-align:center; vertical-align:middle} > > > if i change this to: > > .center {width:100%; text-align:center; vertical-align

[web2py] Re: Spreading the word and some simple code

2013-12-19 Thread Massimo Di Pierro
:-) On Wednesday, 18 December 2013 17:19:34 UTC-6, Cliff Kachinske wrote: > > In November I gave a talk to the Atlanta Python Meetup group on role based > authentication and authorization. > > I mentioned several times during the presentation that Web2py features > role based access control, and

Re: [web2py] LDAP Auth

2013-12-19 Thread Maggs
Yes secure ldap is causing a lot of problems. I hope it gets sorted out eventually. For now I'm having to modify the framework for my needs. On Wednesday, November 27, 2013 7:18:45 AM UTC-8, Richard wrote: > > ldap_auth need care, to me it's a draft that need code review, but it > works... I ha

[web2py] Re: Visibiity of values created in a module

2013-12-19 Thread Anthony
Are you calling db.commit() to commit your inserts/updates in the database. That happens automatically during HTTP requests to your app, but you have to do it explicitly in scheduler tasks. Anthony On Thursday, December 19, 2013 6:34:02 PM UTC-5, Richard Brown wrote: > > I am using the Schedule

[web2py] Visibiity of values created in a module

2013-12-19 Thread Richard Brown
I am using the Scheduler to perform some control functions and so have an autonomous function, called by the Scheduler via 'poll.py', in a module called 'utilities.py'. This scans some databases to decide what to do, and this seems to work fine (I have (hopefully) coded around any potential dat

[web2py] Re: how to put the field name with a drop-down instead of its reference id in the form?

2013-12-19 Thread 黄祥
i think it related to record representation. please add the format in your dal define table. e.g. db.define_table('dept', Field('name',unique=True,label='Department Name'), format='%(name)s' ) ref: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Record

[web2py] Re: Drop down not showing

2013-12-19 Thread Dave S
On Thursday, December 19, 2013 6:35:00 AM UTC-8, Michel Hayek wrote: > > Please any help on this issue?? > > Well, I don't see where it is happening just from looking at your code snipped from the 16th, but somewhere there's an attempt to convert your DAL reference to a long(). Is there a trac

[web2py] Re: Can't edit default.py after upgrade to 2.8.2

2013-12-19 Thread Richard Brown
Yes, everything but editing. If I reboot the RPi it works for a while, then stops. It seems to me like it is a timing or timeout problem. Everything takes noticeably longer since the upgrade, including my application site which takes >15 seconds to load even over my local network. perhaps that

[web2py] Re: altering tables and gets database not working. trying to find a way to empty the database.

2013-12-19 Thread 黄祥
i've tested your code above, it can run smoothly. btw, for safer testing why not just create a new app and then copy all of your modified file (controllers, models, views, static, etc), except the databases. another way around is like what cliff said, you can delete the files in databases folde

[web2py] how to put the field name with a drop-down instead of its reference id in the form?

2013-12-19 Thread deepak sandhu
this is model x.py: # coding: utf8 db.define_table('dept', Field('name',unique=True,label='Department Name')) db.define_table('course', Field('dept_id','reference dept'), Field('name',unique=True,label='Course Name')) this is is contro

[web2py] Re: altering tables and gets database not working. trying to find a way to empty the database.

2013-12-19 Thread deepak sandhu
ok in web2py/applications/notetaker/databases/ directory there are many files 1 many files all end with table names i created. (so i think they are saving tables which i created in database) 2 sql.log file 3 storage.sqlite so do you mean to delete all 1 2 3 file or any some particular one? On

[web2py] Re: hide error messages is returning NONE value for messages

2013-12-19 Thread Anthony
You'll have to make display of the error conditional on whether the error exists: {{if form.errors.f_firstname:}}{{=form. errors.f_firstname}}{{pass}} Anthony On Thursday, December 19, 2013 4:41:39 PM UTC-5, Michel Hayek wrote: > > hi folks, > > i have created custom error messages for each of

Re: [web2py] byte compile web2py itself

2013-12-19 Thread Richard Vézina
Ok, thanks for the explanation! Richard On Thu, Dec 19, 2013 at 4:31 PM, Anthony wrote: > If you look in the gluon folder, you'll see a .pyc file for every .py > file. The Python interpreter automatically creates those for modules when > they are imported. The reason web2py apps require their

[web2py] hide error messages is returning NONE value for messages

2013-12-19 Thread Michel Hayek
hi folks, i have created custom error messages for each of my fields, the good news is that i don't see system error message and once the user submit my custom errors appear. the problem is one i load the page, i see all custom errors set to the value of "*None*". is there any workaround? i tri

[web2py] Pycon 2014?

2013-12-19 Thread Simon Ashley
Just contemplating the 4+ days to get to and from Pycon '14 (Montreal) and although its not on the schedule, wondering if there will be any web2py involvement (official or otherwise) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (So

Re: [web2py] Re: Online classes

2013-12-19 Thread António Ramos
I get error unable to install application notifier i´m using 2.6.4-stable+timestamp.2013.09.26.13.34.47 2013/12/19 Johann Spies > +1 > > > On 19 December 2013 20:50, Cliff wrote: > >> These have been very helpful. Thanks! >> >> >> On Tuesday, December 3, 2013 1:34:18 AM UTC-5, Massimo Di Pier

Re: [web2py] byte compile web2py itself

2013-12-19 Thread Anthony
If you look in the gluon folder, you'll see a .pyc file for every .py file. The Python interpreter automatically creates those for modules when they are imported. The reason web2py apps require their own bytecode compilation process is because the model, controller, and view files are not Python

[web2py] byte compile web2py itself

2013-12-19 Thread Richard
Hello, It possible to speed thing with byte compile app with admin... But could it be possible to byte compile web2py itself for more improvement? Thanks Richard -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https:

[web2py] Admin app support in app engine

2013-12-19 Thread Alan Etkin
A subset of the admin app features was enabled in trunk for Google App Engine apps. New deployments using the app.yaml example file should support the following (using GAE SDK 1.8.8 and Python 2.7/WSGI): - Error ticket storage and browser (with datastore connections) - Web shell - File viewer F

[web2py] Trouble setting up database that chooses predefined options.

2013-12-19 Thread Cliff
Hello. General question here. Me and some friends guess who is going to win NCAAF bowl games so I thought I would try and make an app for it. So I started off making a table for users, games, picks. Users -> Person name | email bowls -> Bowl name | team 1 | team 2 | time | winner picks - > per

[web2py] Re: error using auth.wiki('slug') on service pages

2013-12-19 Thread Alan Etkin
El jueves, 19 de diciembre de 2013 07:54:34 UTC-3, Janko Strusa escribió: > > Ok, I have reported the issue. > force_render is being ignored in actions that involve service pages. If you want to combine them with document content, a workaround is having the wiki create the tables in the model or

Re: [web2py] Re: Online classes

2013-12-19 Thread Johann Spies
+1 On 19 December 2013 20:50, Cliff wrote: > These have been very helpful. Thanks! > > > On Tuesday, December 3, 2013 1:34:18 AM UTC-5, Massimo Di Pierro wrote: > >> Hello everybody, >> >> As you know I teach a certification program about web development with >> Python and I use web2py. >> I po

[web2py] Re: github - please follow

2013-12-19 Thread Cliff Kachinske
Done, plus recruited another local Web2py user. On Saturday, August 24, 2013 7:26:03 PM UTC-4, Massimo Di Pierro wrote: > > web2py has many users but few github followers. This is a problem because > the number of followers is a metric that can be used to guess popularity. > > You can help. > >

[web2py] Re: MyForum (or SciForum)

2013-12-19 Thread Cliff Kachinske
This is cool. The kattie-mattingley raises an exception, but the other one works great. Thanks. On Thursday, December 19, 2013 10:47:27 AM UTC-5, Massimo Di Pierro wrote: > > Some time ago I built this but never posted it. > > http://www.experts4solutions.com/MyForum > > > http://www.expert

[web2py] Re: Online classes

2013-12-19 Thread Cliff
These have been very helpful. Thanks! On Tuesday, December 3, 2013 1:34:18 AM UTC-5, Massimo Di Pierro wrote: > > Hello everybody, > > As you know I teach a certification program about web development with > Python and I use web2py. > I posted my most recent classes online: > > https://vimeo.co

[web2py] Re: REF: Ajax Authentication

2013-12-19 Thread Cliff Kachinske
It's not a good idea unless the app runs on an intranet behind a well-secured firewall and you don't care about who created a record or updated a record. As Leonel pointed out, he could use auth.is_logged_in(). He could also write his own decorator, though that seems overkill for a one-page ap

[web2py] Re: REF: Ajax Authentication

2013-12-19 Thread Leonel Câmara
What I think is a horrible idea is to deal with it in the template. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you

[web2py] Re: footer content aligned left when reverse proxied

2013-12-19 Thread DeanK
I noticed that in web2py.css: .center {width:100; text-align:center; vertical-align:middle} if i change this to: .center {width:100%; text-align:center; vertical-align:middle} things then work fine. On Thursday, December 19, 2013 11:54:37 AM UTC-5, DeanK wrote: > > When I view my site direc

[web2py] Re: login crash under 2.8.2

2013-12-19 Thread Leonel Câmara
My suspicion right now is that this bug is indeed caused by mod_wsgi, and it's not even solvable in windows where you don't have WSGIDaemonProcess, so that's why restarting apache temporarily solves the problem, what I'm going to do is migrate the server to Linux (including migrating the only p

[web2py] Re: REF: Ajax Authentication

2013-12-19 Thread Derek
It's not. If he needs people to get access to the main page without the login redirect, then that's what has to be done. On Friday, December 13, 2013 6:51:56 AM UTC-7, Leonel Câmara wrote: > > That's a horrible idea Derek. > > You could however have the controller check auth.is_logged_in() inste

[web2py] footer content aligned left when reverse proxied

2013-12-19 Thread DeanK
When I view my site directly through the host server the footer looks fine. It's snapped to the bottom and centered. When I view my site through a reverse proxy, the footer content is smashed to the left, as if its in a column or something. Looking at the html I can't really see anything diff

[web2py] Re: how to define adal model at runtime

2013-12-19 Thread Leonel Câmara
The models are already always defined at runtime. Do you mean by inspection of the database? Either way I recommend you read this, as there are some limitations when it comes to connecting to legacy databases. http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Legacy-da

Re: [web2py] Re: Can't edit default.py after upgrade to 2.8.2

2013-12-19 Thread paolo.vall...@gmail.com
No but I am not a master of mod_wsgi. everything works but the editor, right? Paolo 2013/12/19 Richard Brown > Hi Paolo, this is a web site so presumably has to accessible from the > outside? > > We should probably keep this discussion separate and concentrate on the > main issue - is there a

[web2py] Re: Can't edit default.py after upgrade to 2.8.2

2013-12-19 Thread Richard Brown
Hi Paolo, this is a web site so presumably has to accessible from the outside? We should probably keep this discussion separate and concentrate on the main issue - is there anything from my list of files with wsgi references which you need to see the errors? -- Resources: - http://web2py.co

[web2py] Re: github - please follow

2013-12-19 Thread Avi A
+1 On Sunday, August 25, 2013 2:26:03 AM UTC+3, Massimo Di Pierro wrote: > > web2py has many users but few github followers. This is a problem because > the number of followers is a metric that can be used to guess popularity. > > You can help. > > Get a github account and click on the star. >

[web2py] Re: got an unexpected keyword argument 'lazy_tables'

2013-12-19 Thread Anthony
I think lazy_tables was introduced in a later version, so you'll have to upgrade if you want to use that feature. Anthony On Thursday, December 19, 2013 8:23:27 AM UTC-5, Giuseppe D'Amico wrote: > > Hi I am new to web2pywhen I try to connect to a database with DAL whit > lazy_tables I get this

[web2py] Re: REF: Question of Modifying the behaviour of the @auth.requires_login()

2013-12-19 Thread Anthony
You can probably start with the Auth.requires() decorator and modify as needed: https://github.com/web2py/web2py/blob/master/gluon/tools.py#L3201 Anthony On Thursday, December 19, 2013 9:07:10 AM UTC-5, Leonel Câmara wrote: > > http://www.artima.com/weblogs/viewpost.jsp?thread=240808 > > Terça-f

[web2py] MyForum (or SciForum)

2013-12-19 Thread Massimo Di Pierro
Some time ago I built this but never posted it. http://www.experts4solutions.com/MyForum http://www.experts4solutions.com/MyForum/default/forum/464/kattie-mattingley Source code: https://github.com/mdipierro/web2py-appliances/tree/master/MyForum It has the following features: - us

[web2py] got an unexpected keyword argument 'lazy_tables'

2013-12-19 Thread Giuseppe D'Amico
Hi I am new to web2pywhen I try to connect to a database with DAL whit lazy_tables I get this error: TypeError: __init__() got an unexpected keyword argument 'lazy_tables' my version of web2py is 1.99.7, this is my code: db_name ='test' conn_string = "postgres://{0}:{1}@{2}/{3}".format(user,pwd,

[web2py] how to define adal model at runtime

2013-12-19 Thread Giuseppe D'Amico
Hi I am new to web2py I need to connect to a legacy database that could be postgresql or mysql, I would like to know if there is a way to define the model of the database at runtime? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (

[web2py] Re: Drop down not showing

2013-12-19 Thread Michel Hayek
Please any help on this issue?? Thanks -- *This e-mail is confidential and may also be privileged. If you are not the intended **recipient, please notify the sender immediately, delete it from your system and do **not copy, disseminate, distribute or disclose any information contained ther

[web2py] Re: Detecting MYSQL running status

2013-12-19 Thread Paolo Valleri
I've the same problem, I don't think DAL has this kind of ability but I leave the word to others in such cases. Are you interested in showing the 404 page for all tickets or only for those the involve the db connection? Paolo On Thursday, December 19, 2013 7:35:24 AM UTC+1, Raj Chinna wrote: > >

[web2py] Re: REF: Question of Modifying the behaviour of the @auth.requires_login()

2013-12-19 Thread Leonel Câmara
http://www.artima.com/weblogs/viewpost.jsp?thread=240808 Terça-feira, 17 de Dezembro de 2013 6:23:23 UTC, software.ted escreveu: > > I am trying to create an application using web2py backend that is fully > AJAX. I amusing the jQuery/Javascript to create a client. Now am a bit > stuck on the cus

Re: [web2py] Re: REF: Question of Modifying the behaviour of the @auth.requires_login()

2013-12-19 Thread Teddy Nyambe
How do you write decorators? On Wed, Dec 18, 2013 at 8:44 PM, Cliff Kachinske wrote: > My reading of the source code says you are pretty much stuck with the > behavior you see. The first thing the decorator does is check if the > request is ajax and returns the message you are receiving. > > Yo

[web2py] dropdown menu repopulate from database

2013-12-19 Thread Yebach
Hello I have the following question On my page I have a drop down menu where user selects some texts from db and it is then inserted into into ace editor. the user then saves the script using bootstrap modal with a new name. After he enters the new name of the text it is saved, but the drop do

[web2py] Re: altering tables and gets database not working. trying to find a way to empty the database.

2013-12-19 Thread Cliff Kachinske
Just delete the files in your databases directory. Recreate the tables with the constraints in place and you should be good to go. Adding notnull an unique constraints to a table can be problematic. The online manual contains a section about database migration gotchas, which I would recommend

[web2py] Re: SQL error using APP Admin

2013-12-19 Thread Remco Boerma
> > Created a ticket for this. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Grou

[web2py] Re: error using auth.wiki('slug') on service pages

2013-12-19 Thread Janko Strusa
Ok, I have reported the issue. Dana srijeda, 18. prosinca 2013. 19:28:15 UTC+1, korisnik Alan Etkin napisao je: > > I've tried {{=auth.wiki(slug="test", force_render=True)["content"]}}. I >> get error ticket. >> > > Would you please file an issue at web2py.googlecode.com? If possible, > post a

[web2py] Re: github - please follow

2013-12-19 Thread mike dawson
Done! up to 528 now. On Sunday, 25 August 2013 00:26:03 UTC+1, Massimo Di Pierro wrote: > > web2py has many users but few github followers. This is a problem because > the number of followers is a metric that can be used to guess popularity. > > You can help. > > Get a github account and click o

[web2py] Re: web2py logging

2013-12-19 Thread Jayadevan M
All of a sudden, tne log entries stopped coming in /var/log/uwsgi/uwsgi.log and now they are in /var/www/web2py/logs/web2py.log. One change I made in between is to add an entry for logrotate in /etc/logrotate.d for /var/uwsgi/log. Would that have resulted in this? On Tuesday, December 3, 2013 3

Re: [web2py] Re: Can't edit default.py after upgrade to 2.8.2

2013-12-19 Thread paolo.vall...@gmail.com
there are plenty how-to for improving the security of your network/rpi. I don't know your network configuration, given that I can't tell you what to do. Surely you have apache accessible from 'outside' if this is not intentional I would fix it as the first thing to do. Moreover, I found this, mayb