Re: [web2py] Re: new Starter app (alternative to Welcome app)

2016-03-22 Thread Jason Brower
I agree Massimo.  We should have a small wizard to help select what 
kind of layout we would want.

Blank
Stupid CSS
This one
Bookstrap 3
Angular example
etc...

On Wed, Mar 23, 2016 at 7:43 AM, Massimo Di Pierro 
 wrote:
this is really nice.  We should make a list of welcome apps so people 
can pick and choose.


P.S. Have you seen this? (similar but CSS only) .

On Tuesday, 22 March 2016 21:17:41 UTC-5, Michael Beller wrote:
I created a new 'starter' app for the types of data and process 
management apps I tend to build.


I used https://almsaeedstudio.com/preview as the template and I'm 
hosting a preview at https://mjbeller.pythonanywhere.com/starter.


I'd welcome any feedback but also wanted to share the code at 
https://github.com/mjbeller/web2py-starter for anybody that may want 
to explore.


I started with the goal to create a new web2py app without using the 
Welcome app to help me learn a little more about web2py.  I found 
myself slowly adding more and more code (primarily CSS and JS) from 
the Welcome app to support some features such as Smartgrids.  I'd 
like to evolve Starter to support the upcoming form.py and grid.py 
that the core team is evaluating and developing.

--
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 
Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, 
send an email to web2py+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
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 Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Creating tutorial videos.

2014-08-30 Thread Jason Brower
I was thinking of making some tutorial videos showing how to get 
started with web2py.  These could be link from the online book and 
perhaps even available in the app admin or other place.  I could even 
see the videos used in a special every growing app of all the tutorials 
with live examples.

BR,
Jason Brower


--
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 Groups web2py-users group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Web2py, nginx, installation on Raspberry Pi

2014-08-26 Thread Jason Brower
As crazy as it sounds, I did run that script.  It was a fresh install 
from a NOOBS image.  There has got to be some different.  Just don't 
know what it is.

BR,
Jason Brower

On Mon, Aug 25, 2014 at 1:20 AM, Art Aquino art9...@gmail.com wrote:

Run this script:
scripts/setup-web2py-nginx-uwsgi-ubuntu.sh

It works on the pi. I did it yesterday and its all working.

--
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 a topic in 
the Google Groups web2py-users group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/web2py/Bx_9u0iC86o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
web2py+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
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 Groups web2py-users group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Informating when there is a database change.

2014-07-04 Thread Jason Brower
It would be nice if there was some way for us to see a database change 
happening.
In my production environment I had a big migration happening, but I 
didn't know this and started getting unexpected time outs all the time.
I could get into the admin side and it would have been nice to see that 
a database migration call was happening. (And really cool, the 
percentage done.)

What do you guys think?
BR,
Jason

--
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 Groups web2py-users group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] We need a whats new section in the Web2py Admin page.

2014-03-31 Thread Jason Brower
It would be nice to have a way that you give your version to a server
and it responds with what is new both security, stability, and features.
It's a little annoying to see an update and have to check the features
to see if it is worth it to do the update.
BR,
Jason Brower


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Feature Request: IS_IN_SET with list:string field type

2014-03-29 Thread Jason Brower
I would love to have a list set with strings but I am able to define if
they should be of a certain string type.
Does this already exist and I did it wrong, or would this be a good idea
to implement.
BR,
Jason Brower


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Feature Request: IS_IN_SET with list:string field type

2014-03-29 Thread Jason Brower
I forgot, this is my code:
db.define_table('opening_time',
Field('restaurant', 'reference restaurant'),
Field('start_time', 'time'),
Field('end_time', 'time'),
Field('days', 'list:string')
)

db.opening_time.days.requires = IS_IN_SET(('Monday', 'Tuesday',
'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'))

On Sat, 2014-03-29 at 14:50 +0200, Jason Brower wrote:
 I would love to have a list set with strings but I am able to define if
 they should be of a certain string type.
 Does this already exist and I did it wrong, or would this be a good idea
 to implement.
 BR,
 Jason Brower
 


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Using routes and a subdomain for the ultimate in routing power!

2014-03-26 Thread Jason Brower
I currently have this..

routers = dict(
  BASE  = dict(default_application='melodigram'),
)
But is it possible to just use the subdomains here?

subdomain = request.env.http_host.split('.')[0]
if subdomain = testing:
routers = dict(
BASE  = dict(default_application='testing'),
)
else:
routers = dict(
BASE  = dict(default_application='melodigram'),
)

Does this make sense?
BR,
Jason Brower


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Problems with the server stalling out. Setting up debuging.

2014-03-24 Thread Jason Brower
Yeah, something with apache.  But ngix is much better for us anyway.  I
don't think I will go back to apache any time soon.
As for the time to process the files, about 1 second max at the absolute
most.  Honestly I don't know how to test or check this kind of stuff.
But what we do know is that it's handle requests right now just fine.

BR,
Jason Brower
On Sun, 2014-02-02 at 12:09 -0800, Niphlod wrote:
 seems related to apache and timeouts...
 
 https://groups.google.com/forum/#!topic/modwsgi/UqmMeV0lhC8
 
 BTW: odd errors and unforgiving syntax complexity is what moved me
 (among many others) to nginx+uwsgi. Things there are far more
 understandable, debuggable and reproduceable.
 
 BTW2: how many processes and threads are running for web2py ? How much
 time a request takes to be processed ?
 
 On Sunday, February 2, 2014 8:52:21 PM UTC+1, Encompass solutions
 wrote:
 To give more information I looked in the error logs and found
 the following:
 I am not sure if it is related, but it seems to happen around
 the same time as the error.
 Ideas?
 
 -
 [Sun Feb 02 17:38:52 2014] [error] [client 83.145.241.129]
 File /home/www-data/web2py/gluon/globals.py, line 252, in
 body
 [Sun Feb 02 17:38:52 2014] [error] [client 83.145.241.129]
 raise HTTP(400, Bad Request - HTTP body is incomplete)
 [Sun Feb 02 17:38:52 2014] [error] [client 83.145.241.129]
 HTTP: 400 BAD REQUEST
 [Sun Feb 02 17:38:58 2014] [error] [client 83.145.241.129]
 Script timed out before returning headers: wsgihandler.py
 [Sun Feb 02 17:40:29 2014] [error] [client 83.145.241.129]
 Script timed out before returning headers: wsgihandler.py
 [Sun Feb 02 17:40:29 2014] [error] [client 83.145.241.129]
 Script timed out before returning headers: wsgihandler.py
 [Sun Feb 02 17:40:35 2014] [error] [client 83.145.241.129]
 Script timed out before returning headers: wsgihandler.py
 [Sun Feb 02 17:40:42 2014] [error] [client 83.145.241.129]
 (70007)The timeout specified has expired: mod_wsgi
 (pid=10727): Unable to get bucket brigade for request.
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 mod_wsgi (pid=10725): Exception occurred processing WSGI
 script '/home/www-data/web2py/wsgihandler.py'.
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 Traceback (most recent call last):
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 File /home/www-data/web2py/gluon/main.py, line 532, in
 wsgibase
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 if request.body:
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 File /home/www-data/web2py/gluon/globals.py, line 252, in
 body
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 raise HTTP(400, Bad Request - HTTP body is incomplete)
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 HTTP: 400 BAD REQUEST
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 mod_wsgi (pid=10725): Exception occurred processing WSGI
 script '/home/www-data/web2py/wsgihandler.py'.
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 Traceback (most recent call last):
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 File /home/www-data/web2py/gluon/main.py, line 532, in
 wsgibase
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 if request.body:
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 File /home/www-data/web2py/gluon/globals.py, line 252, in
 body
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 raise HTTP(400, Bad Request - HTTP body is incomplete)
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 HTTP: 400 BAD REQUEST
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 mod_wsgi (pid=10725): Exception occurred processing WSGI
 script '/home/www-data/web2py/wsgihandler.py'.
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 Traceback (most recent call last):
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 File /home/www-data/web2py/gluon/main.py, line 532, in
 wsgibase
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 if request.body:
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 File /home/www-data/web2py/gluon/globals.py, line 252, in
 body
 [Sun Feb 02 17:40:44 2014] [error] [client 83.145.241.129]
 raise HTTP(400, Bad Request - HTTP body is incomplete)
 [Sun Feb 02 17:40:44 2014] [error

[web2py] Copying the database...

2014-03-06 Thread Jason Brower
I have been trying the following and want to make sure of some things:
http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=list%3A#Copy-data-from-one-db-into-another
I used to run SQLite and now it is running postgres.
However, I would like to backup the DB to SQLight and also copy that for
my own use.
My thoughts it to do the example so I thought I would delete the items
from the databases folder and then do the copy.  However, when I move
the files away from that directoy, my system crashed out on me.
I didn't think I was using any of the data there and I can confirm that
I am only using prostgres for my database right now.
What could be wrong here?
Also, if I do the copy to the sqlite format it sounds like I may
overright something.  Could I do something like this?
python scripts/cpdb.py -f applications/app/databases -y
'postgres://username:password@localhost/mydb' -Y
'sqlite://backup.sqlite'

And then copy the entire app over to my computer for testing?
BR,
Jason Brower



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Virtual Fields not working on print.

2014-02-19 Thread Jason Brower
I have this in the model...
import uuid
import os
import pygeoip
gi = pygeoip.GeoIP(os.path.join(request.folder, 'private', 'GeoIP.dat'))
def get_country(row):
return gi.country_code_by_addr(row.from_where)
# -*- coding: utf-8 -*-
db.define_table('melodigram_play',
Field('melodigram_id', 'reference melodigram'),
Field('when_opened', 'datetime', default = request.now),
Field('from_where', 'string', default = request.client),
Field.Virtual('from_country', lambda row: get_country(row))
)
db.melodigram_play.melodigram_id.requires = IS_NOT_EMPTY()
db.melodigram_play.when_opened.requires = IS_NOT_EMPTY()

I can insert data... but when I try to retrieve it, it tells me the row
doesn't exist:
h2From: {{=gram_details.from_where}} :
{{=gram_details.from_country}}/h2

gram_details.from_where has always worked.
gram_details.from_country doesn't work.


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Third-party image grabs being redirected...

2014-02-13 Thread Jason Brower
Is there a way to redirect those that try to download an image directly
to a new location?
The reason is this...
If I for example share this:
https://melodigram.com/gram/20a40890-949c-11e3-97c0-1231390a0101
on twitter.  I need to give it an image as well to show the product.
But the image is clickable and goes to just the image and not the cool
looking view I am working on that has sound added.
Is there a way to catch the situation when the image is pulled alone and
then redirect them to the correct location based on that image or url?
BR,
Jason Brower

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Autodelete, uploadseparate: implementing in production.

2014-02-10 Thread Jason Brower
I want to add autodelete and uploadseparate in production but I have
some worries.
I doubt the files are moved in production, and the database field don't
update.  But I wanted to post here to make sure with you guys.  Does
uploadseparate move files or have issues with existing data?
Second is the autodelete, this has no effect on current data correct?
So any extra files in the system because I neglected to put this field
type in are simply going to just be there in the system, right?
BR,
Jason Brower


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Problems with the server stalling out. Setting up debuging.

2014-02-04 Thread Jason Brower
HMM, the processes are very fast and never take long. maybe 5 seconds,
but most of the time 1 or 2 seconds. Do I really need create a queing
server for this? It's going to be a lot of database reading to make it
happen smoothly.
BR,
Jason Brower

On Tue, 2014-02-04 at 07:05 -0800, Niphlod wrote:
 that's the problem!!! 
 Running external programs within the webserver execution model causes
 the thread to be killed if the request takes too much.
 It's process handling 101: NEVER spawn processes from the web
 application!
 
 On Monday, February 3, 2014 10:06:32 PM UTC+1, Encompass solutions
 wrote:
 Thanks for the pointers! 
 I run two programs... avconv (ffmpeg) and sox both handle
 file 
 conversions at the moment an upload happens. They bail pretty
 easily if 
 there was an error.  They are using files I have stored
 according to my 
 model. 
 BR, 
 Jason Brower 
 
 On Mon, 2014-02-03 at 19:08 +, Ricardo Pedroso wrote: 
  
  On Sun, Feb 2, 2014 at 6:14 PM, Jason Brower
 enco...@gmail.com 
  wrote: 
  
  It seems that I have an issue I can't resolve. 
  Every once in a while at seemingly the worst and
 most random 
  times, the 
  service will stall out.  It simply doesn't respond
 to 
  anything. 
  Going into the computer and running htop shows that
 the 
  computer is 
  doing nothing. 
  I am not running the server with a compiled version
 of my 
  code. 
  I am running: 
  2.8.2-stable+timestamp.2013.11.28.13.54.07 
  (Running on Apache/2.2.22 (Ubuntu), Python 2.7.3) 
  The application does only basic uploading and
 loading of a 
  single item. 
  Here is an example of the webplayer: 
 
 
 melodigram.com/melodigram/default/gram/b662a1da-8c2b-11e3-b0dc-1231390a0101 
  

  I can run F5 reloads on the site for 15 minutes
 straight, not 
  have 
  anyone access the system then then try to load
 something, be 
  it the 
  admin interface or the page I show you here and it
 site for a 
  very long 
  time.  The time it is unresponsive seems random, but
 that's 
  because I 
  haven't discovered how to replicate the problem. 
  If I restart apache and try, it seems to work every
 time. 
  
  
  This king of issues are hard to know exactly, where the
 problem is, 
  without having a clear picture of the application and the 
  infrastructure. 
  
  
  For sure, something is holding apache worker threads for a
 long time 
  or indefinitely. 
  
  
  when a request for 
 
 
 melodigram.com/melodigram/default/gram/b662a1da-8c2b-11e3-b0dc-1231390a0101 
  
  is running: 
  
  
  Are you using any third party C extension? 
  
  
  Are you calling any external program? 
  
  
  Where are the files, that are retrieved by the download
 function, 
  stored? In the same 
  box, or been retrieved from a remote location? 
  
  
  the first thing I would try is using strace utility against
 an apache 
  worker thread to see 
  
  were it is sitting. 
  
  
  Ricardo 
  
  -- 
  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 a
 topic in the 
  Google Groups web2py-users group. 
  To unsubscribe from this topic, visit 
 
 https://groups.google.com/d/topic/web2py/BZQF88jug54/unsubscribe. 
  To unsubscribe from this group and all its topics, send an
 email to 
  web2py+un...@googlegroups.com. 
  For more options, visit
 https://groups.google.com/groups/opt_out. 
 
 
 -- 
 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 a topic in the
 Google Groups web2py-users group

Re: [web2py] Problems with the server stalling out. Setting up debuging.

2014-02-03 Thread Jason Brower
Thanks for the pointers!
I run two programs... avconv (ffmpeg) and sox both handle file
conversions at the moment an upload happens. They bail pretty easily if
there was an error.  They are using files I have stored according to my
model.
BR,
Jason Brower

On Mon, 2014-02-03 at 19:08 +, Ricardo Pedroso wrote:
 
 On Sun, Feb 2, 2014 at 6:14 PM, Jason Brower encomp...@gmail.com
 wrote:
 
 It seems that I have an issue I can't resolve.
 Every once in a while at seemingly the worst and most random
 times, the
 service will stall out.  It simply doesn't respond to
 anything.
 Going into the computer and running htop shows that the
 computer is
 doing nothing.
 I am not running the server with a compiled version of my
 code.
 I am running:
 2.8.2-stable+timestamp.2013.11.28.13.54.07
 (Running on Apache/2.2.22 (Ubuntu), Python 2.7.3)
 The application does only basic uploading and loading of a
 single item.
 Here is an example of the webplayer:
 
 melodigram.com/melodigram/default/gram/b662a1da-8c2b-11e3-b0dc-1231390a0101
 
  
 I can run F5 reloads on the site for 15 minutes straight, not
 have
 anyone access the system then then try to load something, be
 it the
 admin interface or the page I show you here and it site for a
 very long
 time.  The time it is unresponsive seems random, but that's
 because I
 haven't discovered how to replicate the problem.
 If I restart apache and try, it seems to work every time.
 
 
 This king of issues are hard to know exactly, where the problem is,
 without having a clear picture of the application and the
 infrastructure.
 
 
 For sure, something is holding apache worker threads for a long time
 or indefinitely.
 
 
 when a request for
 melodigram.com/melodigram/default/gram/b662a1da-8c2b-11e3-b0dc-1231390a0101
 
 is running:
 
 
 Are you using any third party C extension?
 
 
 Are you calling any external program?
 
 
 Where are the files, that are retrieved by the download function,
 stored? In the same
 box, or been retrieved from a remote location?
 
 
 the first thing I would try is using strace utility against an apache
 worker thread to see
 
 were it is sitting.
 
 
 Ricardo
 
 -- 
 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 a topic in the
 Google Groups web2py-users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/web2py/BZQF88jug54/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Problems with the server stalling out. Setting up debuging.

2014-02-02 Thread Jason Brower
Have others had issues similar to this on Amazon?
Takes a bit of effort to do such things, and eventually I will need many
of the services amazon provide to import the sites abilities.  Like S3
and the Transcoding services.  It would be a big step to move away from
Amazon.
Additionally, I think the issue should seriously be looked at because I
use Amazon on many sites my business runs and it would be a large
annoyance to have to transition just one of them.
BR,
Jason


On Sun, 2014-02-02 at 13:26 -0800, Simon Ashley wrote:
 Spin up an instance on Rackspace/ Linmode/ Digital Ocean and compare
 the result. 
 (have had unpleasant experiences with AWS and elements of this have a
 similar smell)
 
 
 -- 
 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 a topic in the
 Google Groups web2py-users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/web2py/BZQF88jug54/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Updating data in auth.user.(data)

2013-02-03 Thread Jason Brower
When I change data in auth_user.first_name for example that data doesn't change 
in the auth.user.first_name.
In otherwords, it seems that when I make a change to a users settings in the 
database that information is not updated in auth.user.
Is this the correct behavior?
BR,
Jason Brower

-- 

--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Coding of the future?

2013-01-31 Thread Jason Brower
Interesting that we have coding tools built into our framework.
http://www.webdesignerdepot.com/2013/01/web-ides-the-future-of-coding/
BR,
Jason Brower

-- 

--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Logging in with applications.

2013-01-18 Thread Jason Brower
I want to allow external devices, like phones, to login to my web2py.
My current app runs with only JSON calls is there a way to make the login 
occure with JSON?
BR,
Jason

-- 





Re: [web2py] Do we have to have first_name in auth tables?

2013-01-18 Thread Jason Brower
durp durp custome table.

On Fri, Jan 18, 2013 at 9:26 PM, encompass encomp...@gmail.com wrote:
Sorry for the late reply.  Yes, I was using a customer table.
BR,
Jason

On Tuesday, January 1, 2013 9:59:34 PM UTC+2, Niphlod wrote:
@alec: that was to change the default behaviour of having a first_name 
accompanied by last_name and so on on the auth_user table. This is a different 
problem, no ?

@encompass : are you using a custom auth instance ?

On Tuesday, January 1, 2013 7:55:37 PM UTC+1, Alec Taylor wrote:
Hey Jason,

Reported this same issue a few days ago; I think they're working on it: 
https://groups.google.com/d/topic/web2py/D8VewP3g-R0

On Wed, Jan 2, 2013 at 5:52 AM, encompass enco...@gmail.com wrote:
I am getting an error when trying to view the database in the admin
AttributeError: 'Row' object has no attribute 'first_name'
How would I get around this as the database admin is pretty useful. :)
BR,
Jason Brower

