Re: [web2py] Re: web2py.gluon.html.XML allowing relative urls

2010-11-24 Thread Michele Comitini
+1 2010/11/24 Jlew jlew.black...@gmail.com: Here is a fixed one putting the allowed schemes again. diff --git a/gluon/sanitizer.py b/gluon/sanitizer.py --- a/gluon/sanitizer.py +++ b/gluon/sanitizer.py @@ -151,11 +151,12 @@     def url_is_acceptable(self, url):         -        

[web2py] working script to install virtualenv and then install and start web2py

2010-11-24 Thread Chris Steel
scripts/setup-virtualenv-web2py.sh in the trunk does not seem to be working. Here is a replacement that should do the trick on most posix systems. it downloads virtualenv, installs it, creates a virtual environment directory and starts the virtual environment in the new directory. Then it

[web2py] Re: ERP projects

2010-11-24 Thread Rahul
Hey All, I have developed a system for Bug Tracking for my organization and personal use and it uses SQLite as backend. I find it pretty good to deploy in production environments. The system I have coded uses the concept of Workspaces. Where each workspace is independent and the users belonging

[web2py] Re: Get User [auth_user] Janrain

2010-11-24 Thread Andrew Evans
Ok I have gotten a bit further. I think form what I can tell I still need to define my auth table now I am getting an error Traceback (most recent call last): File /home/www-data/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File

Re: [web2py] Re: your assignment freelancer.org

2010-11-24 Thread Branko Vukelic
On Wed, Nov 24, 2010 at 4:16 AM, Richard richar...@gmail.com wrote: Is this appropriate for the web2py mailing list? Many students cheat on assignments. It's not really cheating if you actually learn something from the expert that did your assignment. -- Branko Vukelić bg.bra...@gmail.com

Re: [web2py] Name error, but only if I run it in view..

2010-11-24 Thread Ole Martin Maeland
Hi, That will not work. I just read the output from dict - companies - that is a query on db.newcomp. So only keys in dict will be the database names - id, uuid, address. It works for id and uuid, but not for name and address. state that it is not defined, but it's in the db, it's in the db

[web2py] Re: Get User [auth_user] Janrain

2010-11-24 Thread Andrew Evans
Ok I have gone full circle now How can I get values from janrain into my code? This does not work! db.define_table('user_extended', Field('userinfo', db.auth_user, default=auth.user_id, readable=False, writable=False,unique=True), I need to change the db.auth_user value but to what? I have

[web2py] Re: Inserting custom field types broken

2010-11-24 Thread Ishbir
Hey, Here's the code- http://tinypaste.com/1ec50 Host_Details is a class extended from Storage class. Workaround: Use: db(db.plans.id==db.plans.insert(...)).update(info=plan) On Nov 23, 7:26 pm, mdipierro mdipie...@cs.depaul.edu wrote: Can you post code to reproduce this. It will save some

[web2py] Re: Name error, but only if I run it in view..

2010-11-24 Thread villas
I am sure there are better ways of doing it, but I usually look to see exactly what is printed in the console by placing a print statement in my code, something like one of these: print companies print BEAUTIFY(companies) for company in companies: print company this gives me a clue as to how to

[web2py] Re: ERP projects

2010-11-24 Thread villas
I know some systems developed in Delphi using Paradox as database working for years, now. And they don't imagine what a transaction is. :-( LOL yeah, but I bet they know what a 're-index' means! :)

[web2py] Re: ERP projects

2010-11-24 Thread newnomad
My question was more about what the absolute minimum requirements, lowest entry barrrier, for a web2py ERP would be. What if the ERP was to be used by an organisation that doesnt have a budget for a VPS yet, it would be great if they could start using it on the free GAE, maybe not perfect, but it

[web2py] Re: where to place sizes (and other properties) ?

2010-11-24 Thread annet
Hi Stef, The problem with most layouts is that they are build in applications like Adobe's Dreamweaver. I do have CS5 but I prefer to build a layout in textedit, html and css in separate files using for instance ez_css for sizing and positioning, which reduces the number of css selectors

Re: [web2py] Re: very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-24 Thread Phyo Arkar
I haven't tried DEFAULT_MAX_THREADS it yet but to report that it is not just windows problem it happens in Linux too. WHen i test my Homepage which dont do anything dynamic much , just login box , with static js and css. That caused long load delays too. Tim , sorry to know that u got injury. Had

Re: [web2py] Re: your assignment freelancer.org

2010-11-24 Thread Kuba Kucharski
guys, I think that was intended as sarcasm by Massimo.. stay cool ;) -- Kuba

