[web2py] Re: Make an image Thumb

2011-11-20 Thread Web2Py Freak
Dear All,
How can i install the PIL to my project  i tried pbreit code but i
didn't get i thumb i think maybe because am not using PIL in the
correct way , i just Downloaded the PIL in source and copied it to the
modules folder , how can i do it ??



Best regards,
Hassan alnator


Re: [web2py] Re: Custom name for uploaded file

2011-11-20 Thread Miroslav Gojic
Thanks Anthony, upload it's work

Now I have some questions:
Can I use form.formstyle = 'divs' on form created with SQLFORM.factory or
some other methods to get div tag instead table

what is difference between:
if form.process().accepted:
and
if form.accepts(request,session):


If I have two variables (var1 and var2)
var1 = Object
var2 = cStringIO.StrindO 0x1234

Before your example I was stack with
file.write(var1)
or
file.write(var2)
write() - can write only string // this was error message

how I can get string value from var1=Object or var2=cStringIO.StrindO
on net I find that I need to do serialization
on python that is pickle (if I am not wrong)

On var1 or var2 actually is file what I need to upload
but I don't need to get values from file in string I need file from var1 or
var2 send or save or write to folder
in os I look on os.save() but I'm not shoure is that good way

if I have file in some variable how I can that file save to folder?


- - Miroslav Gojic - -


On Sat, Nov 19, 2011 at 22:36, Anthony  wrote:

> Something like this:
>
> def upload():
> import os
> uploadfolder=os.path.join(request.folder, 'uploads')
> form = SQLFORM.factory(
> Field('file', 'upload', uploadfolder=uploadfolder),
> Field('new_name'))
> if form.process().accepted:
> os.rename(os.path.join(uploadfolder, form.vars.file),
> os.path.join(uploadfolder, form.vars.new_name))
> return dict(form=form)
>
> The above uses SQLFORM.factory, though you could also do it using FORM.
> Rather than handling the upload completely manually, this code allows
> web2py to use its usual upload mechanism and automatic file naming, and
> then it simply renames the uploaded file to the name you want (this code
> allows you to enter the new filename in the form itself, though you could
> use some other mechanism for generating the name).
>
> Note, because you're not storing the filename in a db table and not using
> the standard naming scheme, you won't be able to use the
> response.download() method for downloading, though it sounds like you don't
> need to. Instead, you can use response.stream() if necessary.
>
> Anthony
>
>
>
> On Saturday, November 19, 2011 2:14:26 PM UTC-5, miroslavgojic wrote:
>
>> Can I get full example for upload function?
>>
>> This is maybe simply but after one day I don'n have any success.
>>
>> - - Miroslav Gojic - -
>>
>> On Sat, Nov 19, 2011 at 19:24, Anthony  wrote:
>>
>>> Don't put the form.accepts inside the 'if request.vars' block -- it
>>> needs to run even on form creation (to generate the hidden formname and
>>> formkey fields).
>>>
>>>
>>> On Saturday, November 19, 2011 12:44:31 PM UTC-5, miroslavgojic wrote:
>>>
 Now I have in controller:
 def upload():
 form = FORM("Upload
 file:",INPUT(_type='file',_**nam**e='myfile'),INPUT(_type='**submi**
 t',_name='submit',_value=**'**Submit'))
 if request.vars:
 if form.accepts(request,session):
 my_file = request.vars.myfile.file
 my_filename = request.vars.myfile.filename
 filepath = os.path.join(request.folder, 'uploads') // this
 path work - it is absolute path in hard drive
 fp =open(filepath.my_filename,'**wb**')
 fp.write(my_file)
 fp.close()
 return dict(form=form)

 request.vars.myfile -> make return on stored object
 request.vars.myfile.file -> make return address of stored object

 I understood what you told me, and logical check on conditions, but
 how to put everything in one function.

 the pseudo algorithm in my head is next:

 make def func():
 make form = FORM(...)
 check if condition existing
 make file = request.vars.myfile.file
 make filename = request.vars.myfile.filename
 make filepath = os.path.join(...)
 make write file to filepath filename
 go to page and show empty form - wait for new file
 else:
 just show empty form without submission
 return form

 but I just loss my mind after 24 ours of trying this or similar
 uploads.

 Miroslav

 On Nov 19, 6:12 pm, Anthony  wrote:
 > You can tell if the function is being called with a form submission by
 > checking for request.vars:
 >
 > if request.vars:
 > print 'this is a form submission'
 >
 >
 >
 >
 >
 >
 >
 > On Saturday, November 19, 2011 12:06:40 PM UTC-5, miroslavgojic wrote:
 >
 > > The error is caused when file is not selected.
 > > By default on first run form is empty (file is not selected), and
 form
 > > must wait for selecting and submitting.
 >
 > > How access to file before calling form? What that mean?
 >
 > > Miroslav
 >
 > > On Nov 19, 5:52 pm, Anthony  wrote:
 > > > You might need to access the file before calling for

[web2py] Re: Create a simple drop down list

2011-11-20 Thread EdgarAllenPoe
Thanks again Anthony,

Your help has been clear and concise.  I have what I need now.

About the error thing.  Just to be clear where I am working from.  I
am using the online editor at:
http://127.0.0.1:8000/admin/default/edit/XxXxxx/models/db_wizard.py

And for a test I just removed one of the commas at the end of a line
and tried to save the file, which produced this error in an orange pop
up message:

failed to compile file because:
SyntaxError at line 50 at char 8
invalid syntax (C:/web2py/applications/XxXxxx/models/db_wizard.py,
line 50)

So I guess it is saving the file, but failing to compile.  Would that
be a better way to state what is happening?

Thanks again.

On Nov 19, 6:14 pm, Anthony  wrote:
> > db.define_table('t_ab_recipient',
> >     [snip]
>
> change:
>
> >     Field('f_distribution_name', type='string',
> >           label=T('Distribution Name')),
>
> to:
>         Field('f_distribution', db.t_ab_distribution,
>             label=T('Distribution Name')),
>
> Note, your code wouldn't be producing any errors on save (saving just saves
> the file -- it doesn't run or even check any of the code). If you're
> getting errors when merely trying to save the updated file, there's
> something else wrong (I'm not sure what).
>
> Anthony


[web2py] Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
Dear All,

How can i use the python PIL in my project ?


[web2py] Rss Reader

2011-11-20 Thread Web2Py Freak
Dear All,

How can i use an RSS reader in my website to get feeds from another
website ??


Re: [web2py] Using Python Imaging Library(PIL)

2011-11-20 Thread Kenneth Lundström

I use it to create a thumbnail:

def makeThumbnail(dbtable,ImageID,size=(150,150)):
try:
thisImage=db(dbtable.id==ImageID).select()[0]
import os, uuid
from PIL import Image
except: return
if thisImage.image == "":
return
im=Image.open(request.folder + 'uploads/' + thisImage.image)
im.thumbnail(size,Image.ANTIALIAS)
thumbName='product.image.%s.jpg' % (uuid.uuid4())
im.save(request.folder + 'uploads/' + thumbName,'jpeg')
thisImage.update_record(thumbnail=thumbName)
return


Dear All,

How can i use the python PIL in my project ?




[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
i want to use this code but i dont know how to import the PIL ??? can
you tell me how ?


Re: [web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Kenneth Lundström
I don't understand what you mean. You don't need to do anything, this 
code works like it is. You have to of course have PIL installed?



Kenneth


i want to use this code but i dont know how to import the PIL ??? can
you tell me how ?




[web2py] web2py and FirePHP

2011-11-20 Thread Ed Greenberg
I happened upon this old thready from 2009:
https://groups.google.com/group/web2py/browse_thread/thread/cc13960a5079b2d5/d73a34f534a77419

But unfortunately, the link to the code has become 404 and the thread
has died.

Is anybody using the module that hooks web2py to FirePHP that could
send me what had previously been found at http://www.box.com/shared/dtm0dhgze9

Did it work?

Many thanks

Ed Greenberg


[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
i dont know how to install it


Re: [web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Kenneth Lundström

PIL is not installed in web2py, it is installed on the operating system.

What operating system are you using?


Kenneth


i dont know how to install it




[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
windows 7


Re: [web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Kenneth Lundström

I'm using Linux but does this work for you:

http://code.google.com/appengine/docs/python/images/installingPIL.html#windows


Kenneth


windows 7




[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
i will try it , but when i upload my project to a host , how would the
PIL work if its just installed to my PC ?


Re: [web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Kenneth Lundström

Will not if PIL is not installed. Needs PIL on the host too.


Kenneth

i will try it , but when i upload my project to a host , how would the
PIL work if its just installed to my PC ?




[web2py] Re: help on rewrite

2011-11-20 Thread Niphlod
ok, I'll try to mess it up and see what is working and what is not.

Thanks

Niphlod


[web2py] Re: Create a simple drop down list

2011-11-20 Thread EdgarAllenPoe
Well I may have spoke too soon...

I have another table...this one:

db.define_table('t_ab_team',
[snip]
Field('f_distribuionname', type='string',
  label=T('Distribuionname')),

And I want to link the above field so that it show a drop down list
also using the contents of the following field

db.define_table('t_ab_distribution',
Field('f_distributionname', type='string', unique=True,
  label=T('Distributionname')),

So I tried this as I had before with the other drop down list that I
wanted:

Field('f_distribuionname', db.t_ab_distribution,
  label=T('Distribuionname')),

Now I have broken something.  Is this because I cannot explicitly link
both

db.t_ab_recipient.f_distribution_name  ###would like this to show a
drop down list
db.t_ab_team.f_distribuionname ###would like this to show a
drop down list

to

db.t_ab_distribution.f_distributionname ###contents of drop downlist

or am I doing something else wrong?



On Nov 20, 6:47 am, EdgarAllenPoe  wrote:
> Thanks again Anthony,
>
> Your help has been clear and concise.  I have what I need now.
>
> About the error thing.  Just to be clear where I am working from.  I
> am using the online editor 
> at:http://127.0.0.1:8000/admin/default/edit/XxXxxx/models/db_wizard.py
>
> And for a test I just removed one of the commas at the end of a line
> and tried to save the file, which produced this error in an orange pop
> up message:
>
> failed to compile file because:
> SyntaxError at line 50 at char 8
> invalid syntax (C:/web2py/applications/XxXxxx/models/db_wizard.py,
> line 50)
>
> So I guess it is saving the file, but failing to compile.  Would that
> be a better way to state what is happening?
>
> Thanks again.
>
> On Nov 19, 6:14 pm, Anthony  wrote:
>
>
>
>
>
>
>
> > > db.define_table('t_ab_recipient',
> > >     [snip]
>
> > change:
>
> > >     Field('f_distribution_name', type='string',
> > >           label=T('Distribution Name')),
>
> > to:
> >         Field('f_distribution', db.t_ab_distribution,
> >             label=T('Distribution Name')),
>
> > Note, your code wouldn't be producing any errors on save (saving just saves
> > the file -- it doesn't run or even check any of the code). If you're
> > getting errors when merely trying to save the updated file, there's
> > something else wrong (I'm not sure what).
>
> > Anthony


[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
how do i install it in the host ???


Re: [web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Kenneth Lundström
Depends on the host. Do you have SSH access and can install things. If 
not have you tested if it already has it installed?



Kenneth


how do i install it in the host ???




[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
i am using Webfaction


Re: [web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Kenneth Lundström

It seams to have PIL installed. At least one server I just tested.


Kenneth


i am using Webfaction




[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
i just used ssh to get into webfaction terminal and tested import
Image on its python and its working .. thanx :)


[web2py] Re: help on rewrite

2011-11-20 Thread Niphlod
so, here's a few tests on the functionality at the current state
(patch applied). Maybe we can sum up a little "recipe" to explain
better
the "interaction" between parameter based and pattern based
rewrite

These settings for production sites are a real deal, so, here we
are...
The test is a basic app, with an errors/index function expressed as:

def index():
response.status = request.vars.code
return dict(vars=request.vars)

The test is "passed" when:
a) the appname is stripped from the url
b) the error handler doesn't loop forever
c) a request made to http://host.domain/robots.txt returns the
contents of appname/static/robots.txt
d) a request made to http://host.domain/favicon.ico returns the
contents of appname/static/favicon.ico
e) a request made to http://host.domain/sitemap.xml returns the
contents of appname/static/sitemap.xml

TEST 1:
---routes.py---
default_application = 'appname'
routes_onerror = [
  ('*/*', '/appname/errors/index')
]

results : a) not working (that's expected), b) working, c), d), e) not
working (expected behaviour)

TEST 2:
---routes.py---
default_application = 'appname'
routers = dict(
BASE = dict(
default_application = 'appname',
),
)

routes_onerror = [
  ('*/*', '/errors/index')
]

results: a) working, b) working, c) working, d) working, e) not
working

---routes.py---
default_application = 'appname'
routes_in = (
  ('/robots.txt', '/static/robots.txt'),
  ('/sitemap.xml', '/static/sitemap.xml'),
  ('/favicon.ico', '/static/favicon.ico'),
)

routes_out = (
  ('/static/robots.txt', '/robots.txt'),
  ('/static/sitemap.xml', '/sitemap.xml'),
  ('/static/favicon.ico', '/favicon.ico'),
)

routers = dict(
BASE = dict(
default_application = 'appname',
),
)

routes_onerror = [
  ('*/*', '/errors/index')
]

results: a) working, b) working, c) working, d) working, e) not
working

TEST 3:
---routes.py---
default_application = 'appname'
routes_in = (
  ('/(?P.*)', '/appname/\g'),
  ('/favicon.ico', '/appname/static/favicon.ico'),
  ('/sitemap.xml', '/appname/static/sitemap.xml'),
  ('/robots.txt', '/appname/static/robots.txt')
)

routes_out = (
  ('/appname/(?P.*)', '/\g'),
  ('/appname/static/favicon.ico', '/favicon.ico' ),
  ('/appname/static/robots.txt', '/robots.txt'),
  ('/appname/static/sitemap.xml', '/sitemap.xml')
)

routes_onerror = [
  ('*/*', '/errors/index')
]

results: a) working, b) working, c) working, d) working, e) not
working

