[web2py] Re: Using regular expressions in DAL queries

2012-02-24 Thread Omri Har-Shemesh
I do not know, but I did some internet research and found the following: *PostgreSQL*: supports POSIX style regexps, described to great detail in: http://www.postgresql.org/docs/9.0/static/functions-matching.html *MySQL*: supports a style "which is aimed at conformance with POSIX 1003.2", descri

[web2py] want to insert the data in database when the user will log-in first time

2012-02-24 Thread Sanjeet Kumar
I want to insert the data in database when the user will log-in first time . if the user refresh the index page after login it will again insert the date and time I have the following sample code i know this code is wrong but i want to insert the data only first time when the user will log-in.

[web2py] Re: uploading large file (>15 MB) to blob field

2012-02-24 Thread Fredrik
Hi, we have the exact same problem, it seems to be a problem with pymysql (https://github.com/petehunt/PyMySQL/issues/42), however that fix seems to be integrated in latest web2py but the error remains. Does anyone have any thoughts on this? Best regards, Fredrik On 20 Feb, 01:25, Matt Grham

[web2py] web2py with Aptana - optimization required

2012-02-24 Thread haggis
Hello, after a couple of hours I finally got web2py development (with debugging) working in Aptana Studio. Helpful links for this: http://pierrethibault.posterous.com/2010/10/web2py-eclipse-pydev-recipe.html http://code.google.com/p/neo-web2py2eclipse/ However, there a two minor issues I want to

[web2py] nginx/uwsgi setup on Debian

2012-02-24 Thread Johann Spies
I am trying to replace an apache setup with nginx/uwsgi on my home network as a pilot project for a more formal setup on a server where I am deploying an app. With the help of people on this list I could change my Webfaction configuration to nginx/uwsgi but on a plain Debian computer I am making n

Re: [web2py] nginx/uwsgi setup on Debian

2012-02-24 Thread Roberto De Ioris
> I am trying to replace an apache setup with nginx/uwsgi on my home network > as a pilot project for a more formal setup on a server where I am > deploying > an app. > > With the help of people on this list I could change my Webfaction > configuration to nginx/uwsgi but on a plain Debian computer

[web2py] Sporadic ImportError with custom module

2012-02-24 Thread spiffytech
My web2py app is hosted on Apache with mod_wsgi. Sometimes I'm browsing through it and web2py encounters an error: ImportError: No module named mobileblur.modules.newsblur Caused by this line in my models file: nb_module = local_import("newsblur") This only happens occasionally, but on

Re: [web2py] nginx/uwsgi setup on Debian

2012-02-24 Thread Johann Spies
On 24 February 2012 15:46, Roberto De Ioris wrote: > > This is a quick sequence you can run on debian too: > > wget http://projects.unbit.it/downloads/uwsgi-1.0.4.tar.gz > tar zxvf uwsgi-1.0.4.tar.gz > cd uwsgi-1.0.4 > make > > if all goes well run uWSGI > > ./uwsgi --http-socket :8080 --chdir -

Re: [web2py] nginx/uwsgi setup on Debian

2012-02-24 Thread Roberto De Ioris
> On 24 February 2012 15:46, Roberto De Ioris wrote: > >> >> This is a quick sequence you can run on debian too: >> >> wget http://projects.unbit.it/downloads/uwsgi-1.0.4.tar.gz >> tar zxvf uwsgi-1.0.4.tar.gz >> cd uwsgi-1.0.4 >> make >> >> if all goes well run uWSGI >> >> ./uwsgi --http-socket :

[web2py] using existing DB connection inside module/class

2012-02-24 Thread JaapP
Hi All, i've been struggling with the following problem for some time and hope anyone can help. When i instantiate a class in a controller (class is in separate file in Modules folder) and i want to use the database from within this instance, i have to pass the DB to the class. Inside this i

[web2py] Re: Sporadic ImportError with custom module

2012-02-24 Thread Anthony
Note, local_import has been deprecated -- you can now simply do: import newsblur Maybe try that and see if the problem goes away. Anthony On Friday, February 24, 2012 8:46:54 AM UTC-5, spiffytech wrote: > > My web2py app is hosted on Apache with mod_wsgi. Sometimes I'm > browsing through it an

[web2py] Re: web2py with Aptana - optimization required

2012-02-24 Thread Anthony
> > 1) At default controller Aptana shows me errors at "@auth..." > decorators (Undefined variable auth). Also the service() in the call()- function is unknown. You see my actual imports at the end of this > post. > You'd have to add the following to your list of dummy imports/instantiation