[web2py] Re: Get User [auth_user] Janrain

2010-11-24 Thread mdipierro
I think you are missing auth.define_tables() somewhere On Nov 24, 12:44 am, Andrew Evans randra...@gmail.com wrote: Hello I just set up Janrain using the following from gluon.contrib.login_methods.rpx_account import RPXAccount

Re: [web2py] Re: your assignment freelancer.org

2010-11-24 Thread Phyo Arkar
umm still it is an assignment lol , yeah and only 20$ worth haha :D On Wed, Nov 24, 2010 at 8:32 PM, Kuba Kucharski kuba.kuchar...@gmail.comwrote: guys, I think that was intended as sarcasm by Massimo.. stay cool ;) -- Kuba

[web2py] Re: ERP projects

2010-11-24 Thread mdipierro
If an organization cannot afford $20/month for a VPS they should attempt to use a ERP. On Nov 24, 6:49 am, newnomad uti...@gmail.com wrote: My question was more about what the absolute minimum requirements, lowest entry barrrier, for a web2py ERP would be. What if the ERP was to be used by an

[web2py] Re: about cron tasks

2010-11-24 Thread villas
Hi António Test your script thoroughly on the commandline first. You can run the script in the environment of your app. See commandline options for running scripts in http://web2py.com/book/default/chapter/04 In addition to running the whole script, you can debug sections of your code by

Re: [web2py] is_in_db error message translation

2010-11-24 Thread Richard Vézina
I need to translate IS_IN_DB Validator message. Richard On Tue, Nov 23, 2010 at 11:07 PM, Vinicius Assef vinicius...@gmail.comwrote: Are you getting some error message? On Tue, Nov 23, 2010 at 7:43 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, I try this :

[web2py] Re: ERP projects

2010-11-24 Thread newnomad
I know what you mean, but maybe it's a mom and dad basement business. They will probably use http://www.myerp.com/ then, free for up to 2 users. Once they grow they will stay there and pay, and have forgotten about web2py... I think the 'free' entry is always good to start out. So regardless of

[web2py] Re: is_in_db error message translation

2010-11-24 Thread mdipierro
Can you translate other strings? Do other T(...) messages get translated? On Nov 24, 8:27 am, Richard Vézina ml.richard.vez...@gmail.com wrote: I need to translate IS_IN_DB Validator message. Richard On Tue, Nov 23, 2010 at 11:07 PM, Vinicius Assef vinicius...@gmail.comwrote: Are you

Re: [web2py] Re: is_in_db error message translation

2010-11-24 Thread Richard Vézina
Yes no problem for translation... I just search the way to translate the IS_IN_DB error message. I proceed like this for other validator : IS_NOT_EMPTY(error_message=T('my_translate_massage')) If there is an other more general way to do it I am open to any idea... validator message not

Re: [web2py] Re: How could I send a email to every members?

2010-11-24 Thread Thadeus Burgess
the problem with mail.send is it creates a brand new connection to the SMTP server *every* single time you call it. If you are sending more than 10 emails at a time this will not be efficient and will take an unnecessary amount of time to complete. I would suggest dropping down to using base

[web2py] Re: How could I send a email to every members?

2010-11-24 Thread mdipierro
I agree + queue emails and have a background process send them. On Nov 24, 8:50 am, Thadeus Burgess thade...@thadeusb.com wrote: the problem with mail.send is it creates a brand new connection to the SMTP server *every* single time you call it. If you are sending more than 10 emails at a time

[web2py] Re: is_in_db error message translation

2010-11-24 Thread mdipierro
IS_IN_DB should work as any other validator. Which language is your browser is to? Do you see the string ''value not available' when you edit the corresponding language file? On Nov 24, 8:42 am, Richard Vézina ml.richard.vez...@gmail.com wrote: Yes no problem for translation... I just search the

[web2py] Re: web2py.gluon.html.XML allowing relative urls