TEST 4:
default_application = 'appname'
routes_in = (
  ('/favicon.ico', '/appname/static/favicon.ico'),
  ('/robots.txt', '/appname/static/robots.txt'),
  ('/sitemap.xml', '/appname/static/sitemap.xml'),
  ('/(?P.*)', '/appname/\g')
)

routes_out = (
  ('/appname/static/favicon.ico', '/favicon.ico' ),
  ('/appname/static/robots.txt', '/robots.txt'),
  ('/appname/static/sitemap.xml', '/sitemap.xml'),
  ('/appname/(?P.*)', '/\g')
)
results: a) working, b) working, c) working, d) working, e) working

So, to sum up, something I think I have learned from the experience:
- pattern-based and parameter-based aren't meant to use together. With
pattern-based system "root files" as robots.txt and favicon.ico are
handled internally but not sitemap.xml (or anything else)
- routes_onerror seems to work independantly of the "rewrite method"
- in pattern-based system the order matters. This is an expected
behaviour but nonetheless worth to remember. As an example, take TEST
3 and TEST 4... sitemap.xml gets "taken" by the   ('/(?P.*)', '/
appname/\g') tuple in TEST 3 before the "exact match".
- parameter-based is really helpful to map domains to apps or if you
have multiple apps but only one "preferred", or with language-based
redirections. With parameter-based system you can access other apps by
"normal" non-rewritten urls. With pattern-based if you want to have a
"default" application you have to map any additional application
specifically.


[web2py] Re: Eclipse+Pydev+GAE+Debugging

2011-11-20 Thread Nico de Groot
Not yet, I assumed running GAE locally wouldn't change debugging, but I 
will check (read: should have checked)  this, unfortunately I don't have 
time for it this week.
Maybe current GAE users can confirm/solve/document the problem?

Nico de Groot



[web2py] Using multi-field unique indexes

2011-11-20 Thread ~redShadow~
I just developed a way to quickly handle translations of table records,
that works this way:

Assuming we have a table name 'mytable' with three fields ('field0',
'field1' and 'field2'), it creates an exact copy of the original table
(named 't9n_mytable', containing all the original fields plus a
'language' field, containin language code, and a 'record' field that is
a reference to mytable).

Now, I want to be sure there are no duplicate translations, and way to
do so would be to create an unique index on ``(record, language)``, but
it looks like there is no straight-forward way to do that in web2py..

For the moment, I solved using this code, but it doesn't look great.. is
there a better way to do this?

Code::

_table_existed = ('t9n_mytable' in db.tables)

## Here, define the table...

if not _table_existed:
import urlparse
dbtype = urlparse.urlparse(db._uri).scheme
if dbtype == 'sqlite':
db.executesql('CREATE UNIQUE INDEX'
' IF NOT EXISTS unique_record_language'
' ON t9n_mytable (record, language);')
elif dbtype == 'mysql':
db.executesql('CREATE UNIQUE INDEX'
' unique_record_language'
' ON t9n_mytable (record, language);')
elif dbtype == 'pgsql':
db.executesql('CREATE UNIQUE INDEX'
' unique_record_language'
' ON t9n_mytable (record, language);')
else:
pass

-- 
Samuele ~redShadow~ Santi

 redshadow[at]hackzine.org - redshadowhack[at]gmail.com

  Blog: http://hackzine.org

  GPG Key signature:
   050D 3E9F 6E0B 44CE C008 D1FC 166C 3C7E EB26 4933

/me recommends:
Squadra Informatica - http://www.squadrainformatica.com

 - Proud ThinkPad T-Series owner
 - Registered Linux-User: #440008
  * GENTOO User since 1199142000 (2008-01-01)
  * former DEBIAN SID user

  "Software is like sex: it's better when it's free!"
  -- Linus Torvalds



signature.asc
Description: This is a digitally signed message part


[web2py] Re: Simplifying a SQL statement

2011-11-20 Thread Adrian Edwards
Figured it out.
Basically what I was trying to do was the following select

SELECT entries FROM entries, event_users WHERE event_users.event
== event_id

Which I translated into

entries_query = db.event_users.event == event_id
entries = db(entries_query).select(db.entries.ALL,
groupby=db.entries.user)

I've still got to do some testing on it, but sure did take a long time
to figure out for something that looks so simple.

On Nov 19, 11:57 am, Adrian Edwards  wrote:
> I'm trying to figure out a way to simplify a series of SQL statements.
>
> I have the following 2 tables
>
> db.define_table('event_users',
>     Field('event', 'reference events'),
>     Field('user_name', 'reference auth_user'),
>     Field('goal', 'double'),
>     Field('last_entry', 'date'),
>     format='%(user_name)s')
>
> db.define_table('entries',
>     Field('user', 'reference event_users'),
>     Field('date_entered', 'date'),
>     Field('value', 'double'),
>     format='%(user)s %(date_entered)s')
>
> A user is able make multiple entries per event and I'm trying come up
> with select statement that gives me the last entry for each user .
>
> I also need to maintain a history of entries to display on a different
> page.
> So if a user makes the following entries
> 11/1/2011  100
> 11/2/2011  200
> 11/3/2011  300
>
> I have a summary page that will give me the latest entry (in this case
> 300) and then a detail page that will show all 3 entries.
>
> The following works for the most part but its long and it returns a
> dict inside a row inside a list and is very difficult to display the
> individual fields.
>
> # get users registered for the event
>     user_query = db.event_users.event == event_id
>     users = db(user_query).select()
>
> # get the last entry for each user
>     entries = []
>     for user in users:
>         entry_query = db.entries.user == user
>         entry =
> db(entry_query).select(orderby=db.entries.date_entered).last()
>         entries.append(entry)
>
> Any suggestions?
> Thanks.
>
> Adrian


[web2py] Re: Create a simple drop down list

2011-11-20 Thread Anthony
On Sunday, November 20, 2011 4:47:16 AM UTC-5, EdgarAllenPoe wrote:
>
> About the error thing.  Just to be clear where I am working from.  I
> am using the online editor at:
> http://127.0.0.1:8000/admin/default/edit/XxXxxx/models/db_wizard.py
>
> And for a test I just removed one of the commas at the end of a line
> and tried to save the file, which produced this error in an orange pop
> up message:
>
> failed to compile file because:
> SyntaxError at line 50 at char 8
> invalid syntax (C:/web2py/applications/XxXxxx/models/db_wizard.py,
> line 50)
>
Oh yeah, if you're using the 'admin' app to edit, I guess it does actually 
check the code for errors before saving (I think only the .py files, 
though).

Anthony

 


[web2py] Re: Create a simple drop down list

2011-11-20 Thread Anthony
You should be able to reference the t_ab_distribution table from multiple 
tables. Can you show the full models for these tables? What exactly broke 
(i.e., what do you see, and what do you expect)?

Anthony

On Sunday, November 20, 2011 7:32:31 AM UTC-5, EdgarAllenPoe wrote:
>
> Well I may have spoke too soon...
>
> I have another table...this one:
>
> db.define_table('t_ab_team',
> [snip]
> Field('f_distribuionname', type='string',
>   label=T('Distribuionname')),
>
> And I want to link the above field so that it show a drop down list
> also using the contents of the following field
>
> db.define_table('t_ab_distribution',
> Field('f_distributionname', type='string', unique=True,
>   label=T('Distributionname')),
>
> So I tried this as I had before with the other drop down list that I
> wanted:
>
> Field('f_distribuionname', db.t_ab_distribution,
>   label=T('Distribuionname')),
>
> Now I have broken something.  Is this because I cannot explicitly link
> both
>
> db.t_ab_recipient.f_distribution_name  ###would like this to show a
> drop down list
> db.t_ab_team.f_distribuionname ###would like this to show a
> drop down list
>
> to
>
> db.t_ab_distribution.f_distributionname ###contents of drop downlist
>
> or am I doing something else wrong?
>
> On Nov 20, 6:47 am, EdgarAllenPoe  wrote:
> > Thanks again Anthony,
> >
> > Your help has been clear and concise.  I have what I need now.
> >
> > About the error thing.  Just to be clear where I am working from.  I
> > am using the online editor at:
> http://127.0.0.1:8000/admin/default/edit/XxXxxx/models/db_wizard.py
> >
> > And for a test I just removed one of the commas at the end of a line
> > and tried to save the file, which produced this error in an orange pop
> > up message:
> >
> > failed to compile file because:
> > SyntaxError at line 50 at char 8
> > invalid syntax (C:/web2py/applications/XxXxxx/models/db_wizard.py,
> > line 50)
> >
> > So I guess it is saving the file, but failing to compile.  Would that
> > be a better way to state what is happening?
> >
> > Thanks again.
> >
> > On Nov 19, 6:14 pm, Anthony  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > > db.define_table('t_ab_recipient',
> > > > [snip]
> >
> > > change:
> >
> > > > Field('f_distribution_name', type='string',
> > > >   label=T('Distribution Name')),
> >
> > > to:
> > > Field('f_distribution', db.t_ab_distribution,
> > > label=T('Distribution Name')),
> >
> > > Note, your code wouldn't be producing any errors on save (saving just 
> saves
> > > the file -- it doesn't run or even check any of the code). If you're
> > > getting errors when merely trying to save the updated file, there's
> > > something else wrong (I'm not sure what).
> >
> > > Anthony
>
>

[web2py] can web2py be used as a static website generator?

2011-11-20 Thread moncho
i have been using many ruby-based generators.  and i'm interested in
moving over into web2py.  i know that hyde is python based and used
django, however web2py is the direction i'd like to head in.  i havent
been able to find out whether it can deploy a completely stati c
webstie though.


Re: [web2py] can web2py be used as a static website generator?

2011-11-20 Thread ~redShadow~
On Sun, 2011-11-20 at 07:37 -0800, moncho wrote: 
> i have been using many ruby-based generators.  and i'm interested in
> moving over into web2py.  i know that hyde is python based and used
> django, however web2py is the direction i'd like to head in.  i havent
> been able to find out whether it can deploy a completely stati c
> webstie though.

what do you mean for "deploy a completely static website"?

Using something like:

wget --recursive --no-clobber --page-requisites --adjust-extension
--convert-links --restrict-file-names=windows --no-parent
http://example.com

You can "staticize" [==get a static snapshot of] (almost) any kind of
website created by (almost) any kind of application/framework/cms/...
(I've tested that on web2py book, some Drupal sites, and some other misc
sites providing online-only documentation I wanted to copy offline :)).

-- 
Samuele ~redShadow~ Santi

 redshadow[at]hackzine.org - redshadowhack[at]gmail.com

  Blog: http://hackzine.org

  GPG Key signature:
   050D 3E9F 6E0B 44CE C008 D1FC 166C 3C7E EB26 4933

/me recommends:
Squadra Informatica - http://www.squadrainformatica.com

 - Proud ThinkPad T-Series owner
 - Registered Linux-User: #440008
  * GENTOO User since 1199142000 (2008-01-01)
  * former DEBIAN SID user

  "Software is like sex: it's better when it's free!"
  -- Linus Torvalds



signature.asc
Description: This is a digitally signed message part


[web2py] Re: help on rewrite

2011-11-20 Thread Anthony
OK, so specifically regarding routes_onerror, has the recent patch 
eliminated the infinite loop problem (and not broken anything else), as far 
as you can tell?

And yes, the pattern-based and parameter-based systems cannot be mixed -- 
you must use one or the other. routes_onerror, however, works with either 
system.

Note, in the parameter-based system, you can do:

routers = dict(
BASE = dict(
default_application = 'appname',
root_static = ['favicon.ico', 'robots.txt', 'sitemap.xml']
),
)

to set static files that should be accessible from the root URL.

Anthony

On Sunday, November 20, 2011 8:53:42 AM UTC-5, Niphlod wrote:
>
> so, here's a few tests on the functionality at the current state
> (patch applied). Maybe we can sum up a little "recipe" to explain
> better
> the "interaction" between parameter based and pattern based
> rewrite
>
> These settings for production sites are a real deal, so, here we
> are...
> The test is a basic app, with an errors/index function expressed as:
>
> def index():
> response.status = request.vars.code
> return dict(vars=request.vars)
>
> The test is "passed" when:
> a) the appname is stripped from the url
> b) the error handler doesn't loop forever
> c) a request made to http://host.domain/robots.txt returns the
> contents of appname/static/robots.txt
> d) a request made to http://host.domain/favicon.ico returns the
> contents of appname/static/favicon.ico
> e) a request made to http://host.domain/sitemap.xml returns the
> contents of appname/static/sitemap.xml
>
> TEST 1:
> ---routes.py---
> default_application = 'appname'
> routes_onerror = [
>   ('*/*', '/appname/errors/index')
> ]
>
> results : a) not working (that's expected), b) working, c), d), e) not
> working (expected behaviour)
>
> TEST 2:
> ---routes.py---
> default_application = 'appname'
> routers = dict(
> BASE = dict(
> default_application = 'appname',
> ),
> )
>
> routes_onerror = [
>   ('*/*', '/errors/index')
> ]
>
> results: a) working, b) working, c) working, d) working, e) not
> working
>
> ---routes.py---
> default_application = 'appname'
> routes_in = (
>   ('/robots.txt', '/static/robots.txt'),
>   ('/sitemap.xml', '/static/sitemap.xml'),
>   ('/favicon.ico', '/static/favicon.ico'),
> )
>
> routes_out = (
>   ('/static/robots.txt', '/robots.txt'),
>   ('/static/sitemap.xml', '/sitemap.xml'),
>   ('/static/favicon.ico', '/favicon.ico'),
> )
>
> routers = dict(
> BASE = dict(
> default_application = 'appname',
> ),
> )
>
> routes_onerror = [
>   ('*/*', '/errors/index')
> ]
>
> results: a) working, b) working, c) working, d) working, e) not
> working
>
> TEST 3:
> ---routes.py---
> default_application = 'appname'
> routes_in = (
>   ('/(?P.*)', '/appname/\g'),
>   ('/favicon.ico', '/appname/static/favicon.ico'),
>   ('/sitemap.xml', '/appname/static/sitemap.xml'),
>   ('/robots.txt', '/appname/static/robots.txt')
> )
>
> routes_out = (
>   ('/appname/(?P.*)', '/\g'),
>   ('/appname/static/favicon.ico', '/favicon.ico' ),
>   ('/appname/static/robots.txt', '/robots.txt'),
>   ('/appname/static/sitemap.xml', '/sitemap.xml')
> )
>
> routes_onerror = [
>   ('*/*', '/errors/index')
> ]
>
> results: a) working, b) working, c) working, d) working, e) not
> working
>
> TEST 4:
> default_application = 'appname'
> routes_in = (
>   ('/favicon.ico', '/appname/static/favicon.ico'),
>   ('/robots.txt', '/appname/static/robots.txt'),
>   ('/sitemap.xml', '/appname/static/sitemap.xml'),
>   ('/(?P.*)', '/appname/\g')
> )
>
> routes_out = (
>   ('/appname/static/favicon.ico', '/favicon.ico' ),
>   ('/appname/static/robots.txt', '/robots.txt'),
>   ('/appname/static/sitemap.xml', '/sitemap.xml'),
>   ('/appname/(?P.*)', '/\g')
> )
> results: a) working, b) working, c) working, d) working, e) working
>
> So, to sum up, something I think I have learned from the experience:
> - pattern-based and parameter-based aren't meant to use together. With
> pattern-based system "root files" as robots.txt and favicon.ico are
> handled internally but not sitemap.xml (or anything else)
> - routes_onerror seems to work independantly of the "rewrite method"
> - in pattern-based system the order matters. This is an expected
> behaviour but nonetheless worth to remember. As an example, take TEST
> 3 and TEST 4... sitemap.xml gets "taken" by the   ('/(?P.*)', '/
> appname/\g') tuple in TEST 3 before the "exact match".
> - parameter-based is really helpful to map domains to apps or if you
> have multiple apps but only one "preferred", or with language-based
> redirections. With parameter-based system you can access other apps by
> "normal" non-rewritten urls. With pattern-based if you want to have a
> "default" application you have to map any additional application
> specifically.
>
>

Re: [web2py] can web2py be used as a static website generator?

2011-11-20 Thread Bruno Rocha
You can create a web2py dynamic website, so when it were done you can
convert it in to a static website.

Take this action:

def index():
form = FORM()
return dict(form=form)

This will create a  and sends to the view, you can grab the rendered
html and save it in an static html file

de index():
form = FORM()
context = context=dict(form=form)
with open("static/index.html","wb") as static:
html = response.render(context)
static.write(html)
return context

In this way you will have an static rendered html file, but the URLS
generated by URL helper will need to be replaced.



-- 

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


[web2py] Re: Custom name for uploaded file

2011-11-20 Thread Massimo Di Pierro
> what is difference between:
> if form.process().accepted:
> and
> if form.accepts(request,session):

no difference functionally, just different APIs.

> If I have two variables (var1 and var2)
> var1 = Object
> var2 = cStringIO.StrindO 0x1234
>
> Before your example I was stack with
> file.write(var1)
> or
> file.write(var2)
> how I can get string value from var1=Object or var2=cStringIO.StrindO

file.write(var2.read())

or more memory efficiently

import shutil
shutil.copyfileobj(var2,file)






[web2py] Re: Rss Reader

2011-11-20 Thread Massimo Di Pierro
web2py comes with feedparser. Look at example 14:
http://web2py.com/examples/default/examples

On Nov 20, 3:58 am, Web2Py Freak  wrote:
> Dear All,
>
> How can i use an RSS reader in my website to get feeds from another
> website ??


Re: [web2py] ImportError: No module named google.appengine.ext

2011-11-20 Thread Constantine Vasil
> Are you doing anything with sys.path?

No - I do not. It seems to me it is a path issue
in the Eclipse+PyDev debugging environment.

Still it is not clear to me how web2py finds it in
gaehandler.py but not in my db.py? 


[web2py] Re: Eclipse+Pydev+GAE+Debugging

2011-11-20 Thread Constantine Vasil
I spend a lot of time to figure out what is wrong.
Part of the issue is Eclipse+Pydev cannot find the
path to files.

This happens because I have two separate web2y source
projects under Eclipse - one with trunk, one with release.

What I discovered: made a module, imported it from a controller,
the debugger comes to the module, with F5 I am stepping through
the code and at some point "return" goes back to the "default" controller,
at this point a pop up window opened and  asked me for alternatives
of "default" and it showed to me all "defaults" in all "projects"
to choose from. So it clicked to me I have to add a path to current
app to be found. I suppose this was done automatically.

Making this works seamlessly with many projects is not easy.
What web2py needs is an Eclipse plugin - a project wizard
which to create an Eclipse web2py project, adding the wep2py
and the project paths in the beginning, like what  Google has
for AppEngine.



[web2py] Re: help on rewrite

2011-11-20 Thread Niphlod
yes, as far as I can tell the patch solved the infinite loop problem.
All other things are working correctly: it did not brake anything as
far as my tests gone.

On 20 Nov, 17:14, Anthony  wrote:
> OK, so specifically regarding routes_onerror, has the recent patch
> eliminated the infinite loop problem (and not broken anything else), as far
> as you can tell?
>
> And yes, the pattern-based and parameter-based systems cannot be mixed --
> you must use one or the other. routes_onerror, however, works with either
> system.
>
> Note, in the parameter-based system, you can do:
>
> routers = dict(
>     BASE = dict(
>         default_application = 'appname',
>         root_static = ['favicon.ico', 'robots.txt', 'sitemap.xml']
>     ),
> )
>
> to set static files that should be accessible from the root URL.
>
> Anthony
>
>
>
>
>
>
>
> On Sunday, November 20, 2011 8:53:42 AM UTC-5, Niphlod wrote:
>
> > so, here's a few tests on the functionality at the current state
> > (patch applied). Maybe we can sum up a little "recipe" to explain
> > better
> > the "interaction" between parameter based and pattern based
> > rewrite
>
> > These settings for production sites are a real deal, so, here we
> > are...
> > The test is a basic app, with an errors/index function expressed as:
>
> > def index():
> >     response.status = request.vars.code
> >     return dict(vars=request.vars)
>
> > The test is "passed" when:
> > a) the appname is stripped from the url
> > b) the error handler doesn't loop forever
> > c) a request made tohttp://host.domain/robots.txtreturns the
> > contents of appname/static/robots.txt
> > d) a request made tohttp://host.domain/favicon.icoreturns the
> > contents of appname/static/favicon.ico
> > e) a request made tohttp://host.domain/sitemap.xmlreturns the
> > contents of appname/static/sitemap.xml
>
> > TEST 1:
> > ---routes.py---
> > default_application = 'appname'
> > routes_onerror = [
> >   ('*/*', '/appname/errors/index')
> > ]
>
> > results : a) not working (that's expected), b) working, c), d), e) not
> > working (expected behaviour)
>
> > TEST 2:
> > ---routes.py---
> > default_application = 'appname'
> > routers = dict(
> >     BASE = dict(
> >         default_application = 'appname',
> >     ),
> > )
>
> > routes_onerror = [
> >   ('*/*', '/errors/index')
> > ]
>
> > results: a) working, b) working, c) working, d) working, e) not
> > working
>
> > ---routes.py---
> > default_application = 'appname'
> > routes_in = (
> >   ('/robots.txt', '/static/robots.txt'),
> >   ('/sitemap.xml', '/static/sitemap.xml'),
> >   ('/favicon.ico', '/static/favicon.ico'),
> > )
>
> > routes_out = (
> >   ('/static/robots.txt', '/robots.txt'),
> >   ('/static/sitemap.xml', '/sitemap.xml'),
> >   ('/static/favicon.ico', '/favicon.ico'),
> > )
>
> > routers = dict(
> >     BASE = dict(
> >         default_application = 'appname',
> >     ),
> > )
>
> > routes_onerror = [
> >   ('*/*', '/errors/index')
> > ]
>
> > results: a) working, b) working, c) working, d) working, e) not
> > working
>
> > TEST 3:
> > ---routes.py---
> > default_application = 'appname'
> > routes_in = (
> >   ('/(?P.*)', '/appname/\g'),
> >   ('/favicon.ico', '/appname/static/favicon.ico'),
> >   ('/sitemap.xml', '/appname/static/sitemap.xml'),
> >   ('/robots.txt', '/appname/static/robots.txt')
> > )
>
> > routes_out = (
> >   ('/appname/(?P.*)', '/\g'),
> >   ('/appname/static/favicon.ico', '/favicon.ico' ),
> >   ('/appname/static/robots.txt', '/robots.txt'),
> >   ('/appname/static/sitemap.xml', '/sitemap.xml')
> > )
>
> > routes_onerror = [
> >   ('*/*', '/errors/index')
> > ]
>
> > results: a) working, b) working, c) working, d) working, e) not
> > working
>
> > TEST 4:
> > default_application = 'appname'
> > routes_in = (
> >   ('/favicon.ico', '/appname/static/favicon.ico'),
> >   ('/robots.txt', '/appname/static/robots.txt'),
> >   ('/sitemap.xml', '/appname/static/sitemap.xml'),
> >   ('/(?P.*)', '/appname/\g')
> > )
>
> > routes_out = (
> >   ('/appname/static/favicon.ico', '/favicon.ico' ),
> >   ('/appname/static/robots.txt', '/robots.txt'),
> >   ('/appname/static/sitemap.xml', '/sitemap.xml'),
> >   ('/appname/(?P.*)', '/\g')
> > )
> > results: a) working, b) working, c) working, d) working, e) working
>
> > So, to sum up, something I think I have learned from the experience:
> > - pattern-based and parameter-based aren't meant to use together. With
> > pattern-based system "root files" as robots.txt and favicon.ico are
> > handled internally but not sitemap.xml (or anything else)
> > - routes_onerror seems to work independantly of the "rewrite method"
> > - in pattern-based system the order matters. This is an expected
> > behaviour but nonetheless worth to remember. As an example, take TEST
> > 3 and TEST 4... sitemap.xml gets "taken" by the   ('/(?P.*)', '/
> > appname/\g') tuple in TEST 3 before the "exact match".
> > - parameter-based is really helpful to map domains to apps or if you
> > have multiple apps but only on

[web2py] we2py + GAE - how to get the table key?

2011-11-20 Thread Constantine Vasil
>From the "book"
if I use in web2py
db.define_table('person', 
Field
('name'), Field ('image', 
'upload'))
it bets suited for "interactive" apps because it integrates
well with the forms, templates, etc. in web2py.

>From other side a massive "server" side work is more appropriate
with GAE and its parallel "services". 

To make this "bridge" to GAE parallel universe all the man needs
is the "key" of the web2py table "person".

Having the table key and using google.appengine.ext.db
it easy to get the table instance values and do some
work on GAE.
http://code.google.com/appengine/docs/python/datastore/keyclass.html#Key
An application can retrieve a model instance for a given Key using the 
get()
 function.

Now the question is how to do that? The reverse is also important -
how to use in web2py a table instance defined in GAE?
*
*




Re: [web2py] ImportError: No module named google.appengine.ext

2011-11-20 Thread Jonathan Lundell
On Nov 20, 2011, at 8:50 AM, Constantine Vasil wrote:

> > Are you doing anything with sys.path?
> 
> No - I do not. It seems to me it is a path issue
> in the Eclipse+PyDev debugging environment.
> 
> Still it is not clear to me how web2py finds it in
> gaehandler.py but not in my db.py? 

Try logging sys.path.

[web2py] I cant get example in the book to work,

2011-11-20 Thread chawk
((book))

There a number of ways to customize auth. The simplest way is to add
extra fields:

# after auth = Auth(db)
auth.setting.extra_fields['auth_user']= [
  Field('address'),
  Field('city'),
  Field('zip'),
  Field('phone')]
# before auth.define_tables(username=True)

((my db.py file looks like this))

from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
auth = Auth(db, hmac_key=Auth.get_or_create_key())
crud, service, plugins = Crud(db), Service(), PluginManager()

## create all tables needed by auth if not custom tables
auth.define_tables()
from gluon.tools import Auth
auth = Auth(globals(), db)
auth.define_tables(username=False)


I tried inserting the example from the book inside the designated
area, but i receive this error.

 Traceback (most recent call last):
 File "gluon/restricted.py", line 194, in restricted
 File "C:/Projects/web2py/applications/noobmusic/models/db.py",
line 42, in 
 AttributeError: 'Auth' object has no attribute 'setting'

All i am trying to do is add extra registration fields


Thank you


[web2py] Re: Using multi-field unique indexes

2011-11-20 Thread Niphlod
Unfortunately there is no simple way to achieve multi-column unique
costraints in web2py.
Aside from your implementation, you can use a third column that stores
a composite key, say "%s_$$$_%s" % (key1, key2), that you can compute
and set as unique.

Something like (not tested):

db.define_table('t9n_mytable',
 Field('record', 'references records_table'),
 Field('language', length=2, notnull=True),
 Field('unique_col_costraint',
   compute=lambda row: "%s_$$$_%s" % (row['record'],
row['language']),
   unique=True)
)


On 20 Nov, 15:17, ~redShadow~  wrote:
> I just developed a way to quickly handle translations of table records,
> that works this way:
>
> Assuming we have a table name 'mytable' with three fields ('field0',
> 'field1' and 'field2'), it creates an exact copy of the original table
> (named 't9n_mytable', containing all the original fields plus a
> 'language' field, containin language code, and a 'record' field that is
> a reference to mytable).
>
> Now, I want to be sure there are no duplicate translations, and way to
> do so would be to create an unique index on ``(record, language)``, but
> it looks like there is no straight-forward way to do that in web2py..
>
> For the moment, I solved using this code, but it doesn't look great.. is
> there a better way to do this?
>
> Code::
>
>     _table_existed = ('t9n_mytable' in db.tables)
>
>     ## Here, define the table...
>
>     if not _table_existed:
>         import urlparse
>         dbtype = urlparse.urlparse(db._uri).scheme
>         if dbtype == 'sqlite':
>             db.executesql('CREATE UNIQUE INDEX'
>                 ' IF NOT EXISTS unique_record_language'
>                 ' ON t9n_mytable (record, language);')
>         elif dbtype == 'mysql':
>             db.executesql('CREATE UNIQUE INDEX'
>                 ' unique_record_language'
>                 ' ON t9n_mytable (record, language);')
>         elif dbtype == 'pgsql':
>             db.executesql('CREATE UNIQUE INDEX'
>                 ' unique_record_language'
>                 ' ON t9n_mytable (record, language);')
>         else:
>             pass
>
> --
> Samuele ~redShadow~ Santi
> 
>      redshadow[at]hackzine.org - redshadowhack[at]gmail.com
>
>   Blog:http://hackzine.org
>
>   GPG Key signature:
>        050D 3E9F 6E0B 44CE C008 D1FC 166C 3C7E EB26 4933
> 
> /me recommends:
>     Squadra Informatica -http://www.squadrainformatica.com
> 
>  - Proud ThinkPad T-Series owner
>  - Registered Linux-User: #440008
>       * GENTOO User since 1199142000 (2008-01-01)
>       * former DEBIAN SID user
> 
>       "Software is like sex: it's better when it's free!"
>                               -- Linus Torvalds
>
>  signature.asc
> < 1KVisualizzaScarica


Re: [web2py] I cant get example in the book to work,

2011-11-20 Thread Bruno Rocha
On Sun, Nov 20, 2011 at 3:13 PM, chawk  wrote:

> setting


You trying to access auth.setting, it should be auth.*settings*

-- 

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


[web2py] Re: I cant get example in the book to work,

2011-11-20 Thread chawk
Oh, thank you.There is a typo in the book, but that was retarded
of me for not trying settings though.  :)