-- 
 
 
 

-- 
 
 
 

-- 





[web2py] How experimental is postgis?

2013-01-17 Thread Jason Brower
I am hoping to use it in an upcoming application.  Does anyone here have issues 
with this that still need to be resolved?
BR,
Jason

-- 





Re: [web2py] Added Conditional Validation in the Model...

2012-12-30 Thread Jason Brower
I'll take number 2. :) Looks much cleaner to me!  I new about number 1 but was 
hoping to see something that sat in the model.  Thanks.
BR,
Jason Brower


On Sun, Dec 30, 2012 at 8:16 AM, Bruno Rocha rochacbr...@gmail.com wrote:
 can see two options.

1. Use form validation:


def check_user(form):
    query = db.site.user == form.vars.user
    query = db.site.location == form.vars.location
    if db(query).count():
    form.errors.user = already exists 

def action():
    form = SQLFORM(db.site)
    if form.process(onvalidation=check_user).accepted:
    # do whathever

2. Create a computed Uni-Key


db.define_table('site',
    Field('location', 'string'),
    Field('user', db.auth_user, readable=False, writable=False),
    Field('typos', 'blob', readable=False, writable=False, default=None),
    Field('status', 'string', readable=False, writable=False, 
default='pending'),
    Field('last_scan', 'datetime', readable=False, writable=False, 
default=None),
    Field('unikey' , unique=True, notnull=True, compute=lambda row: 
%(user)d_%(location)s % row
)



On Sun, Dec 30, 2012 at 4:06 AM, encompass encomp...@gmail.com wrote:
I have this in my model.
db.define_table('site',
    Field('location', 'string'),
    Field('user', db.auth_user, readable=False, writable=False),
    Field('typos', 'blob', readable=False, writable=False, default=None),
    Field('status', 'string', readable=False, writable=False, 
default='pending'),
    Field('last_scan', 'datetime', readable=False, writable=False, default=None)
)

db.site.status.requires = IS_IN_SET(['pending', 'working', 'done'])
db.site.location.requires = IS_URL()
I want it so that it validates that the combination of db.site.user and 
db.site.location are a unique value.  How do I do that in web2py?
I assume there is a way to do this in the model file and now in a controller 
with checks before insert.
BR,
Jason
-- 
 
 
 

-- 
 
 
 

-- 





Re: [web2py] Added Conditional Validation in the Model...

2012-12-30 Thread Jason Brower
However.  I just tried it and was told it can't be done.
OperationalError: Cannot add a UNIQUE column

Error snapshot help

class 'pysqlite2.dbapi2.OperationalError'(Cannot add a UNIQUE column)
Bummer.
BR,
Jason Brower


On Sun, Dec 30, 2012 at 8:16 AM, Bruno Rocha rochacbr...@gmail.com wrote:
 can see two options.

1. Use form validation:


def check_user(form):
    query = db.site.user == form.vars.user
    query = db.site.location == form.vars.location
    if db(query).count():
    form.errors.user = already exists 

def action():
    form = SQLFORM(db.site)
    if form.process(onvalidation=check_user).accepted:
    # do whathever

2. Create a computed Uni-Key


db.define_table('site',
    Field('location', 'string'),
    Field('user', db.auth_user, readable=False, writable=False),
    Field('typos', 'blob', readable=False, writable=False, default=None),
    Field('status', 'string', readable=False, writable=False, 
default='pending'),
    Field('last_scan', 'datetime', readable=False, writable=False, 
default=None),
    Field('unikey' , unique=True, notnull=True, compute=lambda row: 
%(user)d_%(location)s % row
)



On Sun, Dec 30, 2012 at 4:06 AM, encompass encomp...@gmail.com wrote:
I have this in my model.
db.define_table('site',
    Field('location', 'string'),
    Field('user', db.auth_user, readable=False, writable=False),
    Field('typos', 'blob', readable=False, writable=False, default=None),
    Field('status', 'string', readable=False, writable=False, 
default='pending'),
    Field('last_scan', 'datetime', readable=False, writable=False, default=None)
)

db.site.status.requires = IS_IN_SET(['pending', 'working', 'done'])
db.site.location.requires = IS_URL()
I want it so that it validates that the combination of db.site.user and 
db.site.location are a unique value.  How do I do that in web2py?
I assume there is a way to do this in the model file and now in a controller 
with checks before insert.
BR,
Jason
-- 
 
 
 

-- 
 
 
 

-- 





[web2py] custom forms can be annoying/confusing...

2012-12-18 Thread Jason Brower
I am trying to use existing theme classes and other attributes but can't, for 
the life of me, figure out how to properly do it.
He is what I have in HTML, and if someone can tell me how to do with with 
SQLFORM or SQLFORM.factory, I would greatly appreciate it.
I tried just doing the inputs with .custom and couldn't get that to work with 
things like placeholder attributes and so forth. :/  Horrible baffled as the 
documentation wasn't clear enough there on how to make it happen.
I would like to do as much of this stuff in the view as this is view stuff.  I 
think it's weird to be formating in the model if we can put it in the view 
instead.

I have this as my code in normal HTML5:

form action={{=URL('default', 'index')}} method='get'
div class=button_bg
input type=text name=site class=span3 subscribe_input size=24 
type=text placeholder=Enter site url
/div!-- end .button_bg --

div class=button_bg
input type=text name=email class=span3 subscribe_input size=24 
type=text placeholder=Your email
/div!-- end .button_bg --
div class=button_bg
button class=btn btn-large subscribe_button type=submitSend me 
the results!/button
/div!-- end .button_bg --
/form

BR,
Jason Brower (the confused.)

-- 





Re: [web2py] Sending and Recieving JSON data...

2012-11-18 Thread Jason Brower
I still don't get it. To me it looks like @service.json is all about 
taking data in the URL parameters and turning it into json code.  I am 
wanting to build the server to receive much more data than could ever be 
including in that URL.  Or am I missing something in the documentation.

http://web2py.com/books/default/chapter/29/10#Remote-procedure-calls
I want the server to TAKE json data and then RETURN json data.

On 11/19/2012 07:43 AM, Jonathan Lundell wrote:
On 18 Nov 2012, at 9:14 PM, encompass encomp...@gmail.com 
mailto:encomp...@gmail.com wrote:

Let's say for example I have the example code from the json website:
{
 glossary: {
 title: example glossary,
GlossDiv: {
 title: S,
GlossList: {
 GlossEntry: {
 ID: SGML,
SortAs: SGML,
GlossTerm: Standard Generalized Markup 
Language,
Acronym: SGML,
Abbrev: ISO 8879:1986,
GlossDef: {
 para: A meta-markup language, used to create markup 
languages such as DocBook.,
GlossSeeAlso: [GML, XML]
 },
GlossSee: markup
 }
 }
 }
 }
}
And let's assume this is sent data from the phone.
How would I build the controller to part this?  The example here from the book 
didn't tell me much.  At least that I can see.


JSON-RPC requires that the top-level JSON object be in a certain 
format, with specified members, and the return object is similarly 
defineds. Unless you want to redefine your JSON objects, you can't use 
JSON-RPC.


There's a JSON service as well, but you have to do your own parsing. 
You can look at gluon.utils.Service.serve_jsonrpc to see how the 
JSON-RPC service does it. I'm not sure why the JSON service doesn't 
decode the incoming object, but there you are...





  :/
| @service.jsonrpc
 def getTasks():
 todos = db(db.todo).select()
 return [(todo.task,todo.id) for todo in todos]|


On Monday, November 19, 2012 7:05:49 AM UTC+2, encompass wrote:

The application on the mobile devices already exists and works. I
need to make many applications that work with the applications
for testing and so forth.
The application currently sends the JSON data to a webserver so I
just want to make web2py the server instead of the other framework.


On Sunday, November 18, 2012 7:48:02 AM UTC+2, Marin Pranjić wrote:

JSONRPC should be used if you want to implement RPC service
but if you only need to send json data, you can do it that
way or another.

How would you send the data? Something that works in the
background or manually, from web browser?

Anyway, the issue can be how to do it on your mobile device
(depends or your needs), not the web2py as a server :)


On Sun, Nov 18, 2012 at 6:06 AM, Jason Brower
enco...@gmail.com wrote:

I have a mobile device that sends various data using json
to a server.
I would like this server to be web2py.
How would I do this?
Am I on the right track here?
http://web2py.com/books/default/chapter/29/10#JSONRPC
http://web2py.com/books/default/chapter/29/10#JSONRPC
Or am I looking in the wrong place.
There will be a large amount of data sent.
BR,
Jason Brower





--





--





[web2py] Sending and Recieving JSON data...

2012-11-17 Thread Jason Brower

I have a mobile device that sends various data using json to a server.
I would like this server to be web2py.
How would I do this?
Am I on the right track here?
http://web2py.com/books/default/chapter/29/10#JSONRPC
Or am I looking in the wrong place.
There will be a large amount of data sent.
BR,
Jason Brower

--





[web2py] How do I include text from a file in static in my email templates?

2012-11-16 Thread Jason Brower
I want to include the text from static in my email templates.  I 
currently have this, but it doesn't work:

style type=text/css
{{=LOAD(url=URL('static', 'css/web2py.css', scheme='http'),ajax=False)}}
{{=LOAD(url=URL('static', 'css/style.css', scheme='http'),ajax=False)}}
/style
But this doesn't work as I can't use js in email messages.
BR,
Jason Brower

--





[web2py] How do I handle more than 32768 characters in the database?

2012-11-16 Thread Jason Brower
I was including the css I use in my emails and it's telling me it is 
more than 32768 Chars.


'message':'enter from 0 to 32768 characters'

Any way I can get around this issue?  I suppose I could try to shorten 
my css but I wish there was a better way. (Compressing the CSS would be 
cool too.)

BR,
Jason Brower

--





[web2py] I have a generated pdf file I want to return to the view...

2012-10-22 Thread Jason Brower

How do I return a file to the view?
Is there a way to give it a file name as it comes out?
It's a PDF file I generated in the controller.  I think I can get it as 
a file like object too.
As a bonus, how do I delete it after it has been downloaded. (Thought I 
could easily do that in a cron job.)

BR,
Jason Brower

--





[web2py] Rendering to SVG...

2012-10-21 Thread Jason Brower

Had a fun idea.
I would create pdf templates in svg format using inkscape and it's magic.
Then when the template is rendered using the render() method, I would 
using inscape from command line to convert the page to PDF.

Fun right?
Any problems you see in this?
BR,
Jason Brower

--





[web2py] Forms removing data on errors...

2012-09-22 Thread Jason Brower

I am trying to fix a bug in InterestID.  http://interestid.com
The issue is that the form looses the data you enter if there is an 
error in the form.
Any ideas why?  In particular the invitation and event texts are not 
staying if there is some kind of error.

You can try it on out testing server all you like.
http://testing.interestid.com
Hope you can help.
You can use this use if you like.
U:testing_user
P:testinguser
BR,
Jason Brower

--





[web2py] Somewhere between 1.97 and 2.0.8 I lost translations.

2012-09-11 Thread Jason Brower
It seems that our production system stoped serving translated versions 
of our website.  Even when our browsers are on the correct settings it 
doesn't switch to our Finnish translations.

Any way I could resolve this?  Something you need to know?
BR,
Jason
http://interestid.com

--





[web2py] Doing larger translations...

2012-08-27 Thread Jason Brower
I am wanting to create large amounts of content that needs to be 
translated.  Is the Lazy T() way the best for this?

Whole pages of text will need to be translated.
BR,
Jason Brower

--





Re: [web2py] Web2py expert needed for start-up

2012-07-17 Thread Jason Brower
I may be able to a lot some hours from my teams if you would like the 
work. It all depends on how much you want to pay for the developer.  
Ours are some of the best in Finland and we are experienced in working 
with many kinds of platforms including web2py.

If you want to discuss more I am available on skype or through this email.
Best regards,
Jason Brower

On 07/17/2012 02:23 AM, Pepe C wrote:

Hi,

We have a set of applications on web2py and we are looking for an 
expert that can help us to operate and develop them.  This is a 
long-term role taking ~10 hours a week, although we do have a bunch of 
additional work to get done in the next few weeks.


Responsibilities include:

  * Development of new web services
  * Web2py administration and deployment
  * Polishing and addressing bugs in the existing code

Experience with Jquery mobile plugin or mobile layouts would be a big 
plus.


In your replies please tell us about your portfolio, your availability 
for the next two months and your hourly rate.


Thanks!
--






--





Re: [web2py] solicitation for help with public health project for lip reading

2012-07-16 Thread Jason Brower

Sounds fun!  Let's talk more about it.
skype:super-jason
or just use my email...

On 07/16/2012 01:23 AM, web-dev-m wrote:
I am working on many projects, and I figured I would ask for help on 
here to see if anyone wants to help with this.


We are currently working on a project to help hearing impaired people 
learn to read lips better.  When hearing impaired people learn to 
speak, they must rely on lip reading more than the average person in 
order to improve their vocabulary.  As a result, many hearing impaired 
people have vocabulary and reading abilities many grade levels below 
the average person.  We are working on a web2py solution to this 
problem.  The basic setup of the site is as follows:


Users will come to the site and be able to navigate a categorical list 
of uploaded words. This program will display videos of people saying 
words, along with their definition, and use in a sentence. Ideally, 
users will be able to read the words into their computer microphone 
and get feedback on computer recognition of their pronunciation.


Users can also add entries wikipedia style. On the back end, a select 
group of users is defined which can allow user entries to be displayed 
to the public.  These users can also edit the uploaded videos/their 
definitions/and sentences.


If you have any interest in helping make this project a success, 
please let me know.  If you want to take over development of this 
project, we are also willing to pay up to $1500 for a nice looking, 
complete solution.





[web2py] Sending an email on CRUD complete...

2012-07-12 Thread Jason Brower

I am reading in the book:
crud.settings.create_onvalidation = StorageList()
But I just don't get it.
I wanted to send an email when the form submits successfully, and I have 
created a method for that.

send_email(to_email, subject, message)
How would I do this?
BR,
Jason Brower



[web2py] Interesting thing on the book website...

2012-07-11 Thread Jason Brower
When I search for || It stops at the first | and crashes my browser.  
Are you guys getting this too?

BR,
Jason



[web2py] REQUEST: Flag if database changes

2012-07-11 Thread Jason Brower

I wonder if the following would be good:
A flag would be marked True if there has been an auto-migration.
Then you could check if a change has happened and fix items in your 
database, but not need to search every time a page is run.
For example, if there are items that have a None and now need to have a 
default value from a list.

db.foo.bar.requires = IS_IN_SET([1,2,3,4])
This would make an new field have None for all existing records. That's 
not good, I would like:

if db.foo.bar.feild_changed:
#run my script
pass
BR,
Jason


Re: [web2py] Any jquery gurus out there?

2012-07-10 Thread Jason Brower

What is it that isn't working in IE?

On 07/11/2012 01:54 AM, RKS wrote:
I know this is probably not the right place to ask, but I am using w2p 
and post here pretty frequently so I figured what the heck. I'm also 
in a rush and not finding out what I need on stackoverflow.


I have some jquery and it works in every browser except any version of 
IE. If you happen to notice anything right off the bat that will cause 
this not to work, please let me know. I'm desperate. Thanks.


script 
src=https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js;/script

script
$(function () {
// hide all the steps on document load
$(div.step).addClass(hidden);
// show the one step that is identified by the current 
hash (if any)

$(document.location.hash).removeClass(hidden);
$(a.reveal).click(function (event) {
var idToReveal = $(this).attr(href);
// store the ID to show in the URL for bookmarking
document.location.hash = idToReveal;
// hide every step that is currently visible
$(div.step).not(.hidden).addClass(hidden);
// reveal the next div (as identified by the current 
link's href)

$(idToReveal).removeClass(hidden);
// prevent the default click behavior (i.e. prevent 
navigation)

event.preventDefault();
});
});
/script