2010-11-24 Thread mdipierro
uploading to trunk. On Nov 23, 11:10 pm, Jlew jlew.black...@gmail.com wrote: Here is a fixed one putting the allowed schemes again. diff --git a/gluon/sanitizer.py b/gluon/sanitizer.py --- a/gluon/sanitizer.py +++ b/gluon/sanitizer.py @@ -151,11 +151,12 @@      def url_is_acceptable(self,

Re: [web2py] Re: is_in_db error message translation

2010-11-24 Thread Richard Vézina
No I don't see any validators messages in fr-ca.py. My browser is set to fr-ca or fr-fr. Both aren't updated with validators messages when I get those error. Richard On Wed, Nov 24, 2010 at 10:09 AM, mdipierro mdipie...@cs.depaul.edu wrote: IS_IN_DB should work as any other validator. Which

[web2py] Re: working script to install virtualenv and then install and start web2py

2010-11-24 Thread mdipierro
in trunk On Nov 24, 2:49 am, Chris Steel chris.st...@gmail.com wrote: scripts/setup-virtualenv-web2py.sh in the trunk does not seem to be working. Here is a replacement that should do the trick on most posix systems. it downloads virtualenv, installs it, creates a virtual environment

[web2py] Re: is_in_db error message translation

2010-11-24 Thread mdipierro
Yes, when you get those messages, the language files should be overwritten and then you need to go in and manually translate them. If the string is not there or it is not translated, then you do not get the message translated. Check the file timestamp. Is the file being updated? Check the file

[web2py] Re: How could I send a email to every members?

2010-11-24 Thread mart
I'd like to see that table layout Annet has :) Annet, is that ok ? Thanks, Mart :) On Nov 24, 10:05 am, mdipierro mdipie...@cs.depaul.edu wrote: I agree + queue emails and have a background process send them. On Nov 24, 8:50 am, Thadeus Burgess thade...@thadeusb.com wrote: the problem

Re: [web2py] Re: very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-24 Thread Jonathan Lundell
On Nov 24, 2010, at 5:59 AM, Phyo Arkar wrote: I haven't tried DEFAULT_MAX_THREADS it yet but to report that it is not just windows problem it happens in Linux too. WHen i test my Homepage which dont do anything dynamic much , just login box , with static js and css. That caused long load

[web2py] detect user login

2010-11-24 Thread Richard Vézina
Hello I need to have a response.flash on index page at login but not when the user come back on index page during a session. I try to user session.counter but the session is not reset until the cookies are erase I think. Here my index controller (*not working*) : def index(): Index

Re: [web2py] Re: is_in_db error message translation

2010-11-24 Thread Richard Vézina
Ok, I got it to work by adding error_message=myerrromessage in IS_IN_DB() Thanks Richard On Wed, Nov 24, 2010 at 10:29 AM, mdipierro mdipie...@cs.depaul.edu wrote: Yes, when you get those messages, the language files should be overwritten and then you need to go in and manually translate

[web2py] Re: detect user login

2010-11-24 Thread mdipierro
how about something like this? auth.messages.logged_in=T('Hello %(first_name)s and welcome on the '+appTitle') def index(): Index page session.counter = (session.counter or 0) + 1 if auth.user and auth.user.first_name!=0 and session.counter=0: pass elif

[web2py] Viewing tickets on GAE devserver

2010-11-24 Thread Narendran
Hello, I've deployed a Web2Py app on the GAE, and it works fine. I'm trying to run web2py now on my local machine using GAE's devserver, and due to some reason, I keep getting a Web2py error ticket. Now the problem is I am not able to open the tkt due to lack of SSL. Is there some way I can see

Re: [web2py] Re: Get User [auth_user] Janrain

2010-11-24 Thread Andrew Evans
Hello ty for the reply I created the auth_user table but now I get this error when I try to access my login area any ideas *cheers Traceback (most recent call last): File /home/www-data/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File

[web2py] Re: very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-24 Thread Timbo
I didn't mean to imply that the enhancements I'm planning for 1.2 (window speed) address this issue...just to be clear. @Jonathan: Yes we need to make numthreads map to max-threads and default it to 0 (unlimited) or a very high number. The only time reasonable to change this is when running

Re: [web2py] Re: detect user login

2010-11-24 Thread Richard Vézina
How do I get the auth.messages.logged_in in response.flash only at login? I try many different things without success. Is auth.messages.logged_in as to be put in auth form controller? On Wed, Nov 24, 2010 at 11:18 AM, mdipierro mdipie...@cs.depaul.edu wrote: how about something like this?

[web2py] Re: detect user login

2010-11-24 Thread mdipierro
Well be used to set the flash immediately after login. You can put it anywere you want (models or same controller as user action) and should work. On Nov 24, 10:56 am, Richard Vézina ml.richard.vez...@gmail.com wrote: How do I get the auth.messages.logged_in in response.flash only at login? I

[web2py] Re: web2py SSL + Apache + mod_wsgi issues on Ubuntu 8.08 VM machine

2010-11-24 Thread Hybride
You seem to have two different problems. I tried to access addresshttp://147.126.65.92/adminand got the You don't have permission to access /admin/default/index on this server. error message, this sounds like the admin application is not installed or your webserver is not allowed to read the

Re: [web2py] Re: detect user login

2010-11-24 Thread Richard Vézina
You meen that this, any where in controllers auth.messages.logged_in=DIV(T('Hello '), str(auth.user and auth.user.first_name), BR(), T('Welcome on the '), appTitle, session.counter) Should prompt in response.flash once at login? Not

[web2py] Re: web2py SSL + Apache + mod_wsgi issues on Ubuntu 8.08 VM machine

2010-11-24 Thread mdipierro
Open this file with an editor /home/www-data/web2py/applications/admin/errors/ 76.192.187.2.2010-11-24.10-52-27.f3c370f6-8a25-4dc6-b496-ae1178050333 The traceback is the end of the file. On Nov 24, 11:06 am, Hybride mshybr...@gmail.com wrote: You seem to have two different problems. I tried

Re: [web2py] Re: detect user login

2010-11-24 Thread Richard Vézina
Ok I found why I was redirecting to an other controller from default/index function... How can I replace default controller by my own default controller? Is it something possible? Richard On Wed, Nov 24, 2010 at 12:09 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: You meen that

[web2py] Re: detect user login

2010-11-24 Thread mdipierro
What does not working mean for you? That is not the code I asked you to try. This does not help isolate the issue since you have everything in this message (helpers, T, strings, session, auth variables). Try with a simple string first. On Nov 24, 11:09 am, Richard Vézina

[web2py] formatting in IS_IN_DB() list

2010-11-24 Thread Mirek Zvolský
start is datetime, I need: start.strftime(%d.%m.%Y) How can I do it (format the datetime) in the requires=...: requires=IS_IN_DB(db, 'lesson.id', '%(start)s') I'm sorry, maybe this is more python question as web2py question? Thanks in advance. Mirek

[web2py] targeted web2py_ajax_init for dynamically inserted forms

2010-11-24 Thread Josh Jaques
If you load a form onto a web2py page via AJAX, it doesn't get the enhancements from web2py_ajax_init(). I've included a modified web2py_ajax_init that accepts an optional parent selector to provide some scope to web2py_ajax_init. In this way if you load a form onto a page, you can call

[web2py] Re: formatting in IS_IN_DB() list

2010-11-24 Thread annet
Have a look at this post: http://groups.google.com/group/web2py/browse_thread/thread/a7e9e4dc8bcde913/d7ec8b0e35f0aee0 Kind regards, Annet.

Re: [web2py] Re: web2py SSL + Apache + mod_wsgi issues on Ubuntu 8.08 VM machine

2010-11-24 Thread Kenneth Lundström
Are the group and ownership of the files in /applicatios/admin correct. Could you send a copy of the error file as I can´t access it from outside without a password and not when admin is no working. Kenneth Open this file with an editor /home/www-data/web2py/applications/admin/errors/

[web2py] send attachment via xmlrpclib

2010-11-24 Thread António Ramos
Hello, Is it possible to send an attachment from a python program to an web2py app via xmlrpclib? I have a working app with xmlrpc exposed i have a python program that has this code import xmlrpclib server = xmlrpclib.ServerProxy(' http://127.0.0.1:8000/BlaBlaBla/default/call/xmlrpc') what

[web2py] Actions exposed by auth.

2010-11-24 Thread appydev
Greetings I have another question from beginner: In web2py book reads as follows: By default they are all exposed, but it is possible to restrict access to only some of these actions. Referring to the following: http://.../ [app] / default / user / register http://.../ [app] / default / user

[web2py] Re: How could I send a email to every members?

2010-11-24 Thread annet
Here are the layouts I am using: maillayout.html html head meta http-equiv=Content-Type content=text/html; charset=utf-8 / title {{if response.title:}}{{=response.title}}{{else:}} {{=URL(r=request)}}{{pass}} /title /head body style type=text/css media=screen {{include

[web2py] remember widget

2010-11-24 Thread mattynoce
hi all. i'm making a custom login form and, as per this thread, can't get the remember widget to show up: http://groups.google.com/group/web2py/browse_thread/thread/8519e2e48891f03e/258643e0875d0027?hl=enlnk=gstq=custom+widget+remember#258643e0875d0027 it's not {{=form.custom.widget.remember}}.

[web2py] Re: How could I send a email to every members?

2010-11-24 Thread annet
Hi Thadeus, Back in April when I was working on sending an email from within web2py I had a look at this slice: http://www.web2pyslices.com/main/slices/take_slice/69 At the time this was too complicated for me to implement, so I chose the procedure described above. Besides, the sentence 'the

[web2py] Re: send attachment via xmlrpclib

2010-11-24 Thread mdipierro
I have had similar problem before. xmlrpclib cannot stream data so I cannot handle large content such as a file attachment. On Nov 24, 12:28 pm, António Ramos ramstei...@gmail.com wrote: Hello, Is it possible to send an attachment from a python program to an web2py  app  via xmlrpclib? I

[web2py] Re: Actions exposed by auth.

2010-11-24 Thread mdipierro
auth.settings.actions_disabled=['groups','impersonate'] # etc etc On Nov 24, 12:34 pm, appydev appy...@gmail.com wrote: Greetings I have another question from beginner: In web2py book reads as follows: By default they are all exposed, but it is possible to restrict access to only some of

[web2py] Re: remember widget

2010-11-24 Thread mdipierro
I do not think the remember widget exists. The HTML is injected in the form. There is no widget because it does not go in the database model. On Nov 24, 12:43 pm, mattynoce mattyn...@gmail.com wrote: hi all. i'm making a custom login form and, as per this thread, can't get the remember widget

[web2py] Re: web2py SSL + Apache + mod_wsgi issues on Ubuntu 8.08 VM machine

2010-11-24 Thread Hybride
S'Traceback (most recent call last):\n File gluon/main.py, line 453, in wsgibase\nsession._try_store_on_disk(request, response)\n File gluon/globals.py, line 381, in _try_store_on_disk\n response.session_file = open(response.session_filename, \'wb\') \nIOError: [Errno 13] Permission denied:

[web2py] Re: web2py SSL + Apache + mod_wsgi issues on Ubuntu 8.08 VM machine

2010-11-24 Thread mdipierro
You do not have write permissions in the application admin/sessions folder. Massimo On Nov 24, 12:54 pm, Hybride mshybr...@gmail.com wrote: S'Traceback (most recent call last):\n  File gluon/main.py, line 453, in wsgibase\n    session._try_store_on_disk(request, response)\n File

[web2py] Re: remember widget

2010-11-24 Thread mattynoce
simple enough. to save time for those who look here, the html is: div input class=checkbox id=auth_user_remember name=remember type=checkbox value=on / label for=auth_user_remember Remember me (for 30 days) /label /div On Nov 24, 10:49 am, mdipierro mdipie...@cs.depaul.edu

[web2py] libcloud

2010-11-24 Thread mdipierro
http://incubator.apache.org/libcloud/ I can see some nice web2py appliances built on top of this...

[web2py] Re: web2py SSL + Apache + mod_wsgi issues on Ubuntu 8.08 VM machine

2010-11-24 Thread Hybride
Holy hell, that worked. Thank you so much for all of your guys help. On Nov 24, 12:55 pm, mdipierro mdipie...@cs.depaul.edu wrote: You do not have write permissions in the application admin/sessions folder. Massimo On Nov 24, 12:54 pm, Hybride mshybr...@gmail.com wrote: S'Traceback

Re: [web2py] Re: detect user login

2010-11-24 Thread Richard Vézina
I get : Hello %(first_name)s in flash response with this in default.py : auth.messages.logged_in=T('Hello %(first_name)s')#+str(auth.user and auth.user.first_name)) @auth.requires_login() def index(): Index page using the internationalization operator T and flash rendered by

[web2py] Re: working script to install virtualenv and then install and start web2py

2010-11-24 Thread Christopher Steel
I posted some background info on using virtualenv here: http://web2pyslices.com/main/slices/take_slice/105 On Nov 24, 3:49 am, Chris Steel chris.st...@gmail.com wrote: scripts/setup-virtualenv-web2py.sh in the trunk does not seem to be working. Here is a replacement that should do the trick

Re: [web2py] Re: Get User [auth_user] Janrain

2010-11-24 Thread Andrew Evans
Hello I solved my error by adding auth.define_tables() to the mix Janrain loads as expected except when I try to login. Any idea how to solve this issue, I get the following error Invalid argument: token_url domain not in whitelist

[web2py] login in text-mode ipython

2010-11-24 Thread Richard Vézina
Hello, Can I login in with app user in text-mode?? I start web2py like this : python web2py.py -a 'password' -S 'myapp' -M -p 9000 Then in ipython can I log in with one of my user? Richard

[web2py] exercise: automatic conversion of a static site into a web2py site

2010-11-24 Thread mdipierro
I have a challanage: write a script that takes a folder that contains a static html file and converts it into an HTML site. 1) moves all non .html files into static/ 2) moves all .html files into views/xxx/ 3) creates a controllers/xxx.py and for each yyy.html file add an action def yyy():

[web2py] redirect using a new window

2010-11-24 Thread leone
Hi, there is a way to redirect to a new page simulating A , target='new' using URL() or a controller function??? Thanks leone

[web2py] token_url domain not in whitelist

2010-11-24 Thread Andrew Evans
Figured I would start a different post for this :-) Don't know if there is a problem in my Janrain account or if it exists in web2py but I get the following error token_url domain not in whitelist my domains are set in janrain to www.em-ecommerce.com and www.suck-o.de and my code is like this