[web2py] Re: Modernizr 2

2011-11-20 Thread Constantine Vasil
I checked how you do it:



It is better to have a version number: *modernizr-1.7.min.j*
*
*
The browser load the .js file in its cache. If you use always
the same name modernizr.*custom*.js, then there is no way
for the browser to know there is a new version and there
is no way you visitors to know that. The  only way the 
visitors to use the new version is to clear their browser cache.

So when downloading from the trunk I always have to modify the
layout.html.

Please consider this.
 


[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-20 Thread Rahul
Hi Johann,
  That is correct but I just wanted to know if I can change the
existing functionality for SQLForm.grid View button. To be precise -
here is an example of what I am trying to do.

Example:
The default builtin "View" button on SQLForm.grid has label "View",
now how can I change its label to say "View Post". Note, here I do not
intend to over-ride the existing controller(function) that
SQLForm.grid's View provides but just change its label. How can we
achieve this? I hope you get what I am doing here :)

Again - If someone could post the complete syntax for SQLForm.grid(All
possible parameters ). It would be really helpful. Thanks

Thanks and Regards, Rahul
(www.flockbird.com - web2py powered)

On Nov 19, 2:13 am, Johann Spies  wrote:
> On 18 November 2011 09:00, Rahul  wrote:
>
> > Hi Johan, All,
> >        Sorry but I am not able to get it. With your code above I get
> > an invalid controller
>
> You are not supposed to use that code exactly as it is.  You must adapt it
> for your circumstances:
>
> > > links = [lambda row:
> > A('Edit',_href=URL("controller","edit",args=["update", tablename, a.id]))
>
> Replace "controller" with your controller e.g. 'default'
> Replace 'edit' with your function in the controller referred to.
>
> Regards
> Johann
> --
> Because experiencing your loyal love is better than life itself,
> my lips will praise you.  (Psalm 63:3)


[web2py] Re: help on rewrite

2011-11-20 Thread Anthony
Great. Thanks for checking.

On Sunday, November 20, 2011 12:01:41 PM UTC-5, Niphlod wrote:
>
> yes, as far as I can tell the patch solved the infinite loop problem.
> All other things are working correctly: it did not brake anything as
> far as my tests gone.
>
> On 20 Nov, 17:14, Anthony  wrote:
> > OK, so specifically regarding routes_onerror, has the recent patch
> > eliminated the infinite loop problem (and not broken anything else), as 
> far
> > as you can tell?
> >
> > And yes, the pattern-based and parameter-based systems cannot be mixed --
> > you must use one or the other. routes_onerror, however, works with either
> > system.
> >
> > Note, in the parameter-based system, you can do:
> >
> > routers = dict(
> > BASE = dict(
> > default_application = 'appname',
> > root_static = ['favicon.ico', 'robots.txt', 'sitemap.xml']
> > ),
> > )
> >
> > to set static files that should be accessible from the root URL.
> >
> > Anthony
> >
> >
> >
> >
> >
> >
> >
> > On Sunday, November 20, 2011 8:53:42 AM UTC-5, Niphlod wrote:
> >
> > > so, here's a few tests on the functionality at the current state
> > > (patch applied). Maybe we can sum up a little "recipe" to explain
> > > better
> > > the "interaction" between parameter based and pattern based
> > > rewrite
> >
> > > These settings for production sites are a real deal, so, here we
> > > are...
> > > The test is a basic app, with an errors/index function expressed as:
> >
> > > def index():
> > > response.status = request.vars.code
> > > return dict(vars=request.vars)
> >
> > > The test is "passed" when:
> > > a) the appname is stripped from the url
> > > b) the error handler doesn't loop forever
> > > c) a request made tohttp://host.domain/robots.txtreturns the
> > > contents of appname/static/robots.txt
> > > d) a request made tohttp://host.domain/favicon.icoreturns the
> > > contents of appname/static/favicon.ico
> > > e) a request made tohttp://host.domain/sitemap.xmlreturns the
> > > contents of appname/static/sitemap.xml
> >
> > > TEST 1:
> > > ---routes.py---
> > > default_application = 'appname'
> > > routes_onerror = [
> > >   ('*/*', '/appname/errors/index')
> > > ]
> >
> > > results : a) not working (that's expected), b) working, c), d), e) not
> > > working (expected behaviour)
> >
> > > TEST 2:
> > > ---routes.py---
> > > default_application = 'appname'
> > > routers = dict(
> > > BASE = dict(
> > > default_application = 'appname',
> > > ),
> > > )
> >
> > > routes_onerror = [
> > >   ('*/*', '/errors/index')
> > > ]
> >
> > > results: a) working, b) working, c) working, d) working, e) not
> > > working
> >
> > > ---routes.py---
> > > default_application = 'appname'
> > > routes_in = (
> > >   ('/robots.txt', '/static/robots.txt'),
> > >   ('/sitemap.xml', '/static/sitemap.xml'),
> > >   ('/favicon.ico', '/static/favicon.ico'),
> > > )
> >
> > > routes_out = (
> > >   ('/static/robots.txt', '/robots.txt'),
> > >   ('/static/sitemap.xml', '/sitemap.xml'),
> > >   ('/static/favicon.ico', '/favicon.ico'),
> > > )
> >
> > > routers = dict(
> > > BASE = dict(
> > > default_application = 'appname',
> > > ),
> > > )
> >
> > > routes_onerror = [
> > >   ('*/*', '/errors/index')
> > > ]
> >
> > > results: a) working, b) working, c) working, d) working, e) not
> > > working
> >
> > > TEST 3:
> > > ---routes.py---
> > > default_application = 'appname'
> > > routes_in = (
> > >   ('/(?P.*)', '/appname/\g'),
> > >   ('/favicon.ico', '/appname/static/favicon.ico'),
> > >   ('/sitemap.xml', '/appname/static/sitemap.xml'),
> > >   ('/robots.txt', '/appname/static/robots.txt')
> > > )
> >
> > > routes_out = (
> > >   ('/appname/(?P.*)', '/\g'),
> > >   ('/appname/static/favicon.ico', '/favicon.ico' ),
> > >   ('/appname/static/robots.txt', '/robots.txt'),
> > >   ('/appname/static/sitemap.xml', '/sitemap.xml')
> > > )
> >
> > > routes_onerror = [
> > >   ('*/*', '/errors/index')
> > > ]
> >
> > > results: a) working, b) working, c) working, d) working, e) not
> > > working
> >
> > > TEST 4:
> > > default_application = 'appname'
> > > routes_in = (
> > >   ('/favicon.ico', '/appname/static/favicon.ico'),
> > >   ('/robots.txt', '/appname/static/robots.txt'),
> > >   ('/sitemap.xml', '/appname/static/sitemap.xml'),
> > >   ('/(?P.*)', '/appname/\g')
> > > )
> >
> > > routes_out = (
> > >   ('/appname/static/favicon.ico', '/favicon.ico' ),
> > >   ('/appname/static/robots.txt', '/robots.txt'),
> > >   ('/appname/static/sitemap.xml', '/sitemap.xml'),
> > >   ('/appname/(?P.*)', '/\g')
> > > )
> > > results: a) working, b) working, c) working, d) working, e) working
> >
> > > So, to sum up, something I think I have learned from the experience:
> > > - pattern-based and parameter-based aren't meant to use together. With
> > > pattern-based system "root files" as robots.txt and favicon.ico are
> > > handled internally but not sitemap.xml (or anything else)
> > > - routes_onerror seems to work indepe

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-20 Thread villas
There is a shortage of documentation on the grid,  but I've noticed that I 
often glean a lot from the code (even when I don't understand it all) -- I 
guess that's one of the beauties of opensource.  So,  in addition to any 
other resources you find,  take a glance at this...

http://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#1376


[web2py] web2py on windows 7

2011-11-20 Thread stas z
Hello, I'm working on a app that also runs on windows 7 and which uses
web2py to display various dbase data in html views.
The app is build with py2exe and packs the web2py "binary" for windows
and starts the web2py_no_console.exe in a seperate thread.
This works fine when one starts the app from the users home directory
but web2py fails silently to start when the app, and web2py, is
installed in "Program files".
I suspect that it fails as web2py cannot write stuff inside "Program
files".

Does anyone knows a solution for this problem.

Regards,
Stas Zytkiewicz


[web2py] deploy on cherokee + uwsgi

2011-11-20 Thread Vincenzo Ampolo
Hi.

I've just deplyed on cherokee + uwsgi using the uwsgihandler.py which comes 
in the web2py package. but when i try to connect i get:

ERROR:web2py:Traceback (most recent call last):
  File "/var/www/argomenti.in/web2py/gluon/main.py", line 396, in wsgibase
socket.gethostbyname(http_host)]
gaierror: [Errno -2] Name or service not known