Re: [web2py] using existing DB connection inside module/class

2012-02-24 Thread Johann Spies
On 24 February 2012 16:58, JaapP wrote: > Hi All, > > i've been struggling with the following problem for some time and hope > anyone can help. > > When i instantiate a class in a controller (class is in separate file in > Modules folder) and i want to use the database from within this instance,

[web2py] Re: I would like to learn Web2py but where do I start?

2012-02-24 Thread newbie
Thank you all so much for your responses and recommendations. I will give those a try. Massimo, keep up the great work and thank you for taking the time to help. I look forward to the video tutorial. On Feb 23, 10:20 pm, pbreit wrote: > W3schools is perfectly fine. That fools thing is a little

Re: [web2py] Re: I would like to learn Web2py but where do I start?

2012-02-24 Thread Carlos Costa
Massimo is a nice guy! 2012/2/24 newbie : > Thank you all so much for your responses and recommendations.  I will > give those a try.  Massimo, keep up the great work and thank you for > taking the time to help.  I look forward to the video tutorial. > > On Feb 23, 10:20 pm, pbreit wrote: >> W3sc

[web2py] Re: GAE - Rendering uploaded Blob as jpeg image rather than as a string?

2012-02-24 Thread Massimo Di Pierro
You have two actions: list_image() -> returns an image (always image 1?) ist_images() -> returns the html page. In the latter you can do: View: {{extend 'layout.html'}} Display Jpeg Images Image Title Image Blob {{for img in images:}} {{ =i

[web2py] Re: Using regular expressions in DAL queries

2012-02-24 Thread Massimo Di Pierro
Thanks this helps and it should be easy to add this feature. Can you please open a ticket and add a link to your post? On Feb 24, 3:36 am, Omri Har-Shemesh wrote: > I do not know, but I did some internet research and found the following: > > *PostgreSQL*: supports POSIX style regexps, described t

[web2py] Re: want to insert the data in database when the user will log-in first time

2012-02-24 Thread Massimo Di Pierro
How about adding this at the bottom of your model: def do_something(form): auth.settings.login_onaccept = do_something On Feb 24, 3:47 am, Sanjeet Kumar wrote: >  I want to insert the data in database when the user will log-in first time > . if the user refresh the index page after login it

[web2py] Re: Using regular expressions in DAL queries

2012-02-24 Thread Omri Har-Shemesh
Hi Massimo, I already opened an issueat Google code, its link is in my second e-mail in this discussion. I will add there a link to this discussion. Best, Omri

[web2py] Re: want to insert the data in database when the user will log-in first time

2012-02-24 Thread weheh
Not to take away from Massimo's answer, which is obviously the right way to do it, but the thing you're example is trying to do is basically done for you automatically in the auth_event table. On Feb 24, 11:53 pm, Massimo Di Pierro wrote: > How about adding this at the bottom of your model: > > d

[web2py] Re: using existing DB connection inside module/class

2012-02-24 Thread Cliff
Interesting. I wonder why my modules are working when I just pass the db to the functions within them? On 1.99.2 I have something like this working. mymodule.py contains no classes, just some functions. One looks like this: def myfunction(db, request, session, some_value): query = db[request

[web2py] Re: using existing DB connection inside module/class

2012-02-24 Thread Anthony
That should work fine. You don't have to use classes in modules. Anthony On Friday, February 24, 2012 11:45:13 AM UTC-5, Cliff wrote: > > Interesting. I wonder why my modules are working when I just pass the > db to the functions within them? > > On 1.99.2 I have something like this working.

[web2py] OFF-TOPIC - Udacity - Educating the 21st Century

2012-02-24 Thread António Ramos
Nice way of teaching. They teach python and robotics using python http://www.youtube.com/user/Udacity?feature=watch

[web2py] Re: using existing DB connection inside module/class

2012-02-24 Thread Wikus van de Merwe
The code in controllers is wrapped in web2py with a try except clause that automatically commits or rolls back the changes to db. I believe this is not the case for modules and an explicit commit is needed there. Try to add "db.commit" to your module code.

Re: [web2py] using existing DB connection inside module/class

2012-02-24 Thread JaapP
Hi Johann, Thanks for your quick reply! I will test the suggestions as made in the previous thread (don't know if this works: https://groups.google.com/forum/?fromgroups#!topic/web2py/0k0Fvw6fmb8 ). bye, Jaap

[web2py] Re: using existing DB connection inside module/class

2012-02-24 Thread Anthony
On Friday, February 24, 2012 12:13:20 PM UTC-5, Wikus van de Merwe wrote: > > The code in controllers is wrapped in web2py with a try except clause that > automatically commits or rolls back the changes to db. I believe this is > not the case for modules and an explicit commit is needed there. Tr

[web2py] Re: GAE - Rendering uploaded Blob as jpeg image rather than as a string?

2012-02-24 Thread Wikus van de Merwe
You kind of do :) There is no way to embed streams in HTML directly. You need a separate function showing a single image by id (e.g. /show_image/id) and build a list with links to that function in the list_image view. {{for img in images:}} {{= TD(img.title) }} {{= TD(IMG(_src=URL("sh

[web2py] Re: using existing DB connection inside module/class

2012-02-24 Thread JaapP
Hi Wikus, Thanks a lot! Adding a db.commit() after an insert causes the database to be updated. Bye, Jaap

[web2py] Re: using existing DB connection inside module/class

2012-02-24 Thread Anthony
On Friday, February 24, 2012 12:24:03 PM UTC-5, JaapP wrote: > > Hi Wikus, > > Thanks a lot! > Adding a db.commit() after an insert causes the database to be updated. > The db.commit() shouldn't be needed. Can you show some code? Anthony

[web2py] Re: want to insert the data in database when the user will log-in first time

2012-02-24 Thread pbreit
Is there any way to add captured data or otherwise customize the auth_event auto-logging?

[web2py] * PYTILS *

2012-02-24 Thread cyber
Hi, guys! I just need a tools for processing string in russian for in-words representation of numerals. It seems that PYTILS (http://pypi.python.org/pypi/pytils/0.2.3 or https://github.com/j2a/pytils) is more convinient module. So, is there a way to include PYTILS in my web2py project? Perhaps so

[web2py] Photo Gallery

2012-02-24 Thread Adriano Almeida
Hi folks, I have been trying to create a image gallery for a website that I´ll be hosting on GAE. I am trying to use http://lokeshdhakar.com/projects/lightbox2/ but I cannot make it work. When clicking on the link the would open the box and the fotos nothing happens. Is there anybody that could

[web2py] Editing Web2Py files using Windows Web Interface

2012-02-24 Thread Alok
Hi Friends, Excuse me if this question has been answered. Also I am new to web2py but I love, just love what I have seen so far. One issue which is bothering me though is this. When I try and edit a file using the Web based editor in Windows 7 and IE 9, and bring up the file, the program starts e

[web2py] Daemon process called 'web2py' cannot be accessed by this WSGI application: /home/www-data/web2py/wsgihandler.py

2012-02-24 Thread Adi
I deployed functional application on Ubuntu 11.04 x64, and everything worked fine, including SSL (admin), until I did "do-release-upgrade". https stopped working and I found following Apache error: Daemon process called 'web2py' cannot be accessed by this WSGI application: /home/www-data/web2py

[web2py] Auth exposes login.html, logout.html..?

2012-02-24 Thread davidkw
Hi, not sure if this is a silly question. The documentation says that Auth exposes login.html, logout.html.. What does this mean exactly? I looked through my views, but can't find a login.html or logout.html. Are these hidden from me? Thanks

[web2py] Re: Editing Web2Py files using Windows Web Interface

2012-02-24 Thread Massimo Di Pierro
You are right. There is a glicth in the syntax highlter on some browsers. We have not quite got not the bottom of it. :-( On Feb 24, 1:01 pm, Alok wrote: > Hi Friends, > Excuse me if this question has been answered. Also I am new to web2py but I > love, just love what I have seen so far. > One is

[web2py] Re: Editing Web2Py files using Windows Web Interface

2012-02-24 Thread Anthony
On Friday, February 24, 2012 2:01:07 PM UTC-5, Alok wrote: > > Hi Friends, > Excuse me if this question has been answered. Also I am new to web2py but > I love, just love what I have seen so far. > One issue which is bothering me though is this. > When I try and edit a file using the Web based edi

[web2py] Re: Auth exposes login.html, logout.html..?

2012-02-24 Thread Anthony
> > Hi, not sure if this is a silly question. The documentation says that > Auth exposes login.html, logout.html.. > Where does it say that? In the Access Control chapter, it says: The controller above exposes multiple actions: 1. 2. 3. http://.../[app]/default/user/register http://.../[app]/

[web2py] Re: Photo Gallery

2012-02-24 Thread Anthony
Lightbox is a client-side Javascript library and doesn't really have anything to do with web2py -- as long as you set it up properly, it should work with web2py (or any backend framework). If you show some code, though, perhaps we can figure out the problem. Anthony On Friday, February 24, 201

[web2py] Re: want to insert the data in database when the user will log-in first time

2012-02-24 Thread Anthony
On Friday, February 24, 2012 12:57:50 PM UTC-5, pbreit wrote: > > Is there any way to add captured data or otherwise customize the > auth_event auto-logging? One option might be to add some custom fields to the auth_event table and then dynamically set default values for those fields so when th

[web2py] Re: Auth exposes login.html, logout.html..?

2012-02-24 Thread davidkw
Thanks, I misread the epydoc. I think I'm slowly getting an idea of how auth works. On Feb 24, 3:17 pm, Anthony wrote: > > Hi, not sure if this is a silly question. The documentation says that > > Auth exposes login.html, logout.html.. > > Where does it say that? In the Access Control chapter, it

[web2py] Re: Daemon process called 'web2py' cannot be accessed by this WSGI application: /home/www-data/web2py/wsgihandler.py

2012-02-24 Thread Adi
feel horribly stupid for unnecessary post again, yet happy for getting it to work... rebooted a box, and all works perfectly fine... sorry... On Friday, February 24, 2012 2:53:13 PM UTC-5, Adi wrote: > > I deployed functional application on Ubuntu 11.04 x64, and everything > worked fine, in

Re: [web2py] Re: Photo Gallery

2012-02-24 Thread Chris Hawkes
Sent from my Samsung smartphone on AT&T Anthony wrote: >Lightbox is a client-side Javascript library and doesn't really have >anything to do with web2py -- as long as you set it up properly, it should >work with web2py (or any backend framework). If you show some code, though, >perhaps we c

Re: [web2py] Re: Photo Gallery

2012-02-24 Thread Chris Hawkes
Noobmusic.com uses lightbox with Google app engine. You probably need to show us the entire page you are trying to get to work. Your problem is probably something to do with class names or JavaScript includes. Sent from my Samsung smartphone on AT&T Anthony wrote: >Lightbox is a client-sid

[web2py] Re: * PYTILS *

2012-02-24 Thread howesc
no experience with this package, but if you are on a traditional server just install the package and import it. if you are on GAE or want to "sandbox" things, install the module to web2py/site-packages and then import it. On Friday, February 24, 2012 11:43:12 AM UTC-8, cyber wrote: > > Hi, guy

[web2py] Re: Editing Web2Py files using Windows Web Interface

2012-02-24 Thread Alok
Thanks massimo. I was afraid that either the installation did not go as it should have or I was not doing something right. On Friday, February 24, 2012 11:58:14 AM UTC-8, Massimo Di Pierro wrote: > You are right. There is a glicth in the syntax highlter on some > browsers. We have not quite got

[web2py] Re: Editing Web2Py files using Windows Web Interface

2012-02-24 Thread Alok
On Friday, February 24, 2012 12:08:15 PM UTC-8, Anthony wrote: > > On Friday, February 24, 2012 2:01:07 PM UTC-5, Alok wrote: >> >> Hi Friends, >> Excuse me if this question has been answered. Also I am new to web2py but >> I love, just love what I have seen so far. >> One issue which is bother

[web2py] Re: Photo Gallery

2012-02-24 Thread peter
I have written a web2py application that creates a website for eg an artist. It has a home page, biography and contact page plus it has galleries. Each gallery has pictures, pictures can be clicked on and viewed, and one can go from one picture to the next. It could be used just for photographs. I

[web2py] Re: Photo Gallery

2012-02-24 Thread peter
To see what the current repository deployed on fluxflex looks like, go to kathykuck.fluxflex.com/gallery When Kathy logs in, using the usual web2py way of doing this, 3 new headings appear, allowing her to edit images, edit galleries and edit the personal information. Only the first registered us

[web2py] Re: I would like to learn Web2py but where do I start?

2012-02-24 Thread mikech
Hi Newbie, If you think you'll stick around it would be good to have your real name somewhere. Here is a book on Python that has gotten a lot of attention recently. It starts you from the very beginning. http://learnpythonthehardway.org/ On Thursday, February 23, 2012 12:34:08 PM UTC-8, ne

[web2py] Re: Editing Web2Py files using Windows Web Interface

2012-02-24 Thread Anthony
> > Thanks Anthony. I am thrilled to be part of this web2py community. Your > suggestion worked and after making the change to just 'amy' the IE 9 edting > screen looks perfect. > If you don't like the dark background, you can edit the color scheme in the bundle_python.js and bundle_markup.js

[web2py] Re: I would like to learn Web2py but where do I start?

2012-02-24 Thread BrendanC
Another suggestion for learning is Python Koans - based on Ruby Koans - basically an interactive way to learn and test code by writing short lines of code. https://bitbucket.org/gregmalcolm/python_koans/wiki/Home Check them out! On Thursday, February 23, 2012 12:34:08 PM UTC-8, newbie wrote: >

[web2py] web admin interface doesn't see my app

2012-02-24 Thread Jake Richter
Hello group, I started working on an app from computer A. Using git with Dropbox, I cloned the repo to computer B. I want to work on it through the web admin interface on computer B, but when I fire up the web2py server and go to admin interface, it doesn't see the app, even though it's living in

Re: [web2py] web admin interface doesn't see my app

2012-02-24 Thread Bruce Wade
Did you try restarting the server? I found a few times the admin didn't see my application however after I restarted the server I didn't have the issue. On Fri, Feb 24, 2012 at 5:27 PM, Jake Richter wrote: > Hello group, > > I started working on an app from computer A. Using git with Dropbox, I

Re: [web2py] web admin interface doesn't see my app

2012-02-24 Thread Jake Richter
I have restarted the server a couple times... in the meanwhile, I created an app and copied and pasted all the files, but that was annoying. There has to be an easier way. -- Jake On Fri, Feb 24, 2012 at 9:17 PM, Bruce Wade wrote: > Did you try restarting the server? I found a few times the ad

[web2py] Re: web admin interface doesn't see my app

2012-02-24 Thread pbreit
That should work although I would not advise it (it's not clear to me that git works properly with identical folders on different machines; that's not really how version control is supposed to be set up). Is your whole web2py directory in your Dropbox folder? I'd recommend getting on Bitbucket

Re: [web2py] Re: web admin interface doesn't see my app

2012-02-24 Thread Jake Richter
I just have my git repos on Dropbox, I set up as it is here.Then I went to web2py/applications and did git clone ~/Dropbox/git-repos/name-of-app.git The web interface didn't see it that way so I created the app from the web interface, deleted all the files and

Re: [web2py] Re: [w2py-dev] model less apps (a blog example)

2012-02-24 Thread Johann Spies
On 10 February 2012 08:37, Bruce Wade wrote: > Ok so I came up with a little bit of a different approach then you have, > it seems to be working for me. I did this pretty fast so it will require > some improvements. > I have adapted your method ... > > First create a module: > test.py > #!/usr/

[web2py] Re: BELONGS is not supported on GAE?

2012-02-24 Thread Peter G.
BrendanC: Thanks for those resources! I ended up gutting that functionality for now, but those are some great read :)! The non- relational database backend requires some "unlearning" of SQL database practices... New challenge for a new environment. I also have not gotten a local shell working with

[web2py] Slow queries or how to determine if cache is working?

2012-02-24 Thread pbreit
I'm struggling to figure out if caching is working. I insert a list of categories on pages where I show a bunch of items for sale. First, I only have 400 items in the DB and it takes quite a bit longer than I would expect to display the first time. Second, I am trying to cache the query and it