[web2py] Re: send attachment via xmlrpclib

2010-11-24 Thread mart
yeah, this is one area where xtra time to tinker around would be great... Here's what I do and where web2py has made my life easier (using this part with the DAL as stand alone, but same would apply with an online instance as well). I re-purposed an app I put together a few years back where one

[web2py] Re: exercise: automatic conversion of a static site into a web2py site

2010-11-24 Thread mart
can you provide a sample folder + contents? Mart :) On Nov 24, 3:05 pm, mdipierro mdipie...@cs.depaul.edu wrote: I have a challanage: write a script that takes a folder that contains a static html file and converts it into an HTML site. 1) moves all non .html files into static/ 2) moves

Re: [web2py] libcloud

2010-11-24 Thread Michele Comitini
This is COOL stuff! finally apache is taking in consideration python: without backing from Sun with the java marketing, they are more open to real solutions ;-) 2010/11/24 mdipierro mdipie...@cs.depaul.edu: http://incubator.apache.org/libcloud/ I can see some nice web2py appliances built on

[web2py] Re: How could I send a email to every members?

2010-11-24 Thread mart
thanks for that :) On Nov 24, 1:36 pm, annet annet.verm...@gmail.com wrote: Here are the layouts I am using: maillayout.html html   head     meta http-equiv=Content-Type content=text/html; charset=utf-8 /     title {{if response.title:}}{{=response.title}}{{else:}}