Quick recap, this hides divs and shows them via anchors on the page. 
It also saves the hash so on reload it opens to the current hash 
instead of going back to 1. Thanks





Re: [web2py] Re: Has anyone done a detailed security analysis or attempted a methodical attack on web2py?

2012-07-09 Thread Jason Brower
I know a few of these guys, and they relly seem to know their stuff.  
Let's see if they take the bait. :)  They know python and webservices 
very well.

BR,
Jason Brower

On 07/10/2012 01:24 AM, Massimo Di Pierro wrote:

No but I am willing to pay to get it done.

On Monday, 9 July 2012 10:48:39 UTC-5, scausten wrote:

One of the awesome things about web2py is of course the built-in
and well-documented resilience against a range of attack methods,
but I was wondering if anyone has attempted a methodical
(white-hat) attack to probe any potential weaknesses?

Just out of interest :)






Re: [web2py] When does translation take place.

2012-07-05 Thread Jason Brower
Don't know all the details.  But it's best to leave logical things 
outside of the translations. Otherwise you end up destroying your app 
when someone does the translation change.
The translations can happen anywhere.  They are executed as soon as you 
run them.

So T('test') = test it is a string.
BR,
Jason

On 07/05/2012 12:23 PM, Annet wrote:
Some of my menus are generated using tables containing fields being 
True of False. The problem is that the table fields are in English and 
the menu items should be translated. I wonder whether translation 
happens before any comparisons being made in a view or after.


So, if I have T('Timetable) which I translate to Lesrooster, will I be 
able to compare it to a field called 'Timetable' in a view or has 
Timetable been translated to Lesrooster before.



Kind regards,

Annet






Re: [web2py] html5 background video script

2012-07-05 Thread Jason Brower
There are usually javascript plugins that you can have handle any 
function you like when the video ends...

Never used this but a quick google lead me to here...
http://jplayer.org/latest/developer-guide/#jPlayer-events
Notice it has event handling for when the video has ended.
BR,
Jason

On 07/05/2012 12:12 PM, lucas wrote:

hello one and all,

i am good with server-side processing.  very new to client-side java 
script stuff.  i think this idea requires that; please give me your 
best advice.


client loads a page that contains html5 video.  user hits play on one 
of the videos on the page and is watching it.  what is the best 
approach to writing a client-side script, java script, ajax, etc., 
that will report the ending time of the video watch by the user if the 
video played either to the end, was paused, or stopped by the user? 
 you can see i want data on the server for how long the user is 
watching the video so that that data can be analyzed and such 
information sent back to the video producer for feedback and such.


i am guessing the video player buttons would have to trigger their 
onclick events of the pause/stop buttons to run the client-side 
script, also the onend/oncompletion of the video, in which the script 
will then grab the final video time and report that back to the server 
through some predesigned communication data protocol exchange.  that 
is all i can guess at this point.  please help me write such a script 
and give direction.


thank you in advance and have a great week.  lucas





[web2py] Change password without the link...

2012-07-04 Thread Jason Brower
Is there a way that the user can change their password from the default 
features of auth without getting an email with the link?  It seems the 
only way is the link to get an email with a link to change the password.

BR,
Jason Brower


Re: [web2py] Forms - MVC model

2012-06-27 Thread Jason Brower

On 06/27/2012 07:30 PM, Jonathan Lundell wrote:

On Jun 27, 2012, at 4:08 AM, Pedro Casalinho wrote:
This may be a dumb question but, should forms be created in 
controllers and passed to the view or should they be created in the 
view, taking into consideration the MVC model





MVC is a pretty leaky abstraction, especially in the context of 
web2py, where you start creating the view in your model (with explicit 
or implicit control over the representation of fields).


At any rate, create your forms in the controller, because you need to 
deal with their submission there.

--



OK, hate to nag about it, but your declaring a type of field in the 
model.  Sometimes you have to make your own type of field. If you create 
your field types correctly in the model, then web2py knows what to do 
when creating the view. :) That's one thing about Web2py I go giddy over. :)

BR,
Jason

--





Re: [web2py] Webservice to upload files

2012-06-27 Thread Jason Brower

Sure.  Easy.
Make your model that will hold the files.
Create pages that handle the uploading of files.
Create pages to handle the downloading of files.
The hard part is in the details, for example, what features do you want 
to have. Which is really something web2py can do be I think you should 
give it a shot first.

BR,
Jason
On 06/27/2012 02:10 PM, Adriano Almeida wrote:

Hello Gentleman

Is this possible to create a webservice with web2py to upload files 
(ex:pictures)? How could this be done if I want to have some security 
(password verification) on it?


I would like to integrate a web2py service with a mobile  application, 
dropbox style.


Thanks in advance

Adriano
--






--





Re: [web2py] Users Poll: To keep the button look for the welcome app's auth options, or not ?

2012-06-17 Thread Jason Brower

B.1 looks nice.

On 06/17/2012 06:30 AM, Andrew wrote:
A  week or two ago a change was made to the nav bar to give the auth 
buttons for Login, Register, etc   a button look.   This was part of 
the fix to the dropdown menus to get them to work with bootstrap. 
 Another change was made to revert back to the old look (but only as 
an attachment to a previous post in this list).


There are two screen shots, current welcome app, and with the buttons 
reverted to the old look.


Credit to Paolo for making both changes.  Given that the buttons have 
been in trunk for a while, it is worth getting a consensus to keep it 
or revert it.  So:


*Vote:*
*A) KEEP THE BUTTON LOOK*
*B) REVERT TO THE OLD LOOK*
*
*
*if B) *
*
*
*B.1) Revert to the Pipe separator between the options (as shown)*
*B.2) Don't include the Pipe separator.*


B.1) involves updating a recent patch to layout.html:
div id=navbar{{='auth' in globals() and auth.navbar(separators=(' 
',' | ','')) or ''}}/div


A patch for B.1) has already been sent to Massimo (that's my vote :) ) 
, but let's see what the general feeling is.


Thanks




Re: [web2py] how to install web2py and deploy web2py application in ubuntu server?

2012-06-14 Thread Jason Brower
Built into web2py for when you develop locally is a server called 
Rocket. This helps a lot because you don't have to setup the server to 
be running all the time.

Take a look at the diagram I have given in this email.
The webserver is what listens to requests from somewhere on the 
network/internet and depending on the information passes it to the 
correct location.  This is rocket, apache, twisted, cherokee, or one of 
many many others.
Next, that information is passed to a module that executes pages 
according to Massimo's marvelous magic we call web2py. :) That system 
then runs your application.  If it needs access to your database it will 
connect to it and get the data it needs.
One thing I didn't mention in the diagram is the static files.  In the 
local setup with rocket they are given with web2py. And it is slower.  
In the apache setup, we can take a shortcut and serve the files directly 
from the apache webserver instead of going through all 3 layers. But you 
shouldn't have to worry about it until your getting into more advanced 
stuff.
Lastly, are you absolutely needed mysql? I am sure it can handle what 
your doing, but your going to have to do it manually, where as the 
script I showed you installs postgresql.  From web2py, most things are 
going to be identical to postgres so your not going to notice much of a 
difference in my opinion.  :)

Help that explains things for you.
BR,
Jason Brower


On 06/15/2012 06:07 AM, Amit wrote:
Thanks Jason for providing the useful inputs, I have to use ubuntu 
machine as a server so will not be used for development purpose, will 
develop web2py application in other PC and simply deploy that 
application into ubuntu machine, my application will use MySql 
database and default web server which will be provided by web2py 
framework.I didn't understand why do I need to install apache web 
server and postgresql as my application will not use these two(as i 
mentioned above my app will use MySql and web2py web server). Please 
add some points on my doubt.


Regards,
Piks

On Thu, Jun 14, 2012 at 4:59 PM, Jason (spot) Brower 
encomp...@gmail.com mailto:encomp...@gmail.com wrote:


You can run the script on your system by typing python web2py.py
but I assume you know this.

To install it permanently there is a script just for this.
It does the following:
* Installs any required features that you would need to run web2py.
* Setups apache for you with access to https:// for your admin
interface.
* Install postgresql for you if you need a database.
And many other things you can see when your looking at the scripts
code.
You can running it like this from your web2py directory...
cd scripts
./setup-web2py-ubuntu.sh
And have fun!
You can see what it runs, which is most likely what we would tell
you in email by typing this...
cd scripts
gedit setup-web2py-ubuntu.sh
BR,
Jason Brower


On Thu, Jun 14, 2012 at 1:41 PM, Amit amit.khaw...@gmail.com
mailto:amit.khaw...@gmail.com wrote:

I am new bee in web2py development so can anyone share me
whole procedure of how to install web2py in ubuntu machine?
And how to run web2py application in ubuntu machine?

Please share me the procedure in details.

Thanks in advance.





attachment: example_setup.png

Re: [web2py] how to install web2py and deploy web2py application in ubuntu server?

2012-06-14 Thread Jason Brower
Yeah, I did the script I mentioned to you earlier on ubuntu running on 
amazon.  Very easy install.

Once your have everything setup, installing your app is very easy.
Let's see how far you get with the script and then we can go from 
there.  Do you have an application you have already made on your local 
machine?

BR,
Jason Brower

On 06/15/2012 07:15 AM, pbreit wrote:
Both MySQL and Postgres are fine. Use whichever you or anyone on your 
team has experience with and/or is comfortable with.


The Rocket web server that comes with Web2py is great for development 
but most or all people use something like Apache or Nginx in 
production for various reasons, performance being just one.


One way to learn how to do an install is to review one of the scripts 
provided with web2py:

http://code.google.com/p/web2py/source/browse/#hg%2Fscripts

You don't necessarily need to run them but instead can run each 
command manually so you get an understanding of what is going on and 
can fix problems as they arise. It's nice to do this on a cloud server 
so you can easily start over from scratch.




Re: [web2py] Is web2py the right tool for a report project?

2012-06-13 Thread Jason Brower
I think web2py would do this very well. I come from experience in jasper 
reports.

---
Jason

On 06/13/2012 11:15 PM, thinkwell wrote:
I'm rewriting a python report script that processes CSV files and 
emails the reports on a monthly basis (triggered from system cron).


My python script basically does the following:

1. Parse CSV data.
2. Write html report and save to archive directory on server.
3. Email report as attachment to admins.

In the new version, I want to use a templating language so my first 
thought was to use jinja or mako. But then I got to thinking  
eventually, I'd like this report to also have a web interface where 
uses could customize criteria or simply run the defaults manually in 
between scheduled monthly runs. So perhaps I could learn web framework 
like web2py and build the new report around web2py and use web2py for 
templating.


However, in reading the docs, it's becoming clear to me that web2py 
expects to serve the output to a browser, not write monthly files 
(based on a pre-defined template) to system disk and then email the 
file to recipients. I'm a web2py newbie. Is this a good first project, 
or should I stick with python scripts  a templating library to 
produce the reports.


What are your comments/advice?

Thanks!




Re: [web2py] Re: A Web2py CMS like Joomla ?

2012-06-12 Thread Jason Brower
There are also big drawbacks to these cms's for example the sucurity 
flaws in Joomla are out of this world.  Same with drupal, so many 
plugins, add-ons and other what not with wholes in them it's sometimes 
very hard to keep up with the issues.
I work on drupal based sites all the time and run into big issues when 
we need to work in groups.  When our personal environments are setup to 
develop on, we can't post much of our data to the version control that 
we share.  Infact, on a recent project I have to copy paste code from a 
real editor to the block editor in drupal.  That data is saved to my 
database and is not in sync with everyone else who also just made a 
different addition to their database.  We spend half a day showing what 
we did for the blocks and figuring out how to make all our code work 
together.  In web2py this is much more rare.
Drupal can also, very easily, but much heavier on the database.  And you 
need to figure out your own DAL tools instead of having one right away.

And the installation process is easier, at least to me, in Web2py.
On the other hand, drupal has features that let you start working with 
editing content right away and that can be nice, but due just a little 
bit of theme editing and your swimming in deep directories trying to and 
trying to place content much more than you would in web2py.
At my work, which accepts most projects very easily, turn away from 
Joomla.  It's not a tool we want to use, ever.

My 2 cents,
Jason

On 06/13/2012 12:21 AM, Arthur P. wrote:

Maybe also look at the post: Instant press 2.1.0 holiday edition

Having installed my first CMS using Joomla, my albums using Gallery2, 
and having more recently used Drupal, I think most if not all Python 
based CMS's are still very much programmer's products, have not yet 
reached the plug and play level of Joomla. Web2Py as framework 
certainly seems the easiest to install and to get something up and 
running with, but I have the feeling I will have to do a bit more 
reading than with Joomla, and even than Drupal even though that does 
have a bit more of a learning curve, before I understand how to get 
the current basic CMS solutions to approach the capabilities of a 
Drupal or Joomla christmas tree filled with modules and plug-ins.




On Friday, May 25, 2012 5:54:54 AM UTC+2, Andrew wrote:

There have been numerous posts on a web2py based cms, and I know
there are many solutions out there, at varying stages of
development.   They each have a different focus so it is not a
simple question of which one is best.  I won't try and mention
them by name.

However,  A colleague of mine was talking about Joomla and I
wanted to be able to offer some strategy on a comparable web2py
cms.   Would anyone care to comment on which of the web2py cms'
would be a contender to Joomla ?  If not now, perhaps with a
roadmap for the future.

Personally, and I've said it before,  cms functionality is very
important, and I think we should highlight the cms offerings on
the web2py website.  Not necessarily one, but showcase the best
of For example, look at
http://www.zope.org/the-world-of-zope
http://www.zope.org/the-world-of-zope   It mentions Plone and
Silva.  Such a thing would also strenghten the adopton of web2py. 
Are they production ready enough to do that ?


Thankyou.

Andrew W





[web2py] We should add mariaDB to the list of functioning databases

2012-06-06 Thread Jason Brower
Right now it is a drop in replacement for MySQL so the support is 
there.  Personally though, I think it will support more features so it 
might be good to have it as it's own call for future proofing it.
I met with Monty the creator of MySQL and MariaDB and I think I want to 
give this MariaDB a chance.

BR,
Jason Brower



Re: [web2py] Fluxflex will be shut down and no longer available on June 30, 2012

2012-06-06 Thread Jason Brower

On 06/06/2012 08:35 PM, Andrew wrote:

So where do we go now?
I know the owners of Pagodabox.  They are looking to support python, and 
I think web2py should be involved. :)

BR,
Jason


Re: [web2py] translation from php to python

2012-06-05 Thread Jason Brower

Try using this...
http://docs.python.org/library/md5.html
What that like is doing is making an md5 sum of all those strings 
together to make a special unique key.  Where that is used I have no idea.

BR,
Jason Brower

On 06/05/2012 03:46 PM, Hassan Alnatour wrote:

Dear ALL ,

i need help in translating this php code to python  , i dont 
understand the last line :


?
// TYPE = OTHER OR SHOPPING CART (means fixed account)


$mid = ;  // merchant ID
$appid = ; // application ID
$orderid = ; // merchant's order ID
$app_secrect_key = ; // from the product page
$muid = ; // merchant's user ID
$ordercurr = usd; // merchant's order currency in small letters only
$orderamt = 100;
$orderamt = $orderamt . .00; // merchant's order amount
$ordertext = Product Name;

$msignature =  md5($appid . $orderid . $ordercurr . $orderamt . 
$app_secrect_key);


?


best regards,




[web2py] Add a user only showing logged in user.

2012-06-03 Thread Jason Brower

I have been trying to add a user and all I get is my current user.
I want the form so I am the one creating a new user while logged in.
I started with:
form = auth.register()
With shows my existing profile. And then:
form = crud.create(db.auth_user)
Which seems to do the same thing.
Any way I can do this without a manual form?

BR,
Jason Brower


[web2py] Fwd: Add a user only showing logged in user.

2012-06-03 Thread Jason Brower

Shizzle, ok, dumb typo on my part.  Works fine now.
BR,
Jason

 Original Message 
Subject:Add a user only showing logged in user.
Date:   Mon, 04 Jun 2012 06:35:06 +0300
From:   Jason Brower encomp...@gmail.com
To: web2py@googlegroups.com



I have been trying to add a user and all I get is my current user.
I want the form so I am the one creating a new user while logged in.
I started with:
form = auth.register()
With shows my existing profile. And then:
form = crud.create(db.auth_user)
Which seems to do the same thing.
Any way I can do this without a manual form?

BR,
Jason Brower



[web2py] Data in database as translated...

2012-06-02 Thread Jason Brower

I have some states of an row in the database.
read and unread
There will be more states later.
To do the translations I made this in the the template
{{=T(read)}}
{{=T(unread)}}
{{=T(message.state)}}
Do you see a better way for something like this to happen?
BR,
Jason Brower



[web2py] Thinking of building a bug tracker...

2012-05-31 Thread Jason Brower
I have noticed one other tracker in web2py, but I couldn't demo it. 
Besides that it is cloning, and I wonder if I could just start from 
scratch with a few features.

One in particular is integrating with web2py a bit.
For example, seeing tickets for a particular app and binding the ticket 
to a new bug. Or integration with Hg to close bugs with commits.
The reason I want to build one in web2py is because I don't want to have 
to setup a special environment just for my tracker.  I want to use 
similar deployment recipes to save time.  The bonuses could be the 
integration into web2py and hg.
Other things that might be nice is integration with reported issues from 
customers/users.  It would provide a bug reporting interface that is 
access from clicking on the ticket when not connected locally accessing it.

BR,
Jason



Re: [web2py] cool new wysiwyg editor

2012-05-31 Thread Jason Brower
He just changed it.  I have the one with the other license so I guess I 
will use that for now. I worry he changed it cause I twitted about it. 
:( And no it's not too expensive.

BR,
Jason Brower

On 05/31/2012 05:57 AM, Anthony wrote:

On Wednesday, May 30, 2012 5:16:56 PM UTC-4, Vasile Ermicioi wrote:

about redactorjs

http://redactorjs.com/download/ http://redactorjs.com/download/

You are *free* to use Redactor for your personal or non-profit
website projects.
You can get the author's permission to use Redactor for commercial
websites by paying a fee.


It's not too expensive, though -- only $18.50 USD.

Anthony




Re: [web2py] cool new wysiwyg editor

2012-05-31 Thread Jason Brower
Interesting that I didn't see it somehow.  Actually, I say the gpl, mit 
license.

On 05/31/2012 05:57 AM, Anthony wrote:

On Wednesday, May 30, 2012 5:16:56 PM UTC-4, Vasile Ermicioi wrote:

about redactorjs

http://redactorjs.com/download/ http://redactorjs.com/download/

You are *free* to use Redactor for your personal or non-profit
website projects.
You can get the author's permission to use Redactor for commercial
websites by paying a fee.


It's not too expensive, though -- only $18.50 USD.

Anthony




Re: [web2py] cool new wysiwyg editor

2012-05-31 Thread Jason Brower

Oh, and it's compatible with refrigerators. :P
Says it right in the front page. :O
On 05/31/2012 05:57 AM, Anthony wrote:

On Wednesday, May 30, 2012 5:16:56 PM UTC-4, Vasile Ermicioi wrote:

about redactorjs

http://redactorjs.com/download/ http://redactorjs.com/download/

You are *free* to use Redactor for your personal or non-profit
website projects.
You can get the author's permission to use Redactor for commercial
websites by paying a fee.


It's not too expensive, though -- only $18.50 USD.

Anthony




Re: [web2py] Thinking of building a bug tracker...

2012-05-31 Thread Jason Brower
I agree.  To me an bug and a feature are sent through the same channels, 
especially an application that has matured for some time. Hg integration 
would be nice. I just wonder if there is a standard in what to right for 
those commits. And I rarely use the hg interface in web2py, so I would 
like to avoid the requirement.

BR,
Jason Brower
On 05/31/2012 05:32 PM, Bruce Wade wrote:
I second this idea and would be interested in helping. However I want 
to get git integration more then HG :D


Thinking we should also have a feature request built into this, 
because the CEO constantly asks for new features without realizing we 
already have 100 open features we are still coding.


On Thu, May 31, 2012 at 7:25 AM, Jason Brower encomp...@gmail.com 
mailto:encomp...@gmail.com wrote:


I have noticed one other tracker in web2py, but I couldn't demo
it. Besides that it is cloning, and I wonder if I could just start
from scratch with a few features.
One in particular is integrating with web2py a bit.
For example, seeing tickets for a particular app and binding the
ticket to a new bug. Or integration with Hg to close bugs with
commits.
The reason I want to build one in web2py is because I don't want
to have to setup a special environment just for my tracker.  I
want to use similar deployment recipes to save time.  The bonuses
could be the integration into web2py and hg.
Other things that might be nice is integration with reported
issues from customers/users.  It would provide a bug reporting
interface that is access from clicking on the ticket when not
connected locally accessing it.
BR,
Jason




--
--
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.fittraineronline.com - Fitness Personal Trainers Online
http://www.warplydesigned.com





[web2py] What do you think of this service? Pagodabox

2012-05-31 Thread Jason Brower

They do php deployments, but in a very unique way.
They pull from your git repository to deploy an application.  Do you see 
a demand for something like this in Web2py?  Would it be a feature you 
would want to use?
Personally I would be giddy as a school girl if I could pull an 
svn/hg/git/foo version of an application and have it deployed instantly 
with the ability to pull it to a previous version if needed.  This could 
be done from the admin panel I am sure.
My brother is one of the guys that builds this tool, so I wonder if we 
should put the pressure on them for web2py apps.

---
BR,
Jason Brower


Re: [web2py] Web2py and XMPP

2012-05-30 Thread Jason Brower
Yes, something like that if your wanting to setup a xmpp server. That is 
out side the scope of this conversation.
I would take a deaper looking into that server and see how it works.  
Most likely it's just a headless client and your going to need to use 
web2py to somehow interface with it. When you get to that point I would 
ping the list again. Good luck!

BR,
Jason Brower
On 05/30/2012 12:07 PM, Román Torres wrote:

Thanks for the answer! I think that it is going to be so useful to me.
But I have a doubt... How I create my own server? I mean... The people 
dont have to register in Jabber. They need to register into my server, 
and their JID must be like ro...@myserver.com not ro...@jabber.com.

Can I do that with software like Openfire?

El miércoles, 30 de mayo de 2012 07:06:20 UTC+2, encompass escribió:

Your going to need a service running to recording any incoming
messages.  But this is most likely a good start.
http://xmpppy.sourceforge.net/
I have done similar with other technologies.
BR,
Jason

On 05/30/2012 01:49 AM, Román Torres wrote:
 Hi everybody.

 Im on a big project, and now I need to do a chat on web2py (with
 python and XMPP). I cant find any documentation or reference to
 understand it.

 I need some help to know how I do my own server (without installing
 things like Apache if its possible, because my web2py page is
working
 with Rocket), how to do my own client.

 Can anyone guide me a bit?

 Thanks.





Re: [web2py] Web2py and XMPP

2012-05-30 Thread Jason Brower
I suppose if your boss said you need to do this project with jabber, but 
a simple chatting server could be done without xmpp at all.  So, what is 
it you really are trying to do and go from there.

BR,
Jason
On 05/30/2012 12:07 PM, Román Torres wrote:

Thanks for the answer! I think that it is going to be so useful to me.
But I have a doubt... How I create my own server? I mean... The people 
dont have to register in Jabber. They need to register into my server, 
and their JID must be like ro...@myserver.com not ro...@jabber.com.

Can I do that with software like Openfire?

El miércoles, 30 de mayo de 2012 07:06:20 UTC+2, encompass escribió:

Your going to need a service running to recording any incoming
messages.  But this is most likely a good start.
http://xmpppy.sourceforge.net/
I have done similar with other technologies.
BR,
Jason

On 05/30/2012 01:49 AM, Román Torres wrote:
 Hi everybody.

 Im on a big project, and now I need to do a chat on web2py (with
 python and XMPP). I cant find any documentation or reference to
 understand it.

 I need some help to know how I do my own server (without installing
 things like Apache if its possible, because my web2py page is
working
 with Rocket), how to do my own client.

 Can anyone guide me a bit?

 Thanks.





[web2py] Trying to autocreate users but having trouble...

2012-05-29 Thread Jason Brower

When I try to do this:
if not db(db.auth_user.email == attender.email).select():

db.auth_user.insert(password=db.auth_user.password.validate(password), \

nickname = final_nickname, \
first_name = attender.first_name, \
last_name = attender.last_name, \
email = attender.email, \
company = attender.company, \
bio = attender.organization)
If gives me this in the password field:

|db6ff6dd097fb1d804eabc2b8ecb0d6a|None| 


Which isn't correct.
What am I doing wrong?
BR,
Jason Brower



Re: [web2py] cool new wysiwyg editor

2012-05-29 Thread Jason Brower

Hardy Har
Very true.
BR,
Jason
On 05/29/2012 05:29 AM, Massimo Di Pierro wrote:



On Monday, 28 May 2012 17:51:02 UTC-5, Vasile Ermicioi wrote:

and no font name, font size


That's a plus. It should he handled by css.


I will wait a few  releases until they will conquer the world
http://redactorjs.com/roadmap/ http://redactorjs.com/roadmap/


Why does conquer world come before module for drupal? Must be 
really difficult to make a module for Drupal.




Re: [web2py] Re: Trying to autocreate users but having trouble...

2012-05-29 Thread Jason Brower

Woot.  That did it!  Thanks!
And I never know when to use them or not when moving to a new line. :)
BR,
Jason Brower

On 05/29/2012 04:28 PM, Anthony wrote:


 
db.auth_user.insert(password=db.auth_user.password.validate(password),



Validators (including the password CRYPT() validator) return a tuple 
of (value, error), where error is None if validation passes. So, the 
above should be:


||
db.auth_user.insert(password=db.auth_user.password.validate(password)[0],

That will extract just the hashed value from the returned tuple.

Side note: you don't need all those line continuations (\) inside 
the insert() method parentheses.


Anthony




Re: [web2py] Web2py and XMPP

2012-05-29 Thread Jason Brower
Your going to need a service running to recording any incoming 
messages.  But this is most likely a good start.

http://xmpppy.sourceforge.net/
I have done similar with other technologies.
BR,
Jason

On 05/30/2012 01:49 AM, Román Torres wrote:

Hi everybody.

Im on a big project, and now I need to do a chat on web2py (with 
python and XMPP). I cant find any documentation or reference to 
understand it.


I need some help to know how I do my own server (without installing 
things like Apache if its possible, because my web2py page is working 
with Rocket), how to do my own client.


Can anyone guide me a bit?

Thanks.




[web2py] Migrations not working on Postgres

2012-05-27 Thread Jason Brower
I have my system runing on sqlite at my dev environment, but when I push 
to production which uses postres I get this:



 Ticket ID

80.75.108.196.2012-05-28.05-45-56.74d0c90a-1a1b-4b60-8ba6-c13af5955bbb


   class 'psycopg2.InternalError' current transaction is aborted,
   commands ignored until end of transaction block


 Version

web2py^(TM) (1, 99, 7, datetime.datetime(2012, 3, 4, 22, 12, 8), 'stable')
Python  Python 2.7.2+: /usr/bin/python


 Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.



Traceback(most recent call last):
  File/home/www-data/web2py/gluon/restricted.py,line205,inrestricted
execccodeinenvironment
  File/home/www-data/web2py/applications/welcome/controllers/event_admin.py  
https://interestid.com/admin/default/edit/welcome/controllers/event_admin.py,line321,inmodule
  File/home/www-data/web2py/gluon/globals.py,line173,inlambda
self._caller=lambdaf:f()
  File/home/www-data/web2py/gluon/tools.py,line2575,inf
returnaction(*a, **b)
  File/home/www-data/web2py/applications/welcome/controllers/event_admin.py  
https://interestid.com/admin/default/edit/welcome/controllers/event_admin.py,line127,ininvitations
need_nickname=db(db.auth_user.nickname== (nickname+str(counter))).select()
  File/home/www-data/web2py/gluon/dal.py,line7578,inselect
returnadapter.select(self.query,fields,attributes)
  File/home/www-data/web2py/gluon/dal.py,line1315,inselect
rows=response(sql)
  File/home/www-data/web2py/gluon/dal.py,line1305,inresponse
self.execute(sql)
  File/home/www-data/web2py/gluon/dal.py,line1392,inexecute
return self.log_execute(*a, **b)
  File/home/www-data/web2py/gluon/dal.py,line1386,inlog_execute
ret=self.cursor.execute(*a, **b)
InternalError:current transactionisaborted,commands ignored until end of 
transaction block



 Error snapshot help

|class 'psycopg2.InternalError'(current transaction is aborted, 
commands ignored until end of transaction block )|


inspect attributes




How can I solve this? I think it has something to do with the new table 
I needed to create, but I though most migrations where handle seamlessly.

---
BR,
Jason Brower


Re: [web2py] Development Environments vs Live Environment

2012-05-25 Thread Jason Brower

And I think it's:
if request.is_local:#--- not a method.
con = sqlite://.
else:
con = postgres://...

db = DAL(con)

On 05/23/2012 06:14 PM, Bruno Rocha wrote:

if request.is_local():
con = sqlite://.
else:
con = postgres://...

db = DAL(con)

On Wed, May 23, 2012 at 12:06 PM, Jason Brower encomp...@gmail.com 
mailto:encomp...@gmail.com wrote:


Locally I only want to use SQLite.  And on the deployment I want
to use Postgres.
Is there a way to make this happen automatically?
BR,
Jason Brower




--

Bruno Rocha
[http://rochacbruno.com.br]





Re: [web2py] Re: Trying to create a DAL connection and getting some errors...

2012-05-24 Thread Jason Brower

I made the change and I was able to get the connection.
I noticed the comment in the shell. I was trying to make the connection 
and it was one possible reason why it was not working.

BR,
J
On 05/24/2012 08:53 PM, Massimo Di Pierro wrote:

?

where are you reading that? You can create tables dynamically. Your 
problem is the bug discussed here:


 self.driver = drivers.get('pg8000')

should be

 self.driver = self.drivers.get('pg8000')

This is a known bug fixed in trunk some time ago.

On Wednesday, 23 May 2012 11:14:01 UTC-5, encompass wrote:

And I just noticed the comment here:
Creating new tables dynamically is not allowed.
Isn't this just what I am about to do?
---
BR,
Jason Brower

On 05/23/2012 07:04 PM, Massimo Di Pierro wrote:

This has been fixed in trunk some time ago

 self.driver = drivers.get('pg8000')

should be

 self.driver = self.drivers.get('pg8000')

On Wednesday, 23 May 2012 11:01:59 UTC-5, encompass wrote:

In the console I type this:
db2 =
DAL('postgres://postgres:@localhost:5432/postgres')
And I get this:
In [7] : print hi
hi

In [8] : db2 =
DAL('postgres://postgres:@localhost:5432/postgres')
DEBUG: connect attempt 0, connection error:
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/dal.py, line 5955, in
__init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File /home/www-data/web2py/gluon/dal.py, line 1999, in
__init__
 self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
DEBUG: connect attempt 1, connection error:
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/dal.py, line 5955, in
__init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File /home/www-data/web2py/gluon/dal.py, line 1999, in
__init__
 self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
DEBUG: connect attempt 2, connection error:
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/dal.py, line 5955, in
__init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File /home/www-data/web2py/gluon/dal.py, line 1999, in
__init__
 self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
DEBUG: connect attempt 3, connection error:
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/dal.py, line 5955, in
__init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File /home/www-data/web2py/gluon/dal.py, line 1999, in
__init__
 self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
DEBUG: connect attempt 4, connection error:
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/dal.py, line 5955, in
__init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File /home/www-data/web2py/gluon/dal.py, line 1999, in
__init__
 self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/contrib/shell.py, line
233, in run
 exec compiled in statement_module.__dict__
   File string, line 1, in module
   File /home/www-data/web2py/gluon/dal.py, line 5968, in
__init__
 raise RuntimeError, Failure to connect, tried %d
times:\n%s %
(attempts, tb)
RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/dal.py, line 5955, in
__init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File /home/www-data/web2py/gluon/dal.py, line 1999, in
__init__
 self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'

The server is located locally on an amazon system running
ubuntu.  I
created the postres user and it seems to be open and
connectable.  I
have also created the database postgres.
Any ideas why it wouldn't work?
BR,
Jason Brower







[web2py] Development Environments vs Live Environment

2012-05-23 Thread Jason Brower
Locally I only want to use SQLite.  And on the deployment I want to use 
Postgres.

Is there a way to make this happen automatically?
BR,
Jason Brower


[web2py] Trying to create a DAL connection and getting some errors...

2012-05-23 Thread Jason Brower

In the console I type this:
db2 = DAL('postgres://postgres:@localhost:5432/postgres')
And I get this:
In [7] : print hi
hi

In [8] : db2 = DAL('postgres://postgres:@localhost:5432/postgres')
DEBUG: connect attempt 0, connection error:
Traceback (most recent call last):
  File /home/www-data/web2py/gluon/dal.py, line 5955, in __init__
self._adapter = ADAPTERS[self._dbname](*args)
  File /home/www-data/web2py/gluon/dal.py, line 1999, in __init__
self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
DEBUG: connect attempt 1, connection error:
Traceback (most recent call last):
  File /home/www-data/web2py/gluon/dal.py, line 5955, in __init__
self._adapter = ADAPTERS[self._dbname](*args)
  File /home/www-data/web2py/gluon/dal.py, line 1999, in __init__
self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
DEBUG: connect attempt 2, connection error:
Traceback (most recent call last):
  File /home/www-data/web2py/gluon/dal.py, line 5955, in __init__
self._adapter = ADAPTERS[self._dbname](*args)
  File /home/www-data/web2py/gluon/dal.py, line 1999, in __init__
self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
DEBUG: connect attempt 3, connection error:
Traceback (most recent call last):
  File /home/www-data/web2py/gluon/dal.py, line 5955, in __init__
self._adapter = ADAPTERS[self._dbname](*args)
  File /home/www-data/web2py/gluon/dal.py, line 1999, in __init__
self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
DEBUG: connect attempt 4, connection error:
Traceback (most recent call last):
  File /home/www-data/web2py/gluon/dal.py, line 5955, in __init__
self._adapter = ADAPTERS[self._dbname](*args)
  File /home/www-data/web2py/gluon/dal.py, line 1999, in __init__
self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
Traceback (most recent call last):
  File /home/www-data/web2py/gluon/contrib/shell.py, line 233, in run
exec compiled in statement_module.__dict__
  File string, line 1, in module
  File /home/www-data/web2py/gluon/dal.py, line 5968, in __init__
raise RuntimeError, Failure to connect, tried %d times:\n%s % 
(attempts, tb)

RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
  File /home/www-data/web2py/gluon/dal.py, line 5955, in __init__
self._adapter = ADAPTERS[self._dbname](*args)
  File /home/www-data/web2py/gluon/dal.py, line 1999, in __init__
self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'

The server is located locally on an amazon system running ubuntu.  I 
created the postres user and it seems to be open and connectable.  I 
have also created the database postgres.

Any ideas why it wouldn't work?
BR,
Jason Brower



Re: [web2py] Development Environments vs Live Environment

2012-05-23 Thread Jason Brower

On 05/23/2012 06:40 PM, Anthony wrote:
If you use the built-in Rocket server in development but another 
server (e.g., Apache, Nginx) on production, you could also do:


||
ifrequest.env.server_software.startswith('Rocket'):
con ='sqlite://...'
etc.

Anthony

On Wednesday, May 23, 2012 11:14:18 AM UTC-4, rochacbruno wrote:

if request.is_local():
con = sqlite://.
else:
con = postgres://...

db = DAL(con)

On Wed, May 23, 2012 at 12:06 PM, Jason Brower
encomp...@gmail.com mailto:encomp...@gmail.com wrote:

Locally I only want to use SQLite.  And on the deployment I
want to use Postgres.
Is there a way to make this happen automatically?
BR,
Jason Brower




-- 


Bruno Rocha
[http://rochacbruno.com.br]


Nice points guys.  Thanks.
BR,
Jason


Re: [web2py] Re: Trying to create a DAL connection and getting some errors...

2012-05-23 Thread Jason Brower

And I just noticed the comment here:
Creating new tables dynamically is not allowed.
Isn't this just what I am about to do?
---
BR,
Jason Brower

On 05/23/2012 07:04 PM, Massimo Di Pierro wrote:

This has been fixed in trunk some time ago

 self.driver = drivers.get('pg8000')

should be

 self.driver = self.drivers.get('pg8000')

On Wednesday, 23 May 2012 11:01:59 UTC-5, encompass wrote:

In the console I type this:
db2 = DAL('postgres://postgres:@localhost:5432/postgres')
And I get this:
In [7] : print hi
hi

In [8] : db2 =
DAL('postgres://postgres:@localhost:5432/postgres')
DEBUG: connect attempt 0, connection error:
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/dal.py, line 5955, in __init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File /home/www-data/web2py/gluon/dal.py, line 1999, in __init__
 self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
DEBUG: connect attempt 1, connection error:
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/dal.py, line 5955, in __init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File /home/www-data/web2py/gluon/dal.py, line 1999, in __init__
 self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
DEBUG: connect attempt 2, connection error:
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/dal.py, line 5955, in __init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File /home/www-data/web2py/gluon/dal.py, line 1999, in __init__
 self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
DEBUG: connect attempt 3, connection error:
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/dal.py, line 5955, in __init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File /home/www-data/web2py/gluon/dal.py, line 1999, in __init__
 self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
DEBUG: connect attempt 4, connection error:
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/dal.py, line 5955, in __init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File /home/www-data/web2py/gluon/dal.py, line 1999, in __init__
 self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/contrib/shell.py, line 233,
in run
 exec compiled in statement_module.__dict__
   File string, line 1, in module
   File /home/www-data/web2py/gluon/dal.py, line 5968, in __init__
 raise RuntimeError, Failure to connect, tried %d times:\n%s %
(attempts, tb)
RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
   File /home/www-data/web2py/gluon/dal.py, line 5955, in __init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File /home/www-data/web2py/gluon/dal.py, line 1999, in __init__
 self.driver = drivers.get('pg8000')
AttributeError: 'list' object has no attribute 'get'

The server is located locally on an amazon system running ubuntu.  I
created the postres user and it seems to be open and connectable.  I
have also created the database postgres.
Any ideas why it wouldn't work?
BR,
Jason Brower





[web2py] Problem tranfering to a new database...

2012-05-23 Thread Jason Brower

I now have the database up and running, but when I try to do this:

db.export_to_csv_file(open('/home/www-data/web2py/applications/welcome/uploads/file.csv', 
'wb'))
db2.import_from_csv_file(open('/home/www-data/web2py/applications/welcome/uploads/file.csv', 
'rb'))


It tells me:

Traceback(most recent call last):
  File/home/www-data/web2py/gluon/restricted.py,line205,inrestricted
execccodeinenvironment
  File/home/www-data/web2py/applications/welcome/models/wiki_page.py  
https://interestid.com/admin/default/edit/welcome/models/wiki_page.py,line23,inmodule

db2.import_from_csv_file(open('/home/www-data/web2py/applications/welcome/uploads/file.csv','rb'))
  File/home/www-data/web2py/gluon/dal.py,line6446,inimport_from_csv_file
raiseSyntaxError,'invalid file format'
SyntaxError:invalid file format

I opened the file and it seems to look ok.  Ends with END :)
BR,
Jason


Re: [web2py] Re: Problem tranfering to a new database...

2012-05-23 Thread Jason Brower

Would having an empty table raise this error?

On 05/23/2012 08:14 PM, pbreit wrote:

Apparently choking on this line:

elif not line.startswith('TABLE ') or not line[6:] in 
self.tables:

raise SyntaxError, 'invalid file format'

Does your file look OK when taking this into consideration?

Hard to think linefeeds are the problem but you could try saving the 
file in the various formats (Unix, Windows, Mac).




Re: [web2py] Re: Problem tranfering to a new database...

2012-05-23 Thread Jason Brower
When I emptied my database locally and tried to connect to the server 
remotely I get


ProgrammingError: ('FATAL','28000','no pg_hba.conf entry for host 85.23.56.232, user 
postgres, database postgres, SSL off')

This is because I haven't setup this computer as a connectable host, I 
guess.
Any idea how to connect to it. I am currently researching the 
ph_hba.conf file now to see if I can solve it myself.

BR,
Jason
On 05/24/2012 12:54 AM, pbreit wrote:

It might. Can you try with an empty DB?

On Wednesday, May 23, 2012 10:50:48 AM UTC-7, encompass wrote:

Would having an empty table raise this error?

On 05/23/2012 08:14 PM, pbreit wrote:
 Apparently choking on this line:

 elif not line.startswith('TABLE ') or not line[6:] in
 self.tables:
 raise SyntaxError, 'invalid file format'

 Does your file look OK when taking this into consideration?

 Hard to think linefeeds are the problem but you could try saving
the
 file in the various formats (Unix, Windows, Mac).





Re: [web2py] Re: Problem tranfering to a new database...

2012-05-23 Thread Jason Brower
I got the connection to work.  However, it's now throwing the same error 
as before. Dang.

This is on a blank database to csv. Attached...
On 05/24/2012 12:54 AM, pbreit wrote:

It might. Can you try with an empty DB?

On Wednesday, May 23, 2012 10:50:48 AM UTC-7, encompass wrote:

Would having an empty table raise this error?

On 05/23/2012 08:14 PM, pbreit wrote:
 Apparently choking on this line:

 elif not line.startswith('TABLE ') or not line[6:] in
 self.tables:
 raise SyntaxError, 'invalid file format'

 Does your file look OK when taking this into consideration?

 Hard to think linefeeds are the problem but you could try saving
the
 file in the various formats (Unix, Windows, Mac).



TABLE auth_user


TABLE auth_group


TABLE auth_membership


TABLE auth_permission


TABLE auth_event


TABLE auth_cas


TABLE event


TABLE floor_plan


TABLE advertisement


TABLE advertisement_action


TABLE advertiser_credit


TABLE attachment


TABLE attender_appointment


TABLE booth


TABLE event_attender


TABLE event_connection


TABLE event_sponsor


TABLE happening


TABLE happening_attender


TABLE iid_mail


TABLE invitation


TABLE outbox


TABLE tag


TABLE tag_advertisement


TABLE tag_link


TABLE wiki_page


END

Re: [web2py] Re: Problem tranfering to a new database...

2012-05-23 Thread Jason Brower
I was looking at dal.py and it seems to me, that it wants all the tables 
first in my DAL object, and will not create them.  Just import them and 
if they don't exist it throws an error. It will take some time to create 
the database here but let's see if this fixes the problem.  If so, a 
better error message for this issue could be created.

BR,
Jason

On 05/24/2012 07:15 AM, Jason Brower wrote:
I got the connection to work.  However, it's now throwing the same 
error as before. Dang.

This is on a blank database to csv. Attached...
On 05/24/2012 12:54 AM, pbreit wrote:

It might. Can you try with an empty DB?

On Wednesday, May 23, 2012 10:50:48 AM UTC-7, encompass wrote:

Would having an empty table raise this error?

On 05/23/2012 08:14 PM, pbreit wrote:
 Apparently choking on this line:

 elif not line.startswith('TABLE ') or not line[6:] in
 self.tables:
 raise SyntaxError, 'invalid file format'

 Does your file look OK when taking this into consideration?

 Hard to think linefeeds are the problem but you could try
saving the
 file in the various formats (Unix, Windows, Mac).







[web2py] SQL syntax error when trying to create db...

2012-05-23 Thread Jason Brower

I get this:

  
File/home/jason/Desktop/InterestID_4/Development_Environment/gluon/dal.py,line1386,inlog_execute
ret=self.cursor.execute(*a, **b)
ProgrammingError:syntax error atornearuser
LINE4:user INTEGER REFERENCES auth_user(id)ON  DELETE CASCADE,


When web2py tries creating it's mode in this file:

# -*- coding: utf-8 -*-
db.define_table('attender_appointment',
Field  http://127.0.0.1:8000/examples/global/vars/Field('event',db.event,label=T  
http://127.0.0.1:8000/examples/global/vars/T(Event)),
Field  
http://127.0.0.1:8000/examples/global/vars/Field('user',db.auth_user,label=T  
http://127.0.0.1:8000/examples/global/vars/T(Creator)),
Field  http://127.0.0.1:8000/examples/global/vars/Field('pos_x','integer',label=T 
 http://127.0.0.1:8000/examples/global/vars/T(X Position)),
Field  http://127.0.0.1:8000/examples/global/vars/Field('pos_y','integer',label=T 
 http://127.0.0.1:8000/examples/global/vars/T(Y Position)),
Field  
http://127.0.0.1:8000/examples/global/vars/Field('floor_plan',db.floor_plan,label=T  
http://127.0.0.1:8000/examples/global/vars/T(Floor Plan)),
Field  http://127.0.0.1:8000/examples/global/vars/Field('title','string',label=T  
http://127.0.0.1:8000/examples/global/vars/T(Title)),
Field  http://127.0.0.1:8000/examples/global/vars/Field('details','text',label=T  
http://127.0.0.1:8000/examples/global/vars/T(Details)),
Field  
http://127.0.0.1:8000/examples/global/vars/Field('start_time','datetime',label=T  
http://127.0.0.1:8000/examples/global/vars/T(Start Time)),
Field  
http://127.0.0.1:8000/examples/global/vars/Field('end_time','datetime',label=T  
http://127.0.0.1:8000/examples/global/vars/T(End Time)),
Field  
http://127.0.0.1:8000/examples/global/vars/Field('with_who',db.auth_user,label=T  
http://127.0.0.1:8000/examples/global/vars/T(Guest))
)

db.attender_appointment.title.requires=IS_NOT_EMPTY  
http://127.0.0.1:8000/examples/global/vars/IS_NOT_EMPTY()
db.attender_appointment.start_time.requires=IS_NOT_EMPTY  
http://127.0.0.1:8000/examples/global/vars/IS_NOT_EMPTY()
db.attender_appointment.event.requires=IS_IN_DB  
http://127.0.0.1:8000/examples/global/vars/IS_IN_DB(db,db.event.id,'%(name)s')
db.attender_appointment.floor_plan.requires=IS_IN_DB  
http://127.0.0.1:8000/examples/global/vars/IS_IN_DB(db,db.floor_plan.id,'%(name)s')
db.attender_appointment.user.requires=IS_IN_DB  
http://127.0.0.1:8000/examples/global/vars/IS_IN_DB(db,db.auth_user.id,'%(nickname)s')
db.attender_appointment.with_who.requires=IS_IN_DB  
http://127.0.0.1:8000/examples/global/vars/IS_IN_DB(db,db.auth_user.id,'%(nickname)s')
db.attender_appointment.details.widget=lambdafield,value:\
SQLFORM  
http://127.0.0.1:8000/examples/global/vars/SQLFORM.widgets.text.widget(field,value,_class='text
 nicedit',_style=color:red)



This is not the first one in the system to be created so it seems to 
work for many other objects.  I wonder if there is a reserved word or 
something that is cause the problem.

Any ideas why this would happen?
BR,
Jason


Re: [web2py] Error on importing twisted

2012-05-22 Thread Jason Brower
I wonder if reactor is a reserved word in web2py.  Could you try giving 
it a different namespace?

from twisted import reactor as another_reactor

On 05/23/2012 06:07 AM, Hugh Barker wrote:

Hi,
I need to run some code that uses the Twisted library from within 
web2py (listening to multicast events on the network, parsing the data 
and then inserting it into the web2pt DB for integration into a webapp).


I get the following error upon importing Twisted. In the interests 
of reproducibility, I added


from twisted.internet import reactor

to the first line of the default.py controller in the welcome app. 
This is enough to trigger the bug:


Traceback(most recent call last):
   File/var/www/web2py/gluon/restricted.py,line204,inrestricted
 execccodeinenvironment
   File/var/www/web2py/applications/welcome/controllers/default.py  
https://ss-geospatial-hf/admin/default/edit/welcome/controllers/default.py,line1,inmodule
 fromtwisted.internetimportreactor
   File/var/www/web2py/gluon/custom_import.py,line293,in__call__
 fromlist,level)
   File/var/www/web2py/gluon/custom_import.py,line78,in__call__
 level)
   
File/usr/lib/python2.7/dist-packages/twisted/internet/reactor.py,line37,inmodule
 fromtwisted.internetimportdefault
   File/var/www/web2py/gluon/custom_import.py,line271,in__call__
 globals.get(__file__,))
   File/usr/lib/python2.7/posixpath.py,line66,injoin
 ifb.startswith('/'):
AttributeError:'NoneType'object has no attribute'startswith'
Ubuntu 12.04, Python 2.7.3, Twisted 12.0, web2py 1.99.4

There's nothing wrong with my twisted install - running the code I want to run 
within the web2py context as a standalone script works fine.

Any help much appreciated.

Cheers,
Hugh.




Re: [web2py] Routing stuff in apache instead of web2py

2012-05-21 Thread Jason Brower

How... How does it work?
http://www.youtube.com/watch?v=xOrgLj9lOwk
I haven't a clue how to check for that. :/
BR,
Jason
On 05/21/2012 04:05 PM, Jonathan Lundell wrote:

On May 20, 2012, at 10:36 PM, Jason Brower wrote:

A suppose it would be a little off topic, but I need it for my web2py 
application.
The book tells me I shouldn't use routes in web2py and use apache.
I have mod_proxy install, as I used the setup-web2py-ubuntu.sh script and it 
seems to have works perfects.
I have the program installed and running at http://example.com/interestid/.  
When you go there it works perfectly.
But I would like a little more quality and put it here...
http://example.com
An hints on how to get that to work; or better a play-by-play. (I can program 
all day, but apache freaks me right out!)

Go ahead and use web2py routing for your active URLs—the ones that invoke 
web2py code. The main thing for server (eg Apache) routing is to directly serve 
static assets. IIRC, the setup script you used should already be doing that, 
but you might want to confirm it.




Re: [web2py] Routing stuff in apache instead of web2py

2012-05-21 Thread Jason Brower
Fantastic!  I looked and on the dynamic parts it shows the powered by 
tag and on the other parts it doesn't so it clearly is using the other 
service, apache.  Thanks!

BR,
Jason

On 05/21/2012 08:04 PM, Anthony wrote:


How to test? What I do is to use curl -I to look at the http
response headers; you could presumably use any browser that lets
you see the headers. There should be a difference between the
headers for a static file response depending on whether the above
section is in the configuration file.


Yes, one difference you'll see in the headers is that any request 
served by web2py will include an X-Powered-By response header set to 
web2py. You should be able to see this using the developer tools in 
any browser.


Anthony




Re: [web2py] Re: 75€ BOUNTY - Massively Complicated Query Required

2012-05-20 Thread Jason Brower
It is not totally implemented or verified at this point.  But so far it 
seems to be working.  I will post the answer later along with a special 
module I also made that uses this method.  I think you guys will like it.

BR,
Jason Brower

On 05/18/2012 09:15 PM, Carlos Costa wrote:

The answer?

2012/5/18 Jason Brower encomp...@gmail.com mailto:encomp...@gmail.com

This bounty has, thankfully, been solved.  Thank you to all those
that have participated!  It has saved me so much time!
BR,
Jason Brower


On 05/17/2012 07:28 PM, Jason Brower wrote:

I have the event management tool I have been working on for 2
years now and I have made some changes to the code that require
my most complicated query to be rebuilt.
After thinking about it for several hours I figure I should throw
it at you guys to see what you can come up with.
The winner of this query will get 75€ with paypal or other means
after I have it implemented it in the code.
I have the following model:
model_diagram.png
event_attender.py
tag.py
tag_link.py
Description:
I am building a list of connections based on relevance by tag.
Tags have two states, looking for and attribute.
Users attach themselves to these tags with the two attributes.
I am looking for someone with this tag.
and/or
This tag is something about me that I want to offer.

Now when they do this a list of users will show on the screen.
ID  NicknameTags your looking for that they haveYour Relevance
Tags they are looking for that you have Their Relevance 
Total
Relevance   Image   city
101 encompass   Tag1, Tag2, Tag43   Tag4, Tag5, Tag 
6   3   10
http:// Oulu
102 encompass   Tag1, Tag2, Tag43   Tag4, Tag 6 
3   8
http:// Oulu
150 encompass   Tag1, Tag2, Tag43   Tag 6   3   
7
http:// Helsinki


This is build with the following:
UserA is the user logged in using the system
If another user has a tag that UserA is looking for, then
relevance is +2 to UserA
If another user is looking for something UserA has, then
relevance is +1 to UserA
If another user lives in the same city as UserA and has something
they are looking for or something to offer then relevance is +1
Does this make sense? I just need to query that will happen.  I
can handle the view just fine. Feel free to comment or ask questions.
If you can think of a good way to connect people better with the
data in the model diagram attached do tell.  I will give you
another 25€ for that implementation as well. :)
---
BR,
Jason Brower





--
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן






[web2py] Routing stuff in apache instead of web2py

2012-05-20 Thread Jason Brower
A suppose it would be a little off topic, but I need it for my web2py 
application.

The book tells me I shouldn't use routes in web2py and use apache.
I have mod_proxy install, as I used the setup-web2py-ubuntu.sh script 
and it seems to have works perfects.
I have the program installed and running at 
http://example.com/interestid/.  When you go there it works perfectly.

But I would like a little more quality and put it here...
http://example.com
An hints on how to get that to work; or better a play-by-play. (I can 
program all day, but apache freaks me right out!)

---
Best Regards,
Jason Brower


[web2py] Web2py.com is down. :(

2012-05-18 Thread Jason Brower

Darn.  When I needed it most. :(
BR,
Jason


[web2py] Re: 75€ BOUNTY - Massively Complicated Query Required

2012-05-18 Thread Jason Brower
This bounty has, thankfully, been solved.  Thank you to all those that 
have participated!  It has saved me so much time!

BR,
Jason Brower

On 05/17/2012 07:28 PM, Jason Brower wrote:
I have the event management tool I have been working on for 2 years 
now and I have made some changes to the code that require my most 
complicated query to be rebuilt.
After thinking about it for several hours I figure I should throw it 
at you guys to see what you can come up with.
The winner of this query will get 75€ with paypal or other means after 
I have it implemented it in the code.

I have the following model:
model_diagram.png
event_attender.py
tag.py
tag_link.py
Description:
I am building a list of connections based on relevance by tag.
Tags have two states, looking for and attribute.
Users attach themselves to these tags with the two attributes.
I am looking for someone with this tag.
and/or
This tag is something about me that I want to offer.

Now when they do this a list of users will show on the screen.
ID  NicknameTags your looking for that they haveYour Relevance
	Tags they are looking for that you have 	Their Relevance 	Total 
Relevance 	Image 	city

101 encompass   Tag1, Tag2, Tag43   Tag4, Tag5, Tag 6   
3   10
http:// Oulu
102 encompass   Tag1, Tag2, Tag43   Tag4, Tag 6 3   
8
http:// Oulu
150 encompass   Tag1, Tag2, Tag43   Tag 6   3   7
http:// Helsinki


This is build with the following:
UserA is the user logged in using the system
If another user has a tag that UserA is looking for, then relevance is 
+2 to UserA
If another user is looking for something UserA has, then relevance is 
+1 to UserA
If another user lives in the same city as UserA and has something they 
are looking for or something to offer then relevance is +1
Does this make sense? I just need to query that will happen.  I can 
handle the view just fine. Feel free to comment or ask questions.
If you can think of a good way to connect people better with the data 
in the model diagram attached do tell.  I will give you another 25€ 
for that implementation as well. :)

---
BR,
Jason Brower




Re: [web2py] 75€ BOUNTY - Massively Complicated Query Required

2012-05-17 Thread Jason Brower

It is a many-to-many but it can link to multiple tables.
event is the event that a user can attend
table_link is the ID that is used in a particular table.
tag is the tag.id that this row is linking to.
intent is as described before.
tag_type is the table that the system will link to.
Notice there is a booth, auth_user, and happening table.  All of those 
support tags and instead of needing to create a table for each one, I 
combined them. Aslo comes in handy in other ways too. Like if I want to 
create tag relations on other parts of my database.  I could even create 
tag relations on tags or other tag relations.  Very powerful.

br,
Jason
On 05/17/2012 08:32 PM, Marin Pranjic' wrote:

I am not sure if I understand your model. Can you explain tag_link ?

Marin


On Thu, May 17, 2012 at 6:28 PM, Jason Brower encomp...@gmail.com 
mailto:encomp...@gmail.com wrote:


I have the event management tool I have been working on for 2
years now and I have made some changes to the code that require my
most complicated query to be rebuilt.
After thinking about it for several hours I figure I should throw
it at you guys to see what you can come up with.
The winner of this query will get 75€ with paypal or other means
after I have it implemented it in the code.
I have the following model:
model_diagram.png
event_attender.py
tag.py
tag_link.py
Description:
I am building a list of connections based on relevance by tag.
Tags have two states, looking for and attribute.
Users attach themselves to these tags with the two attributes.
I am looking for someone with this tag.
and/or
This tag is something about me that I want to offer.

Now when they do this a list of users will show on the screen.
ID  NicknameTags your looking for that they haveYour Relevance
Tags they are looking for that you have Their Relevance 
Total
Relevance   Image   city
101 encompass   Tag1, Tag2, Tag43   Tag4, Tag5, Tag 
6   3   10
http:// Oulu
102 encompass   Tag1, Tag2, Tag43   Tag4, Tag 6 
3   8
http:// Oulu
150 encompass   Tag1, Tag2, Tag43   Tag 6   3   
7
http:// Helsinki


This is build with the following:
UserA is the user logged in using the system
If another user has a tag that UserA is looking for, then
relevance is +2 to UserA
If another user is looking for something UserA has, then relevance
is +1 to UserA
If another user lives in the same city as UserA and has something
they are looking for or something to offer then relevance is +1
Does this make sense? I just need to query that will happen.  I
can handle the view just fine. Feel free to comment or ask questions.
If you can think of a good way to connect people better with the
data in the model diagram attached do tell.  I will give you
another 25€ for that implementation as well. :)
---
BR,
Jason Brower






Re: [web2py] Re: 75€ BOUNTY - Massively Complicated Query Required

2012-05-17 Thread Jason Brower
For the third one this is to further show the relevance of a user 
because they are living near you, but they should be someone that at 
least has something in common with you.

BR,
Jason Brower

On 05/17/2012 09:22 PM, Andrew wrote:
If another user has a tag that UserA is looking for, then relevance is 
+2 to UserA
If another user is looking for something UserA has, then relevance is 
+1 to UserA
If another user lives in the same city as UserA and has something they 
are looking for or something to offer then relevance is +1


So, is the third similar to the first, but with a city clause.   
Sounds like it's a +2 if you have something UserA is looking for, but 
it's only +1 if you live in the same city ?


Andrew W



On Friday, May 18, 2012 4:28:02 AM UTC+12, encompass wrote:

I have the event management tool I have been working on for 2
years now and I have made some changes to the code that require my
most complicated query to be rebuilt.
After thinking about it for several hours I figure I should throw
it at you guys to see what you can come up with.
The winner of this query will get 75� with paypal or other means
after I have it implemented it in the code.
I have the following model:
model_diagram.png
event_attender.py
tag.py
tag_link.py
Description:
I am building a list of connections based on relevance by tag.
Tags have two states, looking for and attribute.
Users attach themselves to these tags with the two attributes.
I am looking for someone with this tag.
and/or
This tag is something about me that I want to offer.

Now when they do this a list of users will show on the screen.
ID  NicknameTags your looking for that they haveYour Relevance
Tags they are looking for that you have Their Relevance 
Total
Relevance   Image   city
101 encompass   Tag1, Tag2, Tag43   Tag4, Tag5, Tag 
6   3   10
http:// Oulu
102 encompass   Tag1, Tag2, Tag43   Tag4, Tag 6 
3   8
http:// Oulu
150 encompass   Tag1, Tag2, Tag43   Tag 6   3   
7
http:// Helsinki


This is build with the following:
UserA is the user logged in using the system
If another user has a tag that UserA is looking for, then
relevance is +2 to UserA
If another user is looking for something UserA has, then relevance
is +1 to UserA
If another user lives in the same city as UserA and has something
they are looking for or something to offer then relevance is +1
Does this make sense? I just need to query that will happen.� I
can handle the view just fine. Feel free to comment or ask questions.
If you can think of a good way to connect people better with the
data in the model diagram attached do tell.� I will give you
another 25� for that implementation as well. :)
---
BR,
Jason Brower





Re: [web2py] Re: 75€ BOUNTY - Massively Complicated Query Required

2012-05-17 Thread Jason Brower

On 05/17/2012 09:29 PM, Andrew wrote:
So, is the third similar to the first, but with a city clause.   
Sounds like it's a +2 if you have something UserA is looking for, but 
it's only +1 if you live in the same city ?


Oh, I see from your example that it is an _additional_ +1 if you are 
in the same city.   Got it.

Yes, that is correct.
BR,
Jason Brower



Re: [web2py] Re: 75€ BOUNTY - Massively Complicated Query Required

2012-05-17 Thread Jason Brower
The relevance columns are vital as I need to know how strong the 
relation is to UserA.

It's used in a tag cloud module that I have built.
BR,
Jason

On 05/17/2012 09:30 PM, Carlos Costa wrote:

I found a way quite simple but It does not include the Relevance columns.

2012/5/17 Andrew awillima...@gmail.com mailto:awillima...@gmail.com

If another user has a tag that UserA is looking for, then
relevance is +2 to UserA
If another user is looking for something UserA has, then relevance
is +1 to UserA
If another user lives in the same city as UserA and has something
they are looking for or something to offer then relevance is +1

So, is the third similar to the first, but with a city clause.  
Sounds like it's a +2 if you have something UserA is looking for,

but it's only +1 if you live in the same city ?

Andrew W



On Friday, May 18, 2012 4:28:02 AM UTC+12, encompass wrote:

I have the event management tool I have been working on for 2
years now and I have made some changes to the code that
require my most complicated query to be rebuilt.
After thinking about it for several hours I figure I should
throw it at you guys to see what you can come up with.
The winner of this query will get 75� with paypal or other
means after I have it implemented it in the code.

I have the following model:
model_diagram.png
event_attender.py
tag.py
tag_link.py
Description:
I am building a list of connections based on relevance by tag.
Tags have two states, looking for and attribute.
Users attach themselves to these tags with the two attributes.
I am looking for someone with this tag.
and/or
This tag is something about me that I want to offer.

Now when they do this a list of users will show on the screen.
ID  NicknameTags your looking for that they haveYour 
Relevance
Tags they are looking for that you have Their Relevance
Total Relevance Image   city
101 encompass   Tag1, Tag2, Tag43   Tag4, Tag5, Tag 
6   3   10
http:// Oulu
102 encompass   Tag1, Tag2, Tag43   Tag4, Tag 6 
3   8
http:// Oulu
150 encompass   Tag1, Tag2, Tag43   Tag 6   3   
7
http:// Helsinki


This is build with the following:
UserA is the user logged in using the system
If another user has a tag that UserA is looking for, then
relevance is +2 to UserA
If another user is looking for something UserA has, then
relevance is +1 to UserA
If another user lives in the same city as UserA and has
something they are looking for or something to offer then
relevance is +1
Does this make sense? I just need to query that will
happen.� I can handle the view just fine. Feel free to
comment or ask questions.
If you can think of a good way to connect people better with
the data in the model diagram attached do tell.� I will give
you another 25� for that implementation as well. :)
---
BR,
Jason Brower




--
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן






Re: [web2py] 75€ BOUNTY - Massively Complicated Query Required

2012-05-17 Thread Jason Brower

Yes, it can be redundant. Ignore it if you like.
BR,
Jason
On 05/17/2012 10:32 PM, Marin Pranjić wrote:
and why both tag and tag_link have an event.id http://event.id 
field? is this redundant?


On Thu, May 17, 2012 at 7:56 PM, Jason Brower encomp...@gmail.com 
mailto:encomp...@gmail.com wrote:


It is a many-to-many but it can link to multiple tables.
event is the event that a user can attend
table_link is the ID that is used in a particular table.
tag is the tag.id http://tag.id that this row is linking to.
intent is as described before.
tag_type is the table that the system will link to.
Notice there is a booth, auth_user, and happening table.  All of
those support tags and instead of needing to create a table for
each one, I combined them. Aslo comes in handy in other ways too.
Like if I want to create tag relations on other parts of my
database.  I could even create tag relations on tags or other tag
relations.  Very powerful.
br,
Jason

On 05/17/2012 08:32 PM, Marin Pranjić wrote:

I am not sure if I understand your model. Can you explain
tag_link ?

Marin


On Thu, May 17, 2012 at 6:28 PM, Jason Brower
encomp...@gmail.com mailto:encomp...@gmail.com wrote:

I have the event management tool I have been working on for 2
years now and I have made some changes to the code that
require my most complicated query to be rebuilt.
After thinking about it for several hours I figure I should
throw it at you guys to see what you can come up with.
The winner of this query will get 75€ with paypal or other
means after I have it implemented it in the code.
I have the following model:
model_diagram.png
event_attender.py
tag.py
tag_link.py
Description:
I am building a list of connections based on relevance by tag.
Tags have two states, looking for and attribute.
Users attach themselves to these tags with the two attributes.
I am looking for someone with this tag.
and/or
This tag is something about me that I want to offer.

Now when they do this a list of users will show on the screen.
ID  NicknameTags your looking for that they haveYour
Relevance
Tags they are looking for that you have Their Relevance
Total Relevance Image   city
101 encompass   Tag1, Tag2, Tag43   Tag4, Tag5, Tag 
6   3   10
http:// Oulu
102 encompass   Tag1, Tag2, Tag43   Tag4, Tag 6 
3   8
http:// Oulu
150 encompass   Tag1, Tag2, Tag43   Tag 6   3   
7
http:// Helsinki


This is build with the following:
UserA is the user logged in using the system
If another user has a tag that UserA is looking for, then
relevance is +2 to UserA
If another user is looking for something UserA has, then
relevance is +1 to UserA
If another user lives in the same city as UserA and has
something they are looking for or something to offer then
relevance is +1
Does this make sense? I just need to query that will happen. 
I can handle the view just fine. Feel free to comment or ask

questions.
If you can think of a good way to connect people better with
the data in the model diagram attached do tell.  I will give
you another 25€ for that implementation as well. :)
---
BR,
Jason Brower









Re: [web2py] web2py free cookbook raffle

2012-05-17 Thread Jason Brower

On 05/18/2012 06:41 AM, Massimo Di Pierro wrote:

http://web2py.com/cookbook

Woot, thanks!


[web2py] Custom form with default values...

2012-05-16 Thread Jason Brower

Many values I don't need to show in the view so I have done this:
def join():
'''
NOTES:Covers the event bio and any payments if needed.
'''
event_details = db.event[request.args(0)]
if not event_details:
redirect(URL('default', 'index'))
attender_count = db(db.event_attender.event == request.args(0)).count()
event_full = attender_count = event_details.maximum_attendance
payment_needed = event_details.ticket_cost
db.event_attender.event.default = request.args(0)
bio_form = crud.create(db.event_attender)
return dict(event_full = event_full,
payment_needed = payment_needed,
event_details = event_details,
bio_form = bio_form)

With this in the view:
div
{{=bio_form.custom.begin}}
Show Attendance: {{=bio_form.custom.widget.show_attendance}}
{{=bio_form.custom.widget.bio_text}}
{{=bio_form.custom.submit}}
{{=bio_form.custom.end}}/div
If I print the form with {{=bio_form}} it works just fine, but I see all 
the extra data fields.

Is there a way to fix this?
For a golden star I have the model as follows:
# -*- coding: utf-8 -*-
db.define_table('event_attender',
Field('attender', db.auth_user),
Field('event', db.event),
Field('role', 'string', default=attender),
Field('status', 'string', default=not_present),
Field('show_attendance', 'boolean', default=True),
Field('bio_text', 'text'),
Field('QR_quick_connect', 'string')
)

db.event_attender.role.requires = IS_IN_SET([attender, 'admin', 
'organizer', 'speaker', 'booth'])
db.event_attender.status.requires = IS_IN_SET([present, 'not_present', 
'banned'])
db.event_attender.attender.requires = 
IS_IN_DB(db,db.auth_user.id,'%(nickname)s')

db.event_attender.event.requires = IS_IN_DB(db,db.event.id,'%(name)s')
db.event_attender.bio_text.widget = lambda field,value: \
SQLFORM.widgets.text.widget(field,value,_class='text nicedit', 
_style=color:red)

if auth.is_logged_in():
db.event_attender.attender.default = auth.user.id

Best Regards,
Jason Brower


[web2py] Sending files to a controller and nicedit in the view.

2012-05-10 Thread Jason Brower
Is there a way I can build a form on one controller.  Then send data to 
it including a file and various other things

And then save that information to a database?
Sounds simple right?
I want to do it dynamically with my nicEdit integration.  That is, I do 
something just like this...

http://www.rkblog.rk.edu.pl/w/p/niceditor-django/#2
But in Web2py.
I think this is the best approach but I want your opinion:
1. Create a form in a page. get_file for example
2. Create another page that has the nicEdit form.
3. When the nicEdit pushes an image to the site it goes to get_file.

Is this correct? I think I can't do this with default settings as there 
is something stoping CSRF attacks, right?

BR,
Jason


[web2py] Confused as I thought this would crash...

2011-09-23 Thread Jason Brower

I thought I needed a join to print .name here...
def create_connections():
#get all the user's tags for the about me
attribute = db((db.users_tags.event == session.current_event)  
(db.users_tags.intent == attribute))._select(db.users_tags.tag)

#get all the user's tags for the looking for
looking_for = db((db.users_tags.event == session.current_event)  
(db.users_tags.intent == looking)  (db.users_tags.user == 
db.auth_user.id))._select(db.users_tags.tag)
interesting_users = db((db.auth_user.id == db.users_tags.user)  
(db.users_tags.event == session.current_event)  (db.users_tags.user != 
auth.user_id)  (db.users_tags.intent == attribute)  
(db.users_tags.tag.belongs(looking_for))).select()

print interesting_users
for item in interesting_users:
print item.auth_user.nickname
print item.users_tags.event.name
Is this some new feature or is it like django where it is lazy and 
creates another query from that line.

BR,
Jason Brower



[web2py] Get rid of a label in web2py SQLFORM

2011-08-24 Thread Jason Brower

I have a label I want to get ride of but this doesn't work...
Field('email', 'string', label=None),
no this...
Field('email', 'string', label=),
Any other ideas?
--
BR,
Jason Brower


[web2py] No spaces... now that would be nice...

2011-08-17 Thread Jason Brower

There a quite a few templating features that are nice in django,
{% spaceless %}
p
a href=foo/Foo/a
/p
{% endspaceless %}
This is particular is vital for many sites where spaces are important.  
For example in a menu there are spaces that push items around and you 
can't do anything but remove the spaces.

Would/Could this be a good feature in Web2py?


[web2py] Generic View is not loading...

2011-08-07 Thread Jason Brower

I just realised my generic view is not loading. I get:


 invalid view (default/events.html)


When I get rid of events.html in the default folder.
I do have the original generic.html but it still doesn't work.  Any 
reasons why this would happen?

BR,
Jason Brower



  1   2   3   4   5   6   7   8   >