This seems to be not cherokee+uwsgi related because the error comes from 
inside the web2py source code, so web2py is executed. How can i fix it?


[web2py] OFF - Tropo Cloud API for Voice, SMS, and Instant Messaging Services

2011-11-20 Thread António Ramos
I´d like to see some app in web2py with Tropo

http://www.youtube.com/watch?v=h6I0PwQQavg


[web2py] Enforce roles in db

2011-11-20 Thread petrasadi
In my table a have a field like this:  Field('manager', 'reference
auth_user')
Is there a way to enforce in my db for this 'manager' to be part of
the "managers" group?
I have tried db.myTable.manager.requires_membership('managers'), but
of course this blew up.
Any ideas would be highly appreciated.


[web2py] Re: Simplifying a SQL statement

2011-11-20 Thread villas
Hi Adrian
Good that you are making progress,  even though it doesn't look like the 
SQL would be equivalent to me.  
However, just in case you didn't already know this tip, I have so often 
found it useful to see what SQL statement is being generated by prefixing 
'_' in front of select,  eg
db(query)._select()

This prints the SQL to the console.  However,  you can of course also 
easily put this into a variable and display the string in any view too.
Regards,  D


Re: [web2py] Enforce roles in db

2011-11-20 Thread Bruno Rocha
You need to fetch the ID of the desired group
*group = db(db.auth_group.role == 'managers').select().first().id*

define a DAL set using the group id to query membership table
*dbset = db(db.auth_membership.group_id == group)*

include IS_IN_DB validator filtering by the DAL set
*db.Mytable.manager.requires = IS_IN_DB(dbset, 'auth_membership.user_id')
*
May be there is a shortcut for doing this...

On Sun, Nov 20, 2011 at 6:37 PM, petrasadi  wrote:

> In my table a have a field like this:  Field('manager', 'reference
> auth_user')
> Is there a way to enforce in my db for this 'manager' to be part of
> the "managers" group?
> I have tried db.myTable.manager.requires_membership('managers'), but
> of course this blew up.
> Any ideas would be highly appreciated.
>



-- 

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


[web2py] Re: Simplifying a SQL statement

2011-11-20 Thread Cliff
If not working in the console, "print db._lastsql" will output the sql
string to the terminal session where you started web2py, assuming you
started it without the gui.

Otherwise I think the gui has a little field to display outputs.

On Nov 20, 3:42 pm, villas  wrote:
> Hi Adrian
> Good that you are making progress,  even though it doesn't look like the
> SQL would be equivalent to me.
> However, just in case you didn't already know this tip, I have so often
> found it useful to see what SQL statement is being generated by prefixing
> '_' in front of select,  eg
> db(query)._select()
>
> This prints the SQL to the console.  However,  you can of course also
> easily put this into a variable and display the string in any view too.
> Regards,  D


[web2py] Re: Simplifying a SQL statement

2011-11-20 Thread Adrian Edwards
You're right it turned out that wasn't quit the solution I needed.
After some testing I was able to get it working with the following
command.

entries =
db(db.entries.user.belongs(db(db.event_users.event==event_id).select())).select(groupby=db.entries.user,
orderby=~db.entries.value)

I'm now trying to add a 2nd filter that says for this set of entries,
give me the ones that have a user_id equal to auth.user.id.

Thanks for the tips, I'll check it out.

On Nov 20, 4:30 pm, Cliff  wrote:
> If not working in the console, "print db._lastsql" will output the sql
> string to the terminal session where you started web2py, assuming you
> started it without the gui.
>
> Otherwise I think the gui has a little field to display outputs.
>
> On Nov 20, 3:42 pm, villas  wrote:
>
> > Hi Adrian
> > Good that you are making progress,  even though it doesn't look like the
> > SQL would be equivalent to me.
> > However, just in case you didn't already know this tip, I have so often
> > found it useful to see what SQL statement is being generated by prefixing
> > '_' in front of select,  eg
> > db(query)._select()
>
> > This prints the SQL to the console.  However,  you can of course also
> > easily put this into a variable and display the string in any view too.
> > Regards,  D
>
>


Re: [web2py] Re: Custom name for uploaded file

2011-11-20 Thread Miroslav Gojic
This is code for manual upload (it's work for me):

def upload():
import os
import shutil
uploadfolder=os.path.join(request.folder, 'uploads')
form = FORM(
"Upload file:",
INPUT(_type='file',_name='my_file', requires=IS_NOT_EMPTY()),
'Your name:',
INPUT(_name='new_name', requires=IS_NOT_EMPTY()),
INPUT(_type='submit'))
if form.process(dbio=True).accepted:
m_ofn = form.vars.my_file.filename
m_nf = uploadfolder + '/' + m_ofn + '_' + form.vars.new_name
my_object = form.vars.my_file.file
m_f = open(m_nf, "wb")
#m_f.write(my_object.read()) //this ca be used
shutil.copyfileobj(my_object,m_f) //but I us this
m_f.close()
return dict(form=form)

Thanks to Anthony and Massimo


- - Miroslav Gojic - -



On Sun, Nov 20, 2011 at 17:50, Massimo Di Pierro  wrote:

> > what is difference between:
> > if form.process().accepted:
> > and
> > if form.accepts(request,session):
>
> no difference functionally, just different APIs.
>
> > If I have two variables (var1 and var2)
> > var1 = Object
> > var2 = cStringIO.StrindO 0x1234
> >
> > Before your example I was stack with
> > file.write(var1)
> > or
> > file.write(var2)
> > how I can get string value from var1=Object or var2=cStringIO.StrindO
>
> file.write(var2.read())
>
> or more memory efficiently
>
> import shutil
> shutil.copyfileobj(var2,file)
>
>
>
>
>


Re: [web2py] Enforce roles in db

2011-11-20 Thread petrasadi
thanks, works like a charm 

[web2py] Django urls to web2py

2011-11-20 Thread Constantine Vasil
I have in Django urls these statements:

(r'^faq/$', 'MyView.views.url_help_faq'),
(r'^faq/(\S*)/(\S*)', 'MyView.views.url_help_faq'),

Which is making possible *MyView.views.url_help_faq*
to serve the following requests:

http://www.MySite.com/faq   
http://www.MySite.com/faq/topic0100/faq0100

def url_help_faq(request, topic=None, faq=None):

  if not topic and not faq:
 #perform default routine

  if topic and faq:
 #perform routine extracting topic0100 and faq0100
  
  return topic, faq

How to make this in web2py?

















[web2py] gevent helper script integration with web2py

2011-11-20 Thread Dave
I have a script that uses gevent which monkey patches the standard
library to use green threads (cooperative coroutines). I'd like this
to run as a background task using techniques described in "homemade
task queues" or by using web2py's scheduler. Fundamentally my script
only needs access to the DAL to manage jobs and perform manual file
uploads (http://web2py.com/book/default/chapter/06#Manual-Uploads). Is
there a good way to do this without having the monkey patched standard
library (socket module, sll module, etc.) from impacting web2py?

Thanks,
Dave


[web2py] partial date values in date fields

2011-11-20 Thread Nik Go
How is it possible to accept the following values in a date field:

   - -MM-DD - no problem
   - -MM (year and month only) - entered manually, accepted by
   IS_DATE(format=T('%Y-%m')) but the actual field contains -MM-*1. *Where
   "1" is added automatically by w2p.
   -  (year only) - same as above, w2p adds -*1*-*1*

Or alternatively, where MM or DD is unknown, replace with zero:

   - if , then -0-0
   - if YYY-MM, then -MM-0

Right now, I'm simply using a string field with IS_MATCH, but I'm hoping
it's possible to take advantage of the calendar widget.

Regards,


[web2py] Re: Django urls to web2py

2011-11-20 Thread Anthony
In the default.py controller:

def faq():
if len(request.args) > 1:
#perform routine extracting topic0100 and faq0100
#topic0100 will be in request.args(0), and faq0100 will be in 
request.args(1)
else:
#perform default routine

Note, by default, that will give you a url like 
http://www.mysite.com/appname/default/faq/topic0100/faq0100, but you can 
easily remove /appname/default from the URL using routes.py 
(see http://web2py.com/book/default/chapter/04#Parameter-Based-System). In 
routes.py:

routers = dict(
BASE = dict(
default_application = 'appname',
default_controller='default'
),
)

Anthony

On Sunday, November 20, 2011 5:53:50 PM UTC-5, Constantine Vasil wrote:
>
> I have in Django urls these statements:
>
> (r'^faq/$', 'MyView.views.url_help_faq'),
> (r'^faq/(\S*)/(\S*)', 'MyView.views.url_help_faq'),
>
> Which is making possible *MyView.views.url_help_faq*
> to serve the following requests:
>
> http://www.MySite.com/faq   
> http://www.MySite.com/faq/topic0100/faq0100
>
> def url_help_faq(request, topic=None, faq=None):
>
>   if not topic and not faq:
>  #perform default routine
>
>   if topic and faq:
>  #perform routine extracting topic0100 and faq0100
>   
>   return topic, faq
>
> How to make this in web2py?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Re: [web2py] can web2py be used as a static website generator?

2011-11-20 Thread Robert Shaver
But can I put an HTML file in a directory on the server and reach it from 
the web? That's what I think of as a static web page.

For example:
http://mydomain.com/index.html


[web2py] Doc Bug Report on the web2py book

2011-11-20 Thread Robert Shaver
Didn't locate a bug reporting system so I thought I'd just post this here.

On page: http://web2py.com/book/default/chapter/04?search=server

Search for "The view sees every variable". Right after this there is an 
unintentional line break causing this text:

"defined in models and returned by the action but does not see global 
bariables defined in the controller."

to be split out from that bullet. (Also I think "bariables" is supposed to 
be "variables".)

Let me know if there is a better place to post this kind of feedback.




Re: [web2py] can web2py be used as a static website generator?

2011-11-20 Thread Robert Shaver
I'm just starting to read the web2py docs so I'm a complete noob ... 
however this may be the answer:

"Requests for files in the static folder are handled directly and large 
files are automatically streamed to the client."

I found this in the web2py book page at this 
link
.

Hope that helps.


[web2py] Re: Modernizr 2

2011-11-20 Thread Massimo Di Pierro
You can see the version inside the file. If there is a version number
in the actual file, people will have to edit their layout on upgrades.
I choose this for consistency with jquery.js moreover there is not one
modernizer but many custom versions.

On Nov 20, 12:19 pm, Constantine Vasil  wrote:
> I checked how you do it:
> 
> 
>
> It is better to have a version number: *modernizr-1.7.min.j*
> *
> *
> The browser load the .js file in its cache. If you use always
> the same name modernizr.*custom*.js, then there is no way
> for the browser to know there is a new version and there
> is no way you visitors to know that. The  only way the
> visitors to use the new version is to clear their browser cache.
>
> So when downloading from the trunk I always have to modify the
> layout.html.
>
> Please consider this.


[web2py] Re: Django urls to web2py

2011-11-20 Thread Massimo Di Pierro
You can also do keeping the same notation as Django:

#in routes.py
routes_in=[
(r'^faq/$', 'MyView/default/url_help_faq'),
(r'^faq/(?P\S*)/(?P\S*)', '/MyView/default/url_help_faq/$a/
$b'),
]

# in app MyView, in app controller default.py
def url_help_faq():
if len(request.args) == 2:
 
else:
 

On Nov 20, 5:52 pm, Anthony  wrote:
> In the default.py controller:
>
> def faq():
>     if len(request.args) > 1:
>         #perform routine extracting topic0100 and faq0100
>         #topic0100 will be in request.args(0), and faq0100 will be in
> request.args(1)
>     else:
>         #perform default routine
>
> Note, by default, that will give you a url 
> likehttp://www.mysite.com/appname/default/faq/topic0100/faq0100, but you can
> easily remove /appname/default from the URL using routes.py
> (seehttp://web2py.com/book/default/chapter/04#Parameter-Based-System). In
> routes.py:
>
> routers = dict(
>     BASE = dict(
>         default_application = 'appname',
>         default_controller='default'
>     ),
> )
>
> Anthony
>
>
>
>
>
>
>
> On Sunday, November 20, 2011 5:53:50 PM UTC-5, Constantine Vasil wrote:
>
> > I have in Django urls these statements:
>
> >     (r'^faq/$', 'MyView.views.url_help_faq'),
> >     (r'^faq/(\S*)/(\S*)', 'MyView.views.url_help_faq'),
>
> > Which is making possible *MyView.views.url_help_faq*
> > to serve the following requests:
>
> >http://www.MySite.com/faq
> >http://www.MySite.com/faq/topic0100/faq0100
>
> > def url_help_faq(request, topic=None, faq=None):
>
> >   if not topic and not faq:
> >      #perform default routine
>
> >   if topic and faq:
> >      #perform routine extracting topic0100 and faq0100
>
> >   return topic, faq
>
> > How to make this in web2py?


[web2py] Re: Doc Bug Report on the web2py book

2011-11-20 Thread Massimo Di Pierro
Thanks. There is a revised version of the book coming out soon. It is
ok to post about the book here or email me. The new book will have its
own issue tracker.

On Nov 20, 5:53 pm, Robert Shaver  wrote:
> Didn't locate a bug reporting system so I thought I'd just post this here.
>
> On page:http://web2py.com/book/default/chapter/04?search=server
>
> Search for "The view sees every variable". Right after this there is an
> unintentional line break causing this text:
>
> "defined in models and returned by the action but does not see global
> bariables defined in the controller."
>
> to be split out from that bullet. (Also I think "bariables" is supposed to
> be "variables".)
>
> Let me know if there is a better place to post this kind of feedback.


[web2py] Re: Django urls to web2py

2011-11-20 Thread Constantine Vasil
I am just reporting you guys are awesome!

Now will read it ;)


[web2py] Re: Django urls to web2py

2011-11-20 Thread Constantine Vasil
OK I did it, it found "appname"
but could not render it right -
cannot find the stylesheets.


routers = dict(
BASE = dict(
default_application = 'appname',
default_controller='default'
),
)


[web2py] Re: Django urls to web2py

2011-11-20 Thread Constantine Vasil
routes.example.py is working
with also: 

http://web2py.com/book/default/chapter/04

Here is a more complex example that exposes a single app "myapp" without 
unnecessary prefixes but also exposes *admin*, *appadmin* and static:

1.
2.
3.
4.
5.
6.
7.
8.

routes_in = (
  ('/admin/$anything', '/admin/$anything'),
  ('/static/$anything', '/myapp/static/$anything'),
  ('/appadmin/$anything', '/myapp/appadmin/$anything'),
  ('/favicon.ico', '/myapp/static/favicon.ico'),
  ('/robots.txt', '/myapp/static/robots.txt'),




[web2py] Re: Django urls to web2py

2011-11-20 Thread Constantine Vasil
For My App added in routes.py:
http://web2py.com/book/default/chapter/04

routes_in = (
  ('/admin/$anything', '/admin/$anything'),
  ('/static/$anything', '/MyApp/static/$anything'),
  ('/appadmin/$anything', '/MyApp/appadmin/$anything'),
  ('/favicon.ico', '/MyApp/static/favicon.ico'),
  ('/robots.txt', '/MyApp/static/robots.txt'),
  ('/$c/$f/$anything', '/MyApp/$c/$f/$anything'),
  #('/(?P.*)', '/MyApp/\g'),
)

routes_out = (
  ('/admin/$anything', '/admin/$anything'),
  ('/MyApp/static/$anything', '/static/$anything'),
  ('/MyApp/appadmin/$anything', '/appadmin/$anything'),
  ('/MyApp/static/favicon.ico', '/favicon.ico' ),
  ('/MyApp/static/robots.txt', '/robots.txt' ),
  ('/MyApp/$c/$f/$anything', '/$c/$f/$anything'),
  #('/MyApp/\g', '/(?P.*)'),
)

MyApp is the welcome example generated from the wizard.
When I click on Login the link is:
http://192.168.1.66:8000/MyApp/default/user/login?_next=/MyApp/default/index

e.g. MyApp is still in the generated links or in other words cannot get
rid from application prefix.




[web2py] Re: web2py and FirePHP

2011-11-20 Thread Vineet
I can access that link.
You may try to hit the link again.

--- Vineet

On Nov 20, 4:37 pm, Ed Greenberg  wrote:
> I happened upon this old thready from 
> 2009:https://groups.google.com/group/web2py/browse_thread/thread/cc13960a5...
>
> But unfortunately, the link to the code has become 404 and the thread
> has died.
>
> Is anybody using the module that hooks web2py to FirePHP that could
> send me what had previously been found athttp://www.box.com/shared/dtm0dhgze9
>
> Did it work?
>
> Many thanks
>
> Ed Greenberg


[web2py] Can web2py do shared IP hosting

2011-11-20 Thread Robert Shaver
I'm completely new to web2py and so far have only been reading the 
documents to see if it has the features I'm looking for to implement my 
next project. Please let me know if I'm asking the wrong questions or if 
there's anything else I should be considering along with these questions.

Many servers support shared IP hosting. Does web2py support this? (I didn't 
know what to call that feature until I found 
this
.)
Can it also support dedicated IP hosting for multiple web sites? (Each site 
has a unique IP address on the same server.)
Can it also support sub-domains as well? (EXAMPLE: 
http://subdomain.maindomain.com/a/c/f)

This all assumes the DNS is all set up correctly.

I do intend that each of these sites be completely different from the 
others supported on the same server with one instance of web2py.


[web2py] Re: Can web2py do shared IP hosting

2011-11-20 Thread Massimo Di Pierro
web2py is agnostic to it. The question is can you do is securely? That
depends on what the share hosting provides offers you.

what web server?
mod_wsgi?
are you allowed to run long processes under your account?

For example if they allow you to start a long running process in your
account, you can use apache+mod_proxy.
If they provide mod_wsgi than even better.
If they only support php and expect to run web2py as cgi, you can
still run it but I would move somewhere else.

massimo

On Nov 20, 11:49 pm, Robert Shaver  wrote:
> I'm completely new to web2py and so far have only been reading the
> documents to see if it has the features I'm looking for to implement my
> next project. Please let me know if I'm asking the wrong questions or if
> there's anything else I should be considering along with these questions.
>
> Many servers support shared IP hosting. Does web2py support this? (I didn't
> know what to call that feature until I found 
> this
> .)
> Can it also support dedicated IP hosting for multiple web sites? (Each site
> has a unique IP address on the same server.)
> Can it also support sub-domains as well? 
> (EXAMPLE:http://subdomain.maindomain.com/a/c/f)
>
> This all assumes the DNS is all set up correctly.
>
> I do intend that each of these sites be completely different from the
> others supported on the same server with one instance of web2py.


Re: [web2py] Can web2py do shared IP hosting

2011-11-20 Thread Phyo Arkar
Web2py is not a dedicated web server  , web2py is a web framework and yest
web2py runs on every popular server that supports shared hosting (Apache ,
Cherokee,etc,etc,etc)

Its call vhost in server admins world.

On Mon, Nov 21, 2011 at 12:19 PM, Robert Shaver
wrote:

> I'm completely new to web2py and so far have only been reading the
> documents to see if it has the features I'm looking for to implement my
> next project. Please let me know if I'm asking the wrong questions or if
> there's anything else I should be considering along with these questions.
>
> Many servers support shared IP hosting. Does web2py support this? (I
> didn't know what to call that feature until I found 
> this
> .)
> Can it also support dedicated IP hosting for multiple web sites? (Each
> site has a unique IP address on the same server.)
> Can it also support sub-domains as well? (EXAMPLE:
> http://subdomain.maindomain.com/a/c/f)
>
> This all assumes the DNS is all set up correctly.
>
> I do intend that each of these sites be completely different from the
> others supported on the same server with one instance of web2py.
>


[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread pbreit
You might also need to test:

import PIL
import _imaging


[web2py] Re: header detail transaction form in one page

2011-11-20 Thread pbreit
In web2py:

redirect('http://www.web2py.com')

But you're using Web2py all wrong if you do this. Have you read up on how 
Web2py processes forms?

http://web2py.com/book/default/chapter/03#Postbacks
http://web2py.com/book/default/chapter/07


[web2py] Re: web2py on windows 7

2011-11-20 Thread Tom Campbell
I would avoid this by putting Python on the path, then web2py
somewhere outside of Program Files, which I would claim is bad form
anyway. Like a web2py directory off root, maybe? I can post a little
tutorial for a manual Windows install of web2py illustrating this if
you like.


Re: [web2py] Re: header detail transaction form in one page

2011-11-20 Thread steve van christie
thank you so much for your hint, is it possible to use the sqlform and crud
to do header detail form in one page? right now i'm still learning to use
it using standard form.

On Mon, Nov 21, 2011 at 1:27 PM, pbreit  wrote:

> In web2py:
>
> redirect('http://www.web2py.com')
>
> But you're using Web2py all wrong if you do this. Have you read up on how
> Web2py processes forms?
>
> http://web2py.com/book/default/chapter/03#Postbacks
> http://web2py.com/book/default/chapter/07
>


[web2py] Re: Django urls to web2py

2011-11-20 Thread Constantine Vasil
Nothing works as expected with the trunk version after upload to GAE.

Be careful for production environment.