Re: [web2py] Re: Actions exposed by auth.

2010-11-24 Thread appydev
Thanks again Massimo. 2010/11/24 mdipierro mdipie...@cs.depaul.edu auth.settings.actions_disabled=['groups','impersonate'] # etc etc On Nov 24, 12:34 pm, appydev appy...@gmail.com wrote: Greetings I have another question from beginner: In web2py book reads as follows: By default

Re: [web2py] redirect using a new window

2010-11-24 Thread Michele Comitini
do you mean like this? {{=A('click me!', _href=URL(...), _target='new')}} 2010/11/24 leone handja...@gmail.com: Hi, there is a way to redirect to a new page simulating A , target='new' using URL() or a controller function??? Thanks leone

Re: [web2py] Re: exercise: automatic conversion of a static site into a web2py site

2010-11-24 Thread Michele Comitini
Is this a oneshot? Else I would go scons (http://www.scons.org/doc/production/HTML/scons-user/index.html) 2010/11/24 mart msenecal...@gmail.com: can you provide a sample folder + contents? Mart :) On Nov 24, 3:05 pm, mdipierro mdipie...@cs.depaul.edu wrote: I have a challanage: write a

Re: [web2py] Re: detect user login

2010-11-24 Thread Richard Vézina
If I go like this : @auth.requires_login() def index(): *auth.messages.logged_in=T('Hello ')* Index page using the internationalization operator T and flash rendered by views/default/index.html or views/generic.html #auth.messages.logged_in=DIV(T('Hello '), #

[web2py] Re: exercise: automatic conversion of a static site into a web2py site

2010-11-24 Thread mart
scons... good one :) Mart :) On Nov 24, 3:52 pm, Michele Comitini michele.comit...@gmail.com wrote: Is this a oneshot? Else I would go scons (http://www.scons.org/doc/production/HTML/scons-user/index.html) 2010/11/24 mart msenecal...@gmail.com: can you provide a sample folder +

Re: [web2py] Re: send attachment via xmlrpclib

2010-11-24 Thread António Ramos
but if i want, using the shell, to add and image manually do i use db.photo.insert('file'=varwithFile) ? *my test model is db.define_table('photo', Field('file','upload'))* Best regards António

[web2py] Re: Viewing tickets on GAE devserver

2010-11-24 Thread howesc
on the development server i see all my errors on the console (i use the command line so it shows up right in the terminal window. i believe that the mac launcher has a console view that shows this info as well) in production everything is logged to the error logs. click on the logs link on the

[web2py] personnalize login page

2010-11-24 Thread Richard Vézina
Hello, Is there a way to have a particular layout for default/user/login that will not affect ddefault/user/not_authorized for example? I try by adding a login.html in view without success. Thanks Richard

[web2py] Re: token_url domain not in whitelist

2010-11-24 Thread mdipierro
In the janrain configuration page there is a list of allowed domains. You did not list http://www.em-ecommmerce.com On Nov 24, 2:13 pm, Andrew Evans randra...@gmail.com wrote: Figured I would start a different post for this :-) Don't know if there is a problem in my Janrain account or if it

[web2py] Re: redirect using a new window

2010-11-24 Thread mdipierro
or a href={{=URL(...)}} target=newclick me/a On Nov 24, 2:47 pm, Michele Comitini michele.comit...@gmail.com wrote: do you mean like this? {{=A('click me!', _href=URL(...), _target='new')}} 2010/11/24 leone handja...@gmail.com: Hi, there is a way to redirect to a new page simulating A

Re: [web2py] personnalize login page

2010-11-24 Thread Bruno Rocha
You have to customize the user.html which receive 'login' as an argument in request.args, so you can control your behavior in user.html as: {{if 'login' in request.args:}} SOME HTML {{else:}} OTHER HTML {{pass}} 2010/11/24 Richard Vézina ml.richard.vez...@gmail.com Hello, Is there a way

[web2py] Re: exercise: automatic conversion of a static site into a web2py site

2010-11-24 Thread mdipierro
I would like this to be a pure python module with no dependencies. It does not require html parsing just pattern matching (re.sub()). Massimo On Nov 24, 2:52 pm, Michele Comitini michele.comit...@gmail.com wrote: Is this a oneshot? Else I would go scons

Re: [web2py] personnalize login page

2010-11-24 Thread Albert Abril
Or using auth.login() in your controller/view instead of auth(). On Wed, Nov 24, 2010 at 10:41 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, Is there a way to have a particular layout for default/user/login that will not affect ddefault/user/not_authorized for example? I

Re: [web2py] personnalize login page

2010-11-24 Thread Richard Vézina
I have this : {{if request.args(0)=='login':}} {{layoutPassed = 'login_layout.html'}} {{=P(0)}} {{else:}} {{=P(1)}} {{pass}} {{pass}} {{extend layoutPassed}} {{=form}} and I get : Error traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. Traceback (most recent

RE: [web2py] Re: targeted web2py_ajax_init for dynamically inserted forms

2010-11-24 Thread Josh Jaques
Background on jQuery live: - The classic way to bind to an event is doing something like: jQuery(selector).click(function() { // do some stuff }); //Note this is just a wrapper to jQuery(...).bind(click, ...); The issue with that method is that it statically binds

[web2py] Re: exercise: automatic conversion of a static site into a web2py site

2010-11-24 Thread mdipierro
something like this def convert(source, destination, c='xxx'): links=[] actions=[] for file in source folder (traverse tree): if not file.endswith('.html'): copy file under destination/static (and create missing folders) links.append(file) for

Re: [web2py] personnalize login page

2010-11-24 Thread Richard Vézina
{{if request.args(0)=='login':}} {{=P(0)}} {{extend 'login_layout.html'}} {{else:}} {{=P(1)}} {{extend 'layout.html'}} {{pass}} {{=form}} It always take the second layout... Richard On Wed, Nov 24, 2010 at 5:25 PM, Albert Abril albert.ab...@gmail.comwrote: Or using auth.login() in your

[web2py] Re: targeted web2py_ajax_init for dynamically inserted forms

2010-11-24 Thread mdipierro
I think it would be a good idea to switch to live. If you have a patch send it to me and I will take a look. On Nov 24, 4:26 pm, Josh Jaques jjaq...@seccuris.com wrote: Background on jQuery live: - The classic way to bind to an event is doing something like:

[web2py] Re: personnalize login page

2010-11-24 Thread mdipierro
Extend is hanndled by the preprocessor before the if is executed. You can do {{extend layout}} and set the layout variable in the controller. This will not work if you bytecode compile it. On Nov 24, 4:31 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: {{if request.args(0)=='login':}}

Re: [web2py] personnalize login page

2010-11-24 Thread Richard Vézina
I had error should be : But not solve the problem I face. richard On Wed, Nov 24, 2010 at 5:26 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: I have this : {{if request.args(0)=='login':}} {{layoutPassed = 'login_layout.html'}} {{=P(0)}} {{else:}} * {{layoutPassed =

Re: [web2py] Re: personnalize login page

2010-11-24 Thread Richard Vézina
http://www.mail-archive.com/web2py@googlegroups.com/msg47106.html http://www.mail-archive.com/web2py@googlegroups.com/msg47106.htmlI read this thread can't figure out I to do it. In {{extend layout}} layout is a variable or a function? Richard On Wed, Nov 24, 2010 at 5:32 PM, mdipierro

[web2py] Re: personnalize login page

2010-11-24 Thread mdipierro
def user(): layout= form=auth() return dict(form=form,layout=layout) On Nov 24, 4:34 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: http://www.mail-archive.com/web2py@googlegroups.com/msg47106.html http://www.mail-archive.com/web2py@googlegroups.com/msg47106.htmlI read

Re: [web2py] Re: personnalize login page

2010-11-24 Thread Richard Vézina
Finally def user(): exposes: http:///[app]/default/user/login http:///[app]/default/user/logout http:///[app]/default/user/retrieve_password http:///[app]/default/user/change_password http:///[app]/default/user/not_authorized use

[web2py] Re: send attachment via xmlrpclib

2010-11-24 Thread mdipierro
No filename = request.vars.varwithFile.filename or 'filename.txt' stream = request.vars.varwithFile.file or open(filename,'rb') db.photo.insert(file=db.photo.file.store(stream),filename=filename) On Nov 24, 3:37 pm, António Ramos ramstei...@gmail.com wrote: but if  i want, using the shell, to

[web2py] Re: Viewing tickets on GAE devserver

2010-11-24 Thread mdipierro
Perhaps a web2py.py -E error would be enough. On Nov 24, 3:38 pm, howesc how...@umich.edu wrote: on the development server i see all my errors on the console (i use the command line so it shows up right in the terminal window.  i believe that the mac launcher has a console view that shows this

Re: [web2py] Re: token_url domain not in whitelist

2010-11-24 Thread Andrew Evans
hello ty for your help I had mistyped the url in my code. But now I am faced with a new problem when I log in it seems to work but then returns an invalid request message. Any ideas whats up would this have to with routes? *cheers

Re: [web2py] Re: send attachment via xmlrpclib

2010-11-24 Thread António Ramos
i got xmlrpclib to transfer a file from python script to web2py app Here is my code *Python script* import xmlrpclib server = xmlrpclib.ServerProxy(' http://127.0.0.1:8000/CrossValidation1/default/call/xmlrpc') filepath='c:\\' filename='ico.gif' filebin =

[web2py] Problem starting server web2py

2010-11-24 Thread Marcos Vinhal
Every time I try to start the server web2py shows the message below: --- web2py start server --- global name 'rocket' is not defined --- OK --- Please help me if possible ... Thanks ...

  1   2   >