[web2py] Re: web2py - Best Practice

2011-07-12 Thread Massimo Di Pierro
I am all for this! Massimo On Jul 13, 12:45 am, nic wrote: > Dear friends, > > I am a huge web2py fan and would like to propose an idea to the > community. > > I understand that web2py is a development environment and has it’s > roots as an educational platform. One of the things that I have > p

Re: [web2py] web2py - Best Practice

2011-07-12 Thread Manuele Pesenti
On 13/07/2011 07:45, nic wrote: Dear friends, [...] I would like to propose that we develop a suite of products (open source of course) based on the best practices of web2py that would be: +1 :) Manuele

[web2py] tomorrow in San Francisco

2011-07-12 Thread Massimo Di Pierro
I look forward to meet some of you tomorrow: http://www.meetup.com/sfpython/events/24721631/ If you are at the meeting please come say hello. Do not be offended if I do not remember your name but I probably will remember your google username. ;-) Massimo

[web2py] Re: After CAS login, password is reset

2011-07-12 Thread Massimo Di Pierro
I suspect your problem is that both apps connect to the same databases. If you use CAS youhave consumer and provider. If the two apps use the same DB, there is no need for CAS. You use CAS because the two apps do not have the same db. Therefore is correct for the consumer to reset the password to

[web2py] Re: Admin security: https vs localhost

2011-07-12 Thread Massimo Di Pierro
that cannot be done. The admin password is set locally always, never remotely (unless you change it via admin). On Jul 12, 7:55 pm, Anthony wrote: > If you add a complexity requirement, make it for remote connections only. > > Anthony > > > > > > > > On Tuesday, July 12, 2011 6:32:48 PM UTC-4, Ma

[web2py] Re: Web2py uses Django... on GAE

2011-07-12 Thread Massimo Di Pierro
This is a GAE bug and we should open a ticket. GAE should not issue warning about libraries we do not use and we should not reference libraries we do not use to make the warnings go away. Do you want to file the bug report? I not, I will do it. On Jul 12, 7:45 pm, howesc wrote: > this warning pop

[web2py] web2py - Best Practice

2011-07-12 Thread nic
Dear friends, I am a huge web2py fan and would like to propose an idea to the community. I understand that web2py is a development environment and has it’s roots as an educational platform. One of the things that I have personally found most useful are the free appliances. However as web2py has m

[web2py] Re: Python 3 and the future of web2py

2011-07-12 Thread cjrh
Let us know about any problems you find when you try web2py on Py3.x, ok?

[web2py] After CAS login, password is reset

2011-07-12 Thread Lucas D'Avila
Hello! I'm making some tests with the new CAS, but at some point after login the user's password is reset (set to NULL in the database), I think it's because in line 1629 of Class gluon.tools.Auth (trunk version), the variable "cas_user [passfield] " is set as None, then the method "self.get_or_cr

Re: [web2py] Re: Admin security: https vs localhost

2011-07-12 Thread Caleb Hattingh
This can work. On 13 Jul 2011, at 2:55 AM, Anthony wrote: > If you add a complexity requirement, make it for remote connections only. > > Anthony > > On Tuesday, July 12, 2011 6:32:48 PM UTC-4, Massimo Di Pierro wrote: > we can make a delay default to 1 second and double it every failed > at

[web2py] Re: Python 3 and the future of web2py

2011-07-12 Thread Rahul
Its true that there are existing python versions 2.6, 2.7.x but what I would like is Web2py support for Python 3. Reasons: 1. We should provide early support for Python 3 (regardless of what wsgi standard it will provide) because it may trigger a lot of python users to adopt Web2py as it might be t

Re: [web2py] Python 3 and the future of web2py

2011-07-12 Thread LightDot
Also, python 2.6.5 is in RHEL 6 / SL 6 / CentOS 6, which many linux hosting/VPS companies will be using for years to come.

Re: [web2py] Re: Many modal windows on one page

2011-07-12 Thread Bruno Rocha
On Wed, Jul 13, 2011 at 12:54 AM, pbreit wrote: > The price is only part of the problem. That and the limited license almost > guarantee minimal usage and I would never feel comfortable recommending it. > Stuff like that benefits from lots of users. I think the developer has made > a major mistak

Re: [web2py] Re: Many modal windows on one page

2011-07-12 Thread pbreit
The price is only part of the problem. That and the limited license almost guarantee minimal usage and I would never feel comfortable recommending it. Stuff like that benefits from lots of users. I think the developer has made a major mistake.

Re: [web2py] Re: Many modal windows on one page

2011-07-12 Thread Bruno Rocha
On Wed, Jul 13, 2011 at 12:12 AM, pbreit wrote: > Easyframework is kind of neat but the licensing is ridiculous for this sort > of thing. It is really Easy to use, and I do not worry about spending only $49 to get it working on my apps. I will try to create a demo app, but it is really easy.

[web2py] Re: Many modal windows on one page

2011-07-12 Thread pbreit
Easyframework is kind of neat but the licensing is ridiculous for this sort of thing.

[web2py] Re: inserting an empty list

2011-07-12 Thread mart
Mystery solved! the culprit was none other than my deficient brain! the error 'Field value does not belong to the table' should have been taken more literally... there is no Field called 'value' yet i was trying to update a field called value :( self.db.local_history.insert(input_name=buildSpecN

[web2py] Re: Many modal windows on one page

2011-07-12 Thread niknok
Bruno, would you be so kind and post a slice or short example on the use of easyframework+w2p? On Jul 13, 7:58 am, Bruno Rocha wrote: > I am usinghttp://easyframework.com/demo_popup.phpwithout problems. > > 2011/7/12 Kenneth Lundström > > > > > > > > > > > Is this impossible? Should I instead tr

[web2py] Re: inserting an empty list

2011-07-12 Thread mart
I'll try your suggestions. The db.commits() are necessary because DAL is used outside of the web2py web context (using dal in script). if targ: ... hum... yeah, you're right its a useless thing (just removed that now, thanks :)) There is no other stack trace, but I suppose I can remove the try/ e

[web2py] Re: looping through fields & updating

2011-07-12 Thread mart
Tried Denes's suggestion, and resulrs are perect! Thanks Denes! did this: id=db.local_user.insert(dateTime=datetime.now()) rec=db(db.local_user.id==id) for key,value in localUserDict.items(): if key in db.local_user.fields:rec.update(**{key:value}) db.c

[web2py] Re: web2py deployement on windows

2011-07-12 Thread mart
so many options! this is great too! kind of makes me wonder where my head has been this last year ;) Thanks everyone! I will try the "as a service" option as well. Mart :) On Jul 12, 8:50 pm, Brian M wrote: > You can run web2py as a windows service > toohttp://web2py.com/book/default/chapter/

[web2py] Re: Admin security: https vs localhost

2011-07-12 Thread Anthony
If you add a complexity requirement, make it for remote connections only. Anthony On Tuesday, July 12, 2011 6:32:48 PM UTC-4, Massimo Di Pierro wrote: > we can make a delay default to 1 second and double it every failed > attempt. > we should add complexity. I would take a patch or add an iss

Re: [web2py] Re: Paid project: Open source GAE blobstore upload feature in web2py

2011-07-12 Thread howesc
my comments are at the bottom of the slice that Martin linked above. I'm using (perhaps a variant of) the code on www.elizabethscanvas.org. i don't know of a good way to package it with web2py, but feel free to try the slice and let me know where it is broken. for starmakerstudios.com i need

[web2py] Re: web2py deployement on windows

2011-07-12 Thread Brian M
You can run web2py as a windows service too http://web2py.com/book/default/chapter/11#Start-as-Windows-Service ~Brian

[web2py] Re: Two problems with LOAD; one may be a bug(?)

2011-07-12 Thread Anthony
On Tuesday, July 12, 2011 5:43:55 PM UTC-4, Cliff wrote: > > Running Version 1.97.1 (2011-06-26 19:25:44) > > First problem: > This is a snippet from a view file. It works except that it displays > the output of the quals function. Apparently it cannot find my > quals.load file and is using

[web2py] Re: Web2py uses Django... on GAE

2011-07-12 Thread howesc
this warning popped up recently when GAE started bundling 2 versions of django. by default it still uses the old version of django in case you needed it for your project. there is a flag somewhere that can be set to tell GAE to use the new version of django. i assume we could find and set th

[web2py] Re: inserting an empty list

2011-07-12 Thread pbreit
Hmmm..hard to say. Do you have an error trace? Shouldn't matter but I would conside these changes: targets=None to targets=[] if targets is not None: to if targets: if targets:targetsList.append(targets) to targetsList.append(targets) If you are doing "if targ:stargetsList.append(targ)", isn't

[web2py] Re: Two problems with LOAD; one may be a bug(?)

2011-07-12 Thread pbreit
Maybe try: {{=LOAD('users', 'quals.load', args=(request.args(0)), ajax=True)}} The c= and f= are fine but not necessary. The extra ".load" is definitely unnecessary and may have been causing the problem. You can insert .load in either place but not both. If that works, try adding back the targ

Re: [web2py] Re: Many modal windows on one page

2011-07-12 Thread Bruno Rocha
I am using http://easyframework.com/demo_popup.php without problems. 2011/7/12 Kenneth Lundström > Is this impossible? Should I instead try something with a form in a DIV. I > got some hints from Branko but could just not get it working. Javascript > sounded a nice way but even their I only got

[web2py] Re: Many modal windows on one page

2011-07-12 Thread Kenneth Lundström
Is this impossible? Should I instead try something with a form in a DIV. I got some hints from Branko but could just not get it working. Javascript sounded a nice way but even their I only got close, not perfect. Kenneth Hello everybody, I´m trying to create a page with a list of items. On

Re: [web2py] Re: Admin security: https vs localhost

2011-07-12 Thread Kenneth Lundström
Please don´t make a mandotary complexity. On my dev site I use a simple password and it doesn´t bother me if somebody breaks in. Delay sounds good. Kenneth we can make a delay default to 1 second and double it every failed attempt. we should add complexity. I would take a patch or add an iss

Re: [web2py] Bookings with expiration date

2011-07-12 Thread pbreit
If you want to run a job that periodically runs through all the rooms to set a status to "free" if necessary, I would suggest some sort of cron job. You can run it as frequently as once per minute. I do that to change product prices, expire abandoned orders, expire products, etc (pricetack.com).

Re: [web2py] Re: redirect to profile if first time login

2011-07-12 Thread Nicolas Palumbo
that seems to be a better check. I think I'll do that. Checking the profile. The ==1 seems not to be working when I passed the code to my test machine, don't know why yet On Tue, Jul 12, 2011 at 6:18 PM, pbreit wrote: > There's also auth.settings.login_next > > Perhaps you could set one or the o

[web2py] Re: Admin security: https vs localhost

2011-07-12 Thread Massimo Di Pierro
we can make a delay default to 1 second and double it every failed attempt. we should add complexity. I would take a patch or add an issue in google code. On Jul 12, 8:01 am, cjrh wrote: > I like the timeout/delay idea for a failed password, and I very much like > the IP block after a number of f

[web2py] Re: Web2py uses Django... on GAE

2011-07-12 Thread Massimo Di Pierro
Definitively web2py does not uses Django. GAE includes some Django libraries which we do not import but it is possible that GAE does. Are you getting this error with dev_appserver or in production? Massimo On Jul 12, 4:09 pm, Carl wrote: > In looking at my log output on AppEngine I am getting t

[web2py] Re: display value in dropdown listbox

2011-07-12 Thread Massimo Di Pierro
You can do: contact.districtId.requires = IS_IN_DB(db, 'district.id', '% (salesmanId)s', zero=('select district')) contact.districtId.represent = lambda id: db.district(id).salesman.first_name BUT mind that there will be two db queries every time you try represent a districtID. I would not recomm

Re: [web2py] Bookings with expiration date

2011-07-12 Thread Kenneth Lundström
Who is doing the checking? If you want to send an email when a room is empty you need to run web2py from command prompt with cron to check if the end_date has gone. When designing the database its maybe not a good idea to create a own tables for every buildning. Instead create a rooms table:

[web2py] Re: Two problems with LOAD; one may be a bug(?)

2011-07-12 Thread weheh
I couldn't understand your setup clearly: what's the name of the controller file, the controller function, the views file ... Check that these are what they are supposed to be. You say you got an exception when ajax=False. What was the exception? On Jul 12, 5:43 pm, Cliff wrote: > Running Version

[web2py] Re: inserting an empty list

2011-07-12 Thread mart
hum... same error. Here is the relevant stuff and the error is just that ('Field value does not belong to the table') thanks for the help! Mart :) the table... db.define_table('local_history', Field('uuid',length=64,default=uuid.uuid4()), Field('input_name'), Field('input_path'), Fie

Re: [web2py] Re: Powertable and virtual columns

2011-07-12 Thread Kenneth Lundström
Thank you both very much. Now my Powertable looks much better. Kenneth Do with links. I add a new column with links to edit and delete records. The example: @virtualsettings(label=T('Acciones')) def editar(self): id = 1 link_editar = URL(request.application,

[web2py] Two problems with LOAD; one may be a bug(?)

2011-07-12 Thread Cliff
Running Version 1.97.1 (2011-06-26 19:25:44) First problem: This is a snippet from a view file. It works except that it displays the output of the quals function. Apparently it cannot find my quals.load file and is using the generic load file in its place. {{=LOAD(c='users'

Re: [web2py] Re: Get date from datetime with DAL

2011-07-12 Thread Angelo Compagnucci
Sorry for being pedantic! I made an empty application with only a table in the model defined as: db.define_table('test',Field('data','datetime')) and inserted some datetimes. then I made a method in the controller: def getdata(): rows = db(db.test).select() return dict(rows=rows) and

Re: [web2py] Python 3 and the future of web2py

2011-07-12 Thread pbreit
I suspect 2.6 is going to be popular for some time since that's what's in the current Ubuntu LTS (10.04).

[web2py] Re: default function of a controller

2011-07-12 Thread pbreit
How do you want it to work exactly? Can you show us an example? And what are your constraints? Do you not have control over your URLs?

[web2py] Re: Admin security: https vs localhost

2011-07-12 Thread pbreit
I was not suggesting that we needed any immediate changes to trunk but I think it's good to be mindful of these types of things. The key is striking the right balance between usability, security and complexity.

[web2py] Re: inserting an empty list

2011-07-12 Thread mart
good idea! yes, i will blow away the DB, try again and post the stack trace. this using DAL in script (no web or forms). thanks! :) On Jul 12, 5:15 pm, pbreit wrote: > Hmmm...might need to see the model, controller and database. Are you in > development? Can you blow away the DB and start over?

[web2py] Re: how to POST a file without using a form?

2011-07-12 Thread pbreit
Can you just grab the request.var? def receive_posted_file() f = request.vars.ifile #process f

[web2py] Bookings with expiration date

2011-07-12 Thread Ialejandro
Hi! I'm currently building an app where I need accomplish this: When a booking is made I specify the booking start date time and the booking end date time. How could I check periodically when a booking has ended (according to end date)?? For example: db.define_table('building1_rooms' Fie

Re: [web2py] Re: redirect to profile if first time login

2011-07-12 Thread pbreit
There's also auth.settings.login_next Perhaps you could set one or the other and then figure out some sort of check you can do to determine if it's a first login or not. A better check than first login might be if the profile is sufficiently filled out or not.

[web2py] Re: inserting an empty list

2011-07-12 Thread pbreit
Hmmm...might need to see the model, controller and database. Are you in development? Can you blow away the DB and start over? What does the full error trace look like? Are you updating any other fields? Are you using form.accepts?

Re: [web2py] Re: Get date from datetime with DAL

2011-07-12 Thread pbreit
I believe datetime is a Python datetime.datetime object and gets validated by IS_DATETIME(). http://docs.python.org/library/datetime.html#datetime.datetime http://web2py.com/book/default/chapter/07?search=IS_DATETIME

[web2py] Web2py uses Django... on GAE

2011-07-12 Thread Carl
In looking at my log output on AppEngine I am getting this Warning: You are using the default Django version (0.96). The default Django version will change in an App Engine release in the near future. Please call use_library() to explicitly select a Django version. For more information see http://

[web2py] display value in dropdown listbox

2011-07-12 Thread Jim Steil
Hi I have the following tables/relations: contact has a district that has a district manager contact table has a district id district table has an auth_user id when editing a contact I want my dropdown to display my district number and the name of the manager. How would I specify my validat

Re: [web2py] Re: Get date from datetime with DAL

2011-07-12 Thread Angelo Compagnucci
Thank you Denes, What I'm trying to do is to select the date part from a datetime as specified in the email subject, so the AcctStartTime field is a datetime. I'm navigating the epydoc documentation for dal.Field http://www.web2py.com/examples/static/epydoc/web2py.gluon.dal.Field-class.html and

Re: [web2py] Re: Validator for one of the following is required

2011-07-12 Thread Jim Steil
thanks, I'll give that a run On 7/12/2011 1:38 PM, Anthony wrote: Check out https://groups.google.com/forum/?fromgroups#!topic/web2py/brCjq5LjeVw . On Tuesday, July 12, 2011 2:27:31 PM UTC-4, Jim S wrote: Hi

[web2py] Re: inserting an empty list

2011-07-12 Thread mart
yes, If I set the field as Field('myField'), i get 'Field value does not belong to the table' when doing .update(stuff=[]). if I set the field as Field('myField','list:string'), i get the same error... On Jul 12, 1:46 pm, pbreit wrote: > That should work. Did you get an error?

Re: [web2py] Re: redirect to profile if first time login

2011-07-12 Thread Nicolas Palumbo
I solved it this way: eventLogin = db(db.auth_event.user_id == auth.user.id).select() if len(eventLogin) == 1: session.flash= 'This is the first time you log in, please fill in your profile' redirect(URL('default','user/profile')) #Obtain the row in audienceInstances ta

[web2py] Re: web2py deployement on windows

2011-07-12 Thread mart
oh, i see. yes, that makes sense :) Mart :) On Jul 12, 3:30 pm, Caleb Hattingh wrote: > Sorry, I wasn't being specific. My idea was just to provide defaults with the > startup of web2py to reduce a step. There is no literal accept button. > > Sent from my iPad > > On 12 Jul 2011, at 5:09 PM, m

[web2py] Re: Get date from datetime with DAL

2011-07-12 Thread DenesL
Hi Angelo, it depends on the type of field, date fields can be accessed directly, e.g. dbradius.radacct.AcctStartTime datetime fields need .date(): dbradius.radacct.AcctStartTime.date() Denes. On Jul 12, 1:58 pm, Angelo Compagnucci wrote: > Ello everybody! > > I'm stuck whith a really simple

Re: [web2py] Re: web2py deployement on windows

2011-07-12 Thread Caleb Hattingh
Sorry, I wasn't being specific. My idea was just to provide defaults with the startup of web2py to reduce a step. There is no literal accept button. Sent from my iPad On 12 Jul 2011, at 5:09 PM, mart wrote: > Hey, > > I havent't seen any 'accept' button... do you have SSL enabled with > this

[web2py] R: Re: R: Re: R: Re: R: Re: Web Shell problem on Mozilla Firefox 5 and Internet Explorer 9 (PC with Vista)

2011-07-12 Thread Valter Foresto
Anthony, *Can I interact with my application using a web-browser when I use the standard console ? ** ** ** Yes, though they'll be running in separate Python processes. The browser will be sending regular http requests to your app via the Rocket server, and the console will simply give you a Py

Re: [web2py] Re: Powertable and virtual columns

2011-07-12 Thread Roberto Perdomo
Do with links. I add a new column with links to edit and delete records. The example: @virtualsettings(label=T('Acciones')) def editar(self): id = 1 link_editar = URL(request.application,'default', 'editar_tipo_nomina/') link_icono_editar = IMG(_src=UR

[web2py] Re: Validator for one of the following is required

2011-07-12 Thread Anthony
Check out https://groups.google.com/forum/?fromgroups#!topic/web2py/brCjq5LjeVw. On Tuesday, July 12, 2011 2:27:31 PM UTC-4, Jim S wrote: > Hi > > I have a contact table where I want to require that either the company > name be entered, or that the first and last name be entered. Is there a

[web2py] Validator for one of the following is required

2011-07-12 Thread Jim Steil
Hi I have a contact table where I want to require that either the company name be entered, or that the first and last name be entered. Is there a validator for that? I can't seem to locate anything out of the box. -Jim

[web2py] Get date from datetime with DAL

2011-07-12 Thread Angelo Compagnucci
Ello everybody! I'm stuck whith a really simple thing, but the simpler are the worst! I wrote this query: rows = dbradius(dbradius.radacct.CalledStationId==hsname).select( count, dbradius.radacct.AcctStartTime.year(),

Re: [web2py] Multiple Domains, Subdomains, and Applications with SSL. Single web2py Instance on Apache

2011-07-12 Thread danto
I don't know what should be wrong, but I cannot map 2 apps to different subdomains in the same domain, my routes.py is like the follow: #!/usr/bin/python #-*- coding: utf-8 -*- routers = dict( BASE = dict( domains = { 'sub1.AAA.com' : 'app1', 'sub2.AAA.com' : 'app2', }

[web2py] Re: inserting an empty list

2011-07-12 Thread pbreit
That should work. Did you get an error?

[web2py] Re: calendar error maximum call stack size

2011-07-12 Thread Anthony
On Tuesday, July 12, 2011 1:03:51 PM UTC-4, apple wrote: > > I am using response.files to add my own css to override base.css. I > will now use my own include file instead. CSS files are supposed to be included in the head of the HTML document, and the component can't do that since the compon

[web2py] inserting an empty list

2011-07-12 Thread mart
Just curious, if an empty list s returned, can I not still insert it in a Field of type list:string, then later test based on length ? (if len(myList)>0: blablabla) thanks, Mart :)

[web2py] Re: calendar error maximum call stack size

2011-07-12 Thread apple
I am using response.files to add my own css to override base.css. I will now use my own include file instead. The component is a form. When I submit the form then it reloads via ajax. When web2py_ajax is loaded this shows the flash messages. The flash messages do not show up unless explicitly call

[web2py] Hosting web2p with mod_python on shared hosting

2011-07-12 Thread Tushar Chandra
Hi guys, I have been trying to host web2py with mod_python on a shared hosting env. (as My provider doesnt support mod_wsgi) So first i did what was given in the book - http://web2py.com/book/default/chapter/11#Shared-Hosting-with-mod_python I was getting the KeyError: 'SCRIPT_URL'

[web2py] how to POST a file without using a form?

2011-07-12 Thread weheh
How do I POST a file (to upload to my website) using a web2py app but without user intervention via a form? For instance, let's say I have a cron job that periodically looks for new jpegs in a folder and then uploads them to my website automatically. Extra karma points if you can also tell me how

[web2py] Re: calendar error maximum call stack size

2011-07-12 Thread Anthony
I don't think it's common to include web2py_ajax.html in components. response.files is intended to be a way to include CSS and JS files in the page's -- however, your component won't be able to do that anyway since the main page has already loaded. Components should still be able to display fl

Re: [web2py] Re: redirect to profile if first time login

2011-07-12 Thread Bruno Rocha
Auth has an auth_event which stores login events for users. You can make a count on event table to know if it is first time ligin. http://zerp.ly/rochacbruno Em 12/07/2011 11:57, "Nicolas Palumbo" escreveu: > Any ideas on how to implement this? > > On Wed, Jul 6, 2011 at 7:13 PM, Nicolas Palumbo

[web2py] calendar error maximum call stack size

2011-07-12 Thread apple
I have a form which is loaded as a component using LOAD. The master page includes web2py_ajax.html and each component also loads this file. However this prevents date fields from working in the form. When I click on a date field the calendar appears as normal, but when I select a date I get a jav

[web2py] calendar error maximum call stack size

2011-07-12 Thread apple
I have a form which is loaded as a component using LOAD. The master page includes web2py_ajax.html and each component also loads this file. However this prevents date fields from working in the form. When I click on a date field the calendar appears as normal, but when I select a date I get a jav

[web2py] Re: web2py deployement on windows

2011-07-12 Thread mart
Hey, I havent't seen any 'accept' button... do you have SSL enabled with this config? Thanks, Mart :) On Jul 12, 2:18 am, cjrh wrote: > I think we can fill in defaults for IP and port, and only require a user to > hit "accept" if they agree.  So that should make things even easier to just > get

[web2py] Re: Admin security: https vs localhost

2011-07-12 Thread cjrh
On Tuesday, July 12, 2011 4:14:42 PM UTC+2, Ross Peoples wrote: > > Well, support for Python 2.4 was officially dropped with version 1.96.1, I was not aware of that...although I do recall there was a discussion about doing so.

[web2py] Re: redirect to profile if first time login

2011-07-12 Thread Nicolas Palumbo
Any ideas on how to implement this? On Wed, Jul 6, 2011 at 7:13 PM, Nicolas Palumbo wrote: > I'm currently using ldap to auth with ldap_auth module of web2py. > Currently if you are successful to login, are automatically redirected > to index page. > Which happens the first time the user log in

[web2py] Re: Powertable and virtual columns

2011-07-12 Thread DenesL
Hi Kenneth, it really depend more on what you want the links to look like than anything else. You could have them one after the other: return SPAN(A('Edit', _href=URL('receipt', 'create_receipt', args=[self.t_receipt.id])), XML(' '), A('another link', _href=...)) or you c

[web2py] Re: break in template not working as expected

2011-07-12 Thread DenesL
Hi apple, when processed by the template parser that creates: for x in range(6): response.write('\n', escape=False) break response.write('\n', escape=False) response.write("hello there") response.write('\n', escape=False) pass response.write(' \n\n', escape=False)

[web2py] Re: R: Re: R: Re: R: Re: Web Shell problem on Mozilla Firefox 5 and Internet Explorer 9 (PC with Vista)

2011-07-12 Thread Anthony
On Tuesday, July 12, 2011 2:14:07 AM UTC-4, Valter Foresto wrote: > > I would like to use the console as a substitute for the Web Shell. Sorry, I'm still not quite sure what you're trying to do. Can you give an example of a command you want to enter at the console, and what output/effect you

[web2py] Re: Admin security: https vs localhost

2011-07-12 Thread Ross Peoples
Well, support for Python 2.4 was officially dropped with version 1.96.1, so I don't think 'with' will be a problem. You're right about the cache invalidation. Nice catch!

[web2py] JSON-RPC Client

2011-07-12 Thread Ross Peoples
I know that web2py has a nice JSON-RPC Server built into it, but if I wanted two web2py applications to talk to each other, first would JSON-RPC be a good choice? And if so, does web2py have a built-in JSON-RPC client, or would I have to easy_install python-cjson and jsonrpclib?

[web2py] Re: Admin security: https vs localhost

2011-07-12 Thread cjrh
That looks generally right, but you should invalidate the cache inside write_hosts_deny(), and I am fairly sure the *with* statement only arrived in 2.5.

[web2py] Re: Admin security: https vs localhost

2011-07-12 Thread Ross Peoples
One quick change: In failed_login(), the line: times_denied = 0 Should really be: times_denied = 1

[web2py] Re: Admin security: https vs localhost

2011-07-12 Thread Ross Peoples
Well, as far as the delay and the blocking of the IP, I put this together, which would go somewhere in the /admin/models/access.py file, but I'd like to get some comments, as I've never coded this type of thing before so I'd like to know if there's a better way to code it, and what problems it m

[web2py] Powertable and virtual columns

2011-07-12 Thread Kenneth Lundström
Hello list, I´m using Powertable to show a list of records. With virtual columns I create links to modify, copy and so on. To save space I´d like to add more links into one column. I´m using: @virtualsettings(label=T('Edit')) def edit(self): return A('Edit', _href=

Re: [web2py] Re: Python newbie: is knowledge of network programming must for web development stuff ?

2011-07-12 Thread ArrC
*"*There's a lot to web development, but the best way is to go and find out as you feel the need, otherwise you will soon feel overwhelmed.*"* very well said.The world of web development is really big and there are no.of techniques and technology to keep track of.

[web2py] Re: Admin security: https vs localhost

2011-07-12 Thread Anthony
On Tuesday, July 12, 2011 3:33:13 AM UTC-4, pbreit wrote: > > If I'm not mistaken, without the localhost requirement, a fraudster can go > to /admin and run a pretty simple dictionary attack since they only need to > guess the password. Alternatively, you could just use a strong random passwo

[web2py] Re: Admin security: https vs localhost

2011-07-12 Thread cjrh
I like the timeout/delay idea for a failed password, and I very much like the IP block after a number of failed attempts, but I am not too fond of a complexity requirement. During development on my local machine (bound to localhost), my standard admin password is "a". I would have to have to d

[web2py] Ldap and user gruops (Require ldap-group)

2011-07-12 Thread Jose de Soto
Hello, I am developing a APP and I would like to use this APP with our LDAP and filter the users by groups. I have this code in APACHE: AuthLDAPURL ldap://localhost/ou=users,dc=comain,dc=com?uid AuthLDAPGroupAttribute memberUid AuthLDAPGroupAttribu

[web2py] Re: default function of a controller

2011-07-12 Thread Ross Peoples
If your controller doesn't have an index function at all, you could add something like this to one of your models: if request.controller = 'mycontroller' and request.function == 'index': request.function = 'myfunction' So that if someone tries to go to /mycontroller or /mycontroller/index, t

[web2py] Re: Admin security: https vs localhost

2011-07-12 Thread Ross Peoples
And maybe we should require some level of complexity on the admin passwords. The other day I set my dev machine's password to a single letter. I think that could be a potential security problem :)

[web2py] Re: Admin security: https vs localhost

2011-07-12 Thread Ross Peoples
After so many attempts, admin should block the IP address attempting to gain access. Further, an invalid password, should require a 5 second timeout. After maybe 5 attempts, block the IP. The DenyHosts script that is used to prevent SSH brute force attacks does the same thing basically.

Re: [web2py] Python 3 and the future of web2py

2011-07-12 Thread Ross Peoples
I know that Python 2.5 is the officially supported Python version of web2py, but I've been coding all of my stuff with the assumption that this will eventually change to Python 2.6, or even 2.7. I have applications running on both 2.6 and 2.7 in production. But since I'm using Ubuntu 10.04 Serve

[web2py] Can't get linkto working in SQLFORM

2011-07-12 Thread jc
Hi, Trying to use linkto, so following example in web2py book first, to try to understand. I have copied the example with person and dog tables, in particular in def display_form(): I have link = URL('list_records') f

Re: [web2py] Re: Paid project: Open source GAE blobstore upload feature in web2py

2011-07-12 Thread Martín Mulone
http://www.web2pyslices.com/main/slices/take_slice/63 2011/7/12 anandvc : > Thank you so much! I just added this: > http://code.google.com/p/web2py/issues/detail?id=335 > > - Anand > > On Jul 12, 10:42 am, Massimo Di Pierro > wrote: >> This is a complex issue. The GAE blobstore has a workflow th

Re: [web2py] Re: Python newbie: is knowledge of network programming must for web development stuff ?

2011-07-12 Thread Miguel Lopes
Yes. In my opinion basic Python is the only "almost requisite". The book does a very good job at hand holding, it really helps to know a little Python (which the book also caters for). My advice is follow along with the book. If you get stuck by any Python stuff. Take a minute out of web2py and jus

[web2py] Re: 303 See Other - Error while using xmlrpc

2011-07-12 Thread Robin Marshall
That is what we added, did you restart apache? These are the steps we use to recreate the problem: Step 1 : Configure and expose a test xmlrpc service in web2py: a) Create a simple web2py application "testapp" b) Edit db.py and add the following where "auth.settings" are configured auth.setting

  1   2   >