[web2py] Re: custom layout with args

2014-07-03 Thread Massimo Di Pierro
To the views have a {{extend 'layout.html'}} ?

On Thursday, 3 July 2014 17:27:27 UTC-5, Colin Shaw wrote:
>
> I'm sure the answer to this question is trivial, but I couldn't find it 
> anywhere in the documentation!
>
> I'm working on a very simple test application, a simple image blog, 
> clicking on a picture brings up a detail page.
>
> Using args with the url helper appropriately redirects, however the pages 
> generated don't include the same custom layout as the template, leaving the 
> layout broken.
>
> Is there a setting I am missing?
>
> ps. web2py is awesome so far
>

-- 
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: Web2py sessions table does not exist?

2014-07-03 Thread Austin Bart
Ah, apologies. I was a little over-enthusiastic with my deletions.

So I did fake_migrate_all=True, let web2py create the tables, and then 
turned off fake_migrations. However, web2py did not create a 
web2py_session_runestone table file. All the other tables are there, just 
no web2py_session_runestone.table. The sql.log file doesn't refer to it at 
all.

~Cory

On Thursday, July 3, 2014 11:06:59 AM UTC-4, Niphlod wrote:
>
> who said "delete everything" ? :P
>
> now, do a fake_migrate_all=True, let web2py recreate table files, then 
> turn off fake_migrations, then delete ONLY webp2y_session_runestone and 
> retry.
>
> Simone
>
> On Thursday, July 3, 2014 11:30:35 AM UTC+2, Austin Bart wrote:
>>
>> Migrations should be on. I have it enabled through my DAL:
>> db = DAL(settings.database_uri, migrate_enabled=True)
>> And through each individual table:
>> db.define_table('courses', ... migrate='runestone_courses.table')
>> I've emptied the entire databases/ folder of all the .table files.
>>
>> This seems to have made the situation worst, since now I can't read error 
>> tickets - clicking the link opens a new ticket. I've tried getting into my 
>> application's errors/ files, and I see that this line is still in there:
>> Table \'runestone_dev.web2py_session_runestone\' doesn\'t exist
>> The latest error in the admin application's errors/ folder has this line:
>> can't pickle function objects
>>
>> ~Cory
>>
>> On Thursday, July 3, 2014 4:37:22 AM UTC-4, Niphlod wrote:
>>>
>>> did you turn migrations on ?
>>> if yes, please check that there isn't a *web2py_session_runestone*.table 
>>> file into the database/ folder. If there is, delete it and web2py will 
>>> recreate it.
>>>
>>> On Thursday, July 3, 2014 1:44:38 AM UTC+2, Austin Bart wrote:

 Recently after some updates to some of my models, I got this error in 
 web2py.

 Traceback (most recent call last):
   File "/Users/acbart/web2py/gluon/main.py", line 457, in wsgibase
 session._try_store_in_db(request, response)
   File "/Users/acbart/web2py/gluon/globals.py", line 1116, in 
 _try_store_in_db
 record_id = table.insert(**dd)
   File "/Users/acbart/web2py/gluon/dal.py", line 9114, in insert
 ret =  self._db._adapter.insert(self, self._listify(fields))
   File "/Users/acbart/web2py/gluon/dal.py", line 1360, in insert
 raise eProgrammingError: (1146, u"Table 
 'runestone_dev.web2py_session_runestone' doesn't exist")

 My web2py application is named runestone, and the database is named 
 runestone_dev. I've checked the MySQL database and the table doesn't 
 exist. But it is my understanding that this is a table that should be 
 automatically generated for me. Anyone know what gives? It doesn't appear 
 to be a problem with my code...

>>>

-- 
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] custom layout with args

2014-07-03 Thread Colin Shaw
I'm sure the answer to this question is trivial, but I couldn't find it 
anywhere in the documentation!

I'm working on a very simple test application, a simple image blog, 
clicking on a picture brings up a detail page.

Using args with the url helper appropriately redirects, however the pages 
generated don't include the same custom layout as the template, leaving the 
layout broken.

Is there a setting I am missing?

ps. web2py is awesome so far

-- 
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: Ractive.js

2014-07-03 Thread eric cuver
ok thanks a lot massimo !

Le jeudi 3 juillet 2014 16:57:06 UTC+2, Massimo Di Pierro a écrit :
>
> I am using ractive.js with web2py a lot these days. In web2py I set:
>
> response.delimiters = ['<%','%>']
>
> and then I use {{...}} for ractive.
>
>
>
> On Thursday, 3 July 2014 05:21:33 UTC-5, eric cuver wrote:
>>
>> My eyes struck Ractive.js and I want to test it with Web2py. Web2py 
>> however uses also {{ }} as the templating characters. Ractive uses these 
>> characters also. how i Can be done ?
>>
>

-- 
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: Web2py Rocks ... Again :)

2014-07-03 Thread JorgeH
+1 !!

On Thursday, July 3, 2014 6:38:02 AM UTC-5, lyn2py wrote:
>
> Finally, have ironed out all the kinks and sorted out all the errors. Most 
> of them come about because of user-problems (yes, me), because I don't 
> deploy to production often enough to keep up with the versions of all other 
> supporting platforms/software. In addition, my memory sometimes fail me and 
> I run into errors, make mistakes unknowingly and carelessly (Don't work too 
> late! Stop when you are tired!).
>
> If you are planning to deploy to production servers, I just want to 
> reassure you that what works on localhost will work on production servers. 
> Web2py is very reliable! It was a journey of twist and turns, but 
> fortunately I only needed to start over once and it was all ok after that.
>
> And the familiar feeling sets in again… the more I code with Web2py, the 
> more I want to praise it! Web2py ROCKS! Thank you to Massimo and all 
> developers for putting in your time, effort and expertise to make Web2py 
> such a wonderful framework and contribute to this sharing community.
>
> THANK YOU.
>

-- 
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: tip of the day. The power of routes

2014-07-03 Thread Nguyen Minh Tuan
Hi Massimo,

Lyn2py posted above is that issue I met, I post complete script :
(I mark the only one line I changed with red color)

-- routes.py ---
config = '''
site1.com.vn /hhp/default
site2.com.vn /welcome/default
'''

def auto_in(apps):
routes = [
('/admin$anything', '/admin$anything'),
]
for domain, path in [x.strip().split() for x in apps.split('\n') if
x.strip() and not x.strip().startswith('#')]:
if not path.startswith('/'):
path = '/' + path
if path.endswith('/'):
path = path[:-1]
app = path.split('/')[1]
routes += [
('.*:https?://(.*\.)?%s:$method /' % domain, '%s' % path),
('.*:https?://(.*\.)?%s:$method /static/$anything' % domain,
'/%s/static/$anything' % app),
('.*:https?://(.*\.)?%s:$method /appadmin/$anything' % domain,
'/%s/appadmin/$anything' % app),
('.*:https?://(.*\.)?%s:$method /%s/$anything' % (domain, app),
'/%s/$anything' % app)
]
return routes


def auto_out(apps):
routes = []
for domain, path in [x.strip().split() for x in apps.split('\n') if
x.strip() and not x.strip().startswith('#')]:
if not path.startswith('/'):
path = '/' + path
if path.endswith('/'):
path = path[:-1]
app = path.split('/')[1]
routes += [
('/%s/static/$anything' % app, '/static/$anything'),
('/%s/appadmin/$anything' % app, '/appadmin/$anything'),
('/%s/$anything' % path, '/$anything')
]
return routes

routes_in = auto_in(config)
routes_out = auto_out(config)
---

Regards,
Tuan.


On 3 July 2014 21:51, Massimo Di Pierro  wrote:

> There is nothing "default" specific in the script. Something else must be
> the problem.
>
>
> On Thursday, 3 July 2014 07:04:44 UTC-5, lyn2py wrote:
>>
>> I have a question for anyone using this… I realized that it only works
>> for redirects to the functions within default.py. If I setup another
>> controller, it can't route to that controller. Is this the intended
>> behaviour? How can I include other controllers without having to add one
>> controller for every line? Thanks :)
>>
>  --
> 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/8KxcHTRIBWU/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] Re: Web2py Rocks ... Again :)

2014-07-03 Thread samuel bonill

Windows and MAC OSx is no longer a problem with docker ( 
http://www.docker.com/ )

-- 
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: {{=XML(row.contents, sanitize=True)}} and

2014-07-03 Thread Annet
Hi Cliff,

Thanks for your reply. I put the permitted-tags and allowed-attributes 
parameter into a module and
added the tags and attributes I needed to the lists. Problem solved.

Regards,

Annet

-- 
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: Web2py sessions table does not exist?

2014-07-03 Thread Niphlod
who said "delete everything" ? :P

now, do a fake_migrate_all=True, let web2py recreate table files, then turn 
off fake_migrations, then delete ONLY webp2y_session_runestone and retry.

Simone

On Thursday, July 3, 2014 11:30:35 AM UTC+2, Austin Bart wrote:
>
> Migrations should be on. I have it enabled through my DAL:
> db = DAL(settings.database_uri, migrate_enabled=True)
> And through each individual table:
> db.define_table('courses', ... migrate='runestone_courses.table')
> I've emptied the entire databases/ folder of all the .table files.
>
> This seems to have made the situation worst, since now I can't read error 
> tickets - clicking the link opens a new ticket. I've tried getting into my 
> application's errors/ files, and I see that this line is still in there:
> Table \'runestone_dev.web2py_session_runestone\' doesn\'t exist
> The latest error in the admin application's errors/ folder has this line:
> can't pickle function objects
>
> ~Cory
>
> On Thursday, July 3, 2014 4:37:22 AM UTC-4, Niphlod wrote:
>>
>> did you turn migrations on ?
>> if yes, please check that there isn't a *web2py_session_runestone*.table 
>> file into the database/ folder. If there is, delete it and web2py will 
>> recreate it.
>>
>> On Thursday, July 3, 2014 1:44:38 AM UTC+2, Austin Bart wrote:
>>>
>>> Recently after some updates to some of my models, I got this error in 
>>> web2py.
>>>
>>> Traceback (most recent call last):
>>>   File "/Users/acbart/web2py/gluon/main.py", line 457, in wsgibase
>>> session._try_store_in_db(request, response)
>>>   File "/Users/acbart/web2py/gluon/globals.py", line 1116, in 
>>> _try_store_in_db
>>> record_id = table.insert(**dd)
>>>   File "/Users/acbart/web2py/gluon/dal.py", line 9114, in insert
>>> ret =  self._db._adapter.insert(self, self._listify(fields))
>>>   File "/Users/acbart/web2py/gluon/dal.py", line 1360, in insert
>>> raise eProgrammingError: (1146, u"Table 
>>> 'runestone_dev.web2py_session_runestone' doesn't exist")
>>>
>>> My web2py application is named runestone, and the database is named 
>>> runestone_dev. I've checked the MySQL database and the table doesn't 
>>> exist. But it is my understanding that this is a table that should be 
>>> automatically generated for me. Anyone know what gives? It doesn't appear 
>>> to be a problem with my code...
>>>
>>

-- 
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: can we make E-commerce web portal in web2py for multiple users and hits.

2014-07-03 Thread Massimo Di Pierro
The concept of "simultaneous" in a web application does not mean much. You 
should be able to quantity the number of http request per second, the 
number of dynamic http requests per second, and the number of database 
queries per second (per category).

One web2py instance can handle ~50 dynamic https requests if the database 
is not too heavy. If you need more you clone the distance behind a load 
balancer. This is how all web applications scale.

The real problem is usually the database bottleneck. Nothing web2py 
specific there. All web applications have a database bottleneck. You need 
to write your queries properly and use caching.

The particular step of accepting credit card payments is usually outsource 
(Stripe.com, Paypal.com, or similar) and therefore it does not provide a 
particular burden to application workload.

Massimo


On Tuesday, 1 July 2014 04:40:15 UTC-5, kanchan wrote:
>
> I have to develop a ecommerce software with payment gateway also in 
> web2py. In this more than 500 users can use and hit it  simulataneously . 
> My query is that will software speed decrease on multiple user hits or 
> web2py will not comfortable  for this .  
>

-- 
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: How can I import an existing database to my db.py model?

2014-07-03 Thread Massimo Di Pierro
You should be able from the shell to do:

db = DAL('myql:')
db.executesql(open('./database.sql').read())

assuming the file is not too big and fits in ram.

On Thursday, 3 July 2014 08:08:55 UTC-5, Gideon George wrote:
>
>
> I have successfully changed the default sqlite connection to mysql. Now I 
> want to import an exported file (database.sql) which is an existing 
> database. I need help on how I can do this please
>

-- 
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: Ractive.js

2014-07-03 Thread Massimo Di Pierro
I am using ractive.js with web2py a lot these days. In web2py I set:

response.delimiters = ['<%','%>']

and then I use {{...}} for ractive.



On Thursday, 3 July 2014 05:21:33 UTC-5, eric cuver wrote:
>
> My eyes struck Ractive.js and I want to test it with Web2py. Web2py 
> however uses also {{ }} as the templating characters. Ractive uses these 
> characters also. how i Can be done ?
>

-- 
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: create an update page (similar to profile page in default application)

2014-07-03 Thread Massimo Di Pierro
I am not sure about what you are doing. Why do you have one form per row 
that does not submit any data other than a hidden field with id? What is 
the purpose of that submission?






On Thursday, 3 July 2014 05:03:19 UTC-5, Shubham Jain wrote:
>
> And I didn't understand why should I pass the 'pro_id' by GET and not by 
> POST. This is the view from where I am passing the parameter (using POST)
>
> {{for row in rows:}}
> 
>   {{=x}}{{x=x+1}}
> {{=row.product_id}}
> 
> 
> 
> 
> 
> {{pass}}
>
>  Please tell me if I am wrong somewhere.
>
> Mind that the pid of the product you want to edit should not be a POST 
>> parameter but a GET parameter. According to REST it is used to identify the 
>> resource you want to edit therefore it belongs to the URL not to the posted 
>> data.
>>
>> Massimo
>>
>>
>>
>> On Wednesday, 2 July 2014 06:05:31 UTC-5, Shubham Jain wrote:
>>>
>>> I want to create an update page just like profile page in default 
>>> application. Actually I am passing the primary key of a table by a button 
>>> click to the product_update page. In the controller of the update page I 
>>> tried these 2 codes.
>>>
>>> def product_edit():
>>> db.products.product_id.writable=FALSE   # to make product_id 
>>> non editable
>>> db.products.product_id.readable=TRUE
>>> testform = 
>>> SQLFORM(db.products,db(db.products.product_id==request.post_vars.pid).select(),
>>>  fields=['product_id','price','pro_type','tags','category','description']))
>>> return dict(form=testform)
>>>
>>>   
>>>  
>>> --OR-
>>>
>>> dform = 
>>> SQLFORM(db.products,record=db(db.products.product_id==request.post_vars.pid).select(),
>>>  
>>> fields=['product_id','price','pro_type','tags','category','description'])
>>> return dict(form=dform)
>>>
>>>   pid - name of the input which has the product_id.
>>> But these don't work.
>>>
>>> Error Generated: TypeError: list indices must be integers, not str
>>>
>>>

-- 
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] How can I import an existing database to my db.py model?

2014-07-03 Thread Gideon George

I have successfully changed the default sqlite connection to mysql. Now I 
want to import an exported file (database.sql) which is an existing 
database. I need help on how I can do this please

-- 
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] CAS not working

2014-07-03 Thread Giacomo Dorigo
Hello,
I have a problem in using the web2py CAS service.

I have created a cas_provider and a cas_client.
I have accessed to cas_client
/cas_client
from here went to 
/cas_client/default/user/login?_next=/cas_client/default/index
and been redirected to 
/cas_provider/default/user/cas/login?service=https://.../cas_client/default/user/login
from here I went to the cas_provider page for registering and I have 
registered.

in the cas_provider database both auth_user and auth_cas have been 
populated.
Login and logout in cas_provider gives no problem.

But when I try to login or logout in cas_client I get an EOFError.
And auth_user in cas_client has not been populated.

I am not sure if it is related but also when I try to call directly 
/cas_client/default/user/register
I get a 404.

Thanks for help,
Giacomo

-- 
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: Importing an already existing MySQL database

2014-07-03 Thread Gideon George
Please how can I use the script? I mean, where will I save the script? 
anywhere online where I can just download it instead of copy & paste?

On Wednesday, 15 July 2009 00:09:20 UTC+1, Boriel wrote:
>
> Hi,
>
> I'm rather new to web2py, but I think this script might be helpful to 
> others.
> I've created a little python script that will automatically dump on
> the screen the creation of an already existing mysql database to be
> ready to use with web2py.
>
> So, for example, if you have already created a MySQL db called
> "mybooks" and want to import it to web2py, just type:
> mysqltoweb2py.py mybooks  
>
> And it will dump on the screen the orders needed to be copied in the db.py 
> file.
> This is the script:
>
> = 8< == 8< == 8< ==
> #!/usr/bin/env python
> # -*- coding: utf-8 -*-
> '''
> mysqltoweb2py --> Import an already existing MySQL Database
> into web2py.
>
> Usage:
> mysqltoweb2py.py   
> '''
>
> import sys
> import re
> import MySQLdb
>
> reFieldType = re.compile(r'([a-zA-Z]+)([(]\d+[)])?')
> reLetter = re.compile('[a-zA-Z]')
>
>
> datab = sys.argv[1]
> user = sys.argv[2]
> passwd = sys.argv[3]
>
> db=MySQLdb.connect(host='localhost',user=user, passwd = passwd, db = datab)
>
>
> def error_msg(msg):
> ''' This could be implemented as an exception
> '''
> sys.stderr.write("%s\n" % msg)
> sys.exit(1)
>
>
> def output_table(table):
> cursor=db.cursor()
> cursor.execute('show columns from `%s`' % table)
>
> print "db.define_table('%s'," % table
> # Extract table fields
> for field in cursor.fetchall():
> if field[0] == 'id':
> continue # id field ignored
>
> if not reLetter.match(field[0][0]):
> error_msg("Error: field name [%s] in table [%s] does not
> begin with a letter" % (field[0], table))
>
> ftype = reFieldType.match(field[1])
> if not ftype:
> error_msg("Error: could not parse column type")
>
> _type, _len = tuple(ftype.groups())
> if _type == 'varchar':
> _type = 'string'
> elif _type in ('int', 'tinyint'):
> _type = 'integer'
>
> print "\tSQLField('%s'," % field[0],
> print "type = '%s'" % _type,
> if _len is not None: # Has a length?
> print ", length = %i" % int(_len[1:-1]),
> print "),"
>
> print "\tmigrate = False)"
>
>
> cursor = db.cursor()
> cursor.execute('show tables')
> for table in cursor.fetchall():
> print
> output_table(table[0])
> === 8< == 8< == 8< ==
>
> Many things to be done:
>
> 1) Fieldnames starting with "_" are not allowed by web2py (but MySQL
> allows it). An error is printed
> 2) Some field types do not exist in web2py (e.g. tinyint) so an
> equivalent is used.
>
> Regards,
> J.
>
> -- 
> Boriel  http://www.boriel.com
>
>

-- 
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] Ractive.js

2014-07-03 Thread eric cuver
My eyes struck Ractive.js and I want to test it with Web2py. Web2py however 
uses also {{ }} as the templating characters. Ractive uses these characters 
also. how i Can be done ?

-- 
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: Web2py sessions table does not exist?

2014-07-03 Thread Austin Bart
Migrations should be on. I have it enabled through my DAL:
db = DAL(settings.database_uri, migrate_enabled=True)
And through each individual table:
db.define_table('courses', ... migrate='runestone_courses.table')
I've emptied the entire databases/ folder of all the .table files.

This seems to have made the situation worst, since now I can't read error 
tickets - clicking the link opens a new ticket. I've tried getting into my 
application's errors/ files, and I see that this line is still in there:
Table \'runestone_dev.web2py_session_runestone\' doesn\'t exist
The latest error in the admin application's errors/ folder has this line:
can't pickle function objects

~Cory

On Thursday, July 3, 2014 4:37:22 AM UTC-4, Niphlod wrote:
>
> did you turn migrations on ?
> if yes, please check that there isn't a *web2py_session_runestone*.table 
> file into the database/ folder. If there is, delete it and web2py will 
> recreate it.
>
> On Thursday, July 3, 2014 1:44:38 AM UTC+2, Austin Bart wrote:
>>
>> Recently after some updates to some of my models, I got this error in 
>> web2py.
>>
>> Traceback (most recent call last):
>>   File "/Users/acbart/web2py/gluon/main.py", line 457, in wsgibase
>> session._try_store_in_db(request, response)
>>   File "/Users/acbart/web2py/gluon/globals.py", line 1116, in 
>> _try_store_in_db
>> record_id = table.insert(**dd)
>>   File "/Users/acbart/web2py/gluon/dal.py", line 9114, in insert
>> ret =  self._db._adapter.insert(self, self._listify(fields))
>>   File "/Users/acbart/web2py/gluon/dal.py", line 1360, in insert
>> raise eProgrammingError: (1146, u"Table 
>> 'runestone_dev.web2py_session_runestone' doesn't exist")
>>
>> My web2py application is named runestone, and the database is named 
>> runestone_dev. I've checked the MySQL database and the table doesn't 
>> exist. But it is my understanding that this is a table that should be 
>> automatically generated for me. Anyone know what gives? It doesn't appear 
>> to be a problem with my code...
>>
>

-- 
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] How to choose a subcategory to create a post

2014-07-03 Thread Капылов Данил
1) Post created in a particular category. - 
http://hostname/app/default/created_ad/

2)The category tied subcategories.

How to make that SQLFORM display only radio button of equal sub categories. 
Not show subcategories not belong to this category.




def get_category():
category_url_name = request.args(0)
category = db.category(url_name=category_url_name)
if not category:
session.flash = 'page not fount'
redirect(URL('index'))
return category

def created_ad():
category = get_category()
db.ad_post.category.default = category.id
   * form = SQLFORM(db.ad_post).process(next='view_post/[id]')*
return locals()


db.define_table('ad_post',
Field('category', 'reference category'),
   * Field('subcategory', 'reference subcategory', 
widget=SQLFORM.widgets.radio.widget,*
*  requires=IS_IN_DB(db, db.subcategory.id, 
label='db.category.name')),*
Field('title', type='string', requires=IS_NOT_EMPTY()),
Field('body', type='text', requires=IS_NOT_EMPTY()),
auth.signature
)

-- 
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: create an update page (similar to profile page in default application)

2014-07-03 Thread Shubham Jain
Ok, I got it. Yes,there is only one record for one pro_id.
The 2nd one works, but now a new problem arises. I am getting the record 
that I want to edit, but on submitting it, a new blank form is 
generated(which is undesired). When I submit this form with dummy values, 
this form is getting inserted into the db but the changes/update I made on 
the record are not replicated to the db.


On Wednesday, July 2, 2014 7:31:29 PM UTC+5:30, Massimo Di Pierro wrote:
>
> The problem is that here:
>
> testform = 
> SQLFORM(db.products,db(db.products.product_id==request.post_vars.pid).select(),
>  fields=['product_id','price','pro_type','tags','category','description']))
>
> the result of a select is a Rows and not a Row. Do you know there is a 
> single matching record? In this case:
>
> testform = 
> SQLFORM(db.products,db(db.products.product_id==request.post_vars.pid).select().first(),
>  fields=['product_id','price','pro_type','tags','category','description']))
>
> or
>
> testform = SQLFORM(db.products, 
> db.products(product_id=request.post_vars.pid), 
> fields=['product_id','price','pro_type','tags','category','description']))
>
> Mind that the pid of the product you want to edit should not be a POST 
> parameter but a GET parameter. According to REST it is used to identify the 
> resource you want to edit therefore it belongs to the URL not to the posted 
> data.
>
> Massimo
>
>
>
> On Wednesday, 2 July 2014 06:05:31 UTC-5, Shubham Jain wrote:
>>
>> I want to create an update page just like profile page in default 
>> application. Actually I am passing the primary key of a table by a button 
>> click to the product_update page. In the controller of the update page I 
>> tried these 2 codes.
>>
>> def product_edit():
>> db.products.product_id.writable=FALSE   # to make product_id 
>> non editable
>> db.products.product_id.readable=TRUE
>> testform = 
>> SQLFORM(db.products,db(db.products.product_id==request.post_vars.pid).select(),
>>  fields=['product_id','price','pro_type','tags','category','description']))
>> return dict(form=testform)
>>
>>   
>>  
>> --OR-
>>
>> dform = 
>> SQLFORM(db.products,record=db(db.products.product_id==request.post_vars.pid).select(),
>>  
>> fields=['product_id','price','pro_type','tags','category','description'])
>> return dict(form=dform)
>>
>>   pid - name of the input which has the product_id.
>> But these don't work.
>>
>> Error Generated: TypeError: list indices must be integers, not str
>>
>>

-- 
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: create an update page (similar to profile page in default application)

2014-07-03 Thread Shubham Jain
And I didn't understand why should I pass the 'pro_id' by GET and not by 
POST. This is the view from where I am passing the parameter (using POST)

{{for row in rows:}}

  {{=x}}{{x=x+1}}
{{=row.product_id}}





{{pass}}

 Please tell me if I am wrong somewhere.

Mind that the pid of the product you want to edit should not be a POST 
> parameter but a GET parameter. According to REST it is used to identify the 
> resource you want to edit therefore it belongs to the URL not to the posted 
> data.
>
> Massimo
>
>
>
> On Wednesday, 2 July 2014 06:05:31 UTC-5, Shubham Jain wrote:
>>
>> I want to create an update page just like profile page in default 
>> application. Actually I am passing the primary key of a table by a button 
>> click to the product_update page. In the controller of the update page I 
>> tried these 2 codes.
>>
>> def product_edit():
>> db.products.product_id.writable=FALSE   # to make product_id 
>> non editable
>> db.products.product_id.readable=TRUE
>> testform = 
>> SQLFORM(db.products,db(db.products.product_id==request.post_vars.pid).select(),
>>  fields=['product_id','price','pro_type','tags','category','description']))
>> return dict(form=testform)
>>
>>   
>>  
>> --OR-
>>
>> dform = 
>> SQLFORM(db.products,record=db(db.products.product_id==request.post_vars.pid).select(),
>>  
>> fields=['product_id','price','pro_type','tags','category','description'])
>> return dict(form=dform)
>>
>>   pid - name of the input which has the product_id.
>> But these don't work.
>>
>> Error Generated: TypeError: list indices must be integers, not str
>>
>>

-- 
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: tip of the day. The power of routes

2014-07-03 Thread Massimo Di Pierro
There is nothing "default" specific in the script. Something else must be 
the problem.

On Thursday, 3 July 2014 07:04:44 UTC-5, lyn2py wrote:
>
> I have a question for anyone using this… I realized that it only works for 
> redirects to the functions within default.py. If I setup another 
> controller, it can't route to that controller. Is this the intended 
> behaviour? How can I include other controllers without having to add one 
> controller for every line? Thanks :)
>

-- 
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] Web2py Rocks ... Again :)

2014-07-03 Thread Vinicius Assef
On Thu, Jul 3, 2014 at 8:38 AM, lyn2py  wrote:
>
> If you are planning to deploy to production servers, I just want to reassure
> you that what works on localhost will work on production servers.

Not always. Be careful, specially if you use Windows or MacOS and have
mixed case file or directory names.

You must keep in mind Linux/Unix filesystem are case sensitive and
Windows/MacOS are not. So, a tip is never use mixed case for files or
directories.

The best approach is to have parity between dev and production envs.
To achieve that, use a VM (i.e, Virtualbox + Vagrant) with same OS
version as your production server as staging before deploying to
production.

>
> Thank you to Massimo and all
> developers for putting in your time, effort and expertise to make Web2py
> such a wonderful framework and contribute to this sharing community.

+1

-- 
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: response.js does not load div

2014-07-03 Thread Anthony
On Thursday, July 3, 2014 7:56:39 AM UTC-4, Richard wrote:
>
> Now I encounter a difference between a LOAD and a link like the following:
>
> {{=A(T("Add " + session.im_labels['vpu']) 
> ,_href=URL('internal','add_entity.load', vars=dict(com=com, sif=sif)), 
> ajax=True, cid='internal_data_div') }}
>

Note, "ajax" is not an argument of A(), so will be ignored.
 

> I assume this link is equal to {{=LOAD('internal','add_entity.load', 
> vars=dict(com=com, sif=sif)), ajax=True, cid='internal_data_div') }}
>

Note, "cid" is not an argument of LOAD(), so will be ignored, and instead, 
a random target id will be created as the cid.
 

> But a form acceptance defined in this add_entity form does not react on 
> the response.js
>
> if form_add_entity.process(form_name='add_entity').accepted:
>  response.js= '$web2py.component("%s", target="navigation_div");' % 
> URL('default', 'navigation.load')
>

Can you confirm that the form is being processed and accepted? Does the 
returned Ajax response include a "web2py-component-command" header with 
that JS code?

Anthony

-- 
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: tip of the day. The power of routes

2014-07-03 Thread lyn2py
I have a question for anyone using this… I realized that it only works for 
redirects to the functions within default.py. If I setup another 
controller, it can't route to that controller. Is this the intended 
behaviour? How can I include other controllers without having to add one 
controller for every line? Thanks :)

-- 
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: response.js does not load div

2014-07-03 Thread Richard
Now I encounter a difference between a LOAD and a link like the following:

{{=A(T("Add " + session.im_labels['vpu']) 
,_href=URL('internal','add_entity.load', vars=dict(com=com, sif=sif)), 
ajax=True, cid='internal_data_div') }}

I assume this link is equal to {{=LOAD('internal','add_entity.load', 
vars=dict(com=com, sif=sif)), ajax=True, cid='internal_data_div') }}

But a form acceptance defined in this add_entity form does not react on the 
response.js

if form_add_entity.process(form_name='add_entity').accepted:
 response.js= '$web2py.component("%s", target="navigation_div");' % 
URL('default', 'navigation.load')

In other words I want to load a component bij accepting a form in another 
component. These components are part of index.html.
The conditional load Anthony suggested will not work now because index.html 
is not rendered.

Richard

On Monday, June 30, 2014 8:17:45 PM UTC+2, Richard wrote:
>
> Anthony,
>
> Thank you for the clu: an ajax call is needed, I tried without, just 
> pushing javascript and HTML to the view.
>
> Regards,
> Richard
>
> On Monday, June 30, 2014 4:43:06 PM UTC+2, Anthony wrote:
>>
>> Note, response.js only works with Ajax requests, so it will have no 
>> effect in this case. Instead, just use the LOAD helper, and include it 
>> conditionally in the view:
>>
>> In views/default/index.html:
>>
>> {{if form.accepted:}}
>> {{=LOAD('default', 'graph1.load', ajax=True)}}
>> {{pass}}
>>
>> Anthony
>>
>> On Monday, June 30, 2014 8:23:53 AM UTC-4, Richard wrote:
>>>
>>>
>>> Dear web2py colleague,
>>>
>>> I am struggling with the response.js in order to load a component.
>>>
>>> Loading a component through {{=LOAD}} works fine.
>>> We want to load that component after accepting and processing a form. So 
>>> i put a named div in the view and let response.js do the loading by the 
>>> form processing.
>>>
>>> controller:
>>>
>>> def index():
>>> if form.process().accepted:
>>>   response.js = '$.web2py.component("%s", target="graph1");' % 
>>> URL('default', 'graph1.load')
>>>
>>> index.html:
>>>
>>>  
>>>  
>>>
>>> Besides this simplifying the case looks that my app does not listen to 
>>> response.js because just adding the following line does not add the 
>>> specified HTML tot the div with id location1:
>>>
>>>   response.js = '$.( "#graph1" ).append( "Test" );'
>>>
>>>
>>> Sorry for being inpatient because this question is repeated from this 
>>> tread
>>> https://groups.google.com/forum/#!topic/web2py/nbOpM-0_QvA
>>> but this is standard web2py.
>>>
>>> Thank you for the support.
>>>
>>

-- 
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] Web2py Rocks ... Again :)

2014-07-03 Thread Adnan Smajlovic
+1


On Thu, Jul 3, 2014 at 7:40 AM, Carlos Costa 
wrote:

> +1
>
>
>

-- 
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] Web2py Rocks ... Again :)

2014-07-03 Thread Carlos Costa
+1


2014-07-03 8:38 GMT-03:00 lyn2py :

> Finally, have ironed out all the kinks and sorted out all the errors. Most
> of them come about because of user-problems (yes, me), because I don't
> deploy to production often enough to keep up with the versions of all other
> supporting platforms/software. In addition, my memory sometimes fail me and
> I run into errors, make mistakes unknowingly and carelessly (Don't work too
> late! Stop when you are tired!).
>
> If you are planning to deploy to production servers, I just want to
> reassure you that what works on localhost will work on production servers.
> Web2py is very reliable! It was a journey of twist and turns, but
> fortunately I only needed to start over once and it was all ok after that.
>
> And the familiar feeling sets in again... the more I code with Web2py, the
> more I want to praise it! Web2py ROCKS! Thank you to Massimo and all
> developers for putting in your time, effort and expertise to make Web2py
> such a wonderful framework and contribute to this sharing community.
>
> THANK YOU.
>
> --
> 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.
>



-- 
Att.

Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom
<º))><

-- 
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] Web2py Rocks ... Again :)

2014-07-03 Thread lyn2py
Finally, have ironed out all the kinks and sorted out all the errors. Most 
of them come about because of user-problems (yes, me), because I don't 
deploy to production often enough to keep up with the versions of all other 
supporting platforms/software. In addition, my memory sometimes fail me and 
I run into errors, make mistakes unknowingly and carelessly (Don't work too 
late! Stop when you are tired!).

If you are planning to deploy to production servers, I just want to 
reassure you that what works on localhost will work on production servers. 
Web2py is very reliable! It was a journey of twist and turns, but 
fortunately I only needed to start over once and it was all ok after that.

And the familiar feeling sets in again… the more I code with Web2py, the 
more I want to praise it! Web2py ROCKS! Thank you to Massimo and all 
developers for putting in your time, effort and expertise to make Web2py 
such a wonderful framework and contribute to this sharing community.

THANK YOU.

-- 
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: Brainstorming

2014-07-03 Thread Mirek Zvolský
Here is a project which lists and compares a little javascript frameworks:
todomvc.com






Dne neděle, 15. června 2014 10:34:25 UTC+2 Massimo Di Pierro napsal(a):
>
> Often Angular comes up on this list. I tried it and I was un-impressed. 
> Instead today my favorite client-side stack is based on these:
>
> - jquery.js
> - sugar.js
> - ractive.js
> - semantic-ui (css & js)
>
> Have you tried sugar, ractive, and semantic-ui? What is your opinion?
>
> Massimo
>
>
>
>
>

-- 
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: Web2py sessions table does not exist?

2014-07-03 Thread Niphlod
did you turn migrations on ?
if yes, please check that there isn't a *web2py_session_runestone*.table 
file into the database/ folder. If there is, delete it and web2py will 
recreate it.

On Thursday, July 3, 2014 1:44:38 AM UTC+2, Austin Bart wrote:
>
> Recently after some updates to some of my models, I got this error in 
> web2py.
>
> Traceback (most recent call last):
>   File "/Users/acbart/web2py/gluon/main.py", line 457, in wsgibase
> session._try_store_in_db(request, response)
>   File "/Users/acbart/web2py/gluon/globals.py", line 1116, in _try_store_in_db
> record_id = table.insert(**dd)
>   File "/Users/acbart/web2py/gluon/dal.py", line 9114, in insert
> ret =  self._db._adapter.insert(self, self._listify(fields))
>   File "/Users/acbart/web2py/gluon/dal.py", line 1360, in insert
> raise eProgrammingError: (1146, u"Table 
> 'runestone_dev.web2py_session_runestone' doesn't exist")
>
> My web2py application is named runestone, and the database is named 
> runestone_dev. I've checked the MySQL database and the table doesn't 
> exist. But it is my understanding that this is a table that should be 
> automatically generated for me. Anyone know what gives? It doesn't appear 
> to be a problem with my code...
>

-- 
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: SQLEDITABLE plugin

2014-07-03 Thread 'kato' via web2py-users
Hi all.

Thank you for your quick reply.

kato

2014年7月1日火曜日 20時35分06秒 UTC-3 JorgeH:
>
>
> Cool!!
>
> Great work
>
> On Tuesday, July 1, 2014 8:12:29 AM UTC-5, kato wrote:
>>
>> Hi.
>>
>> I tried to make SQLEDITABLE plugin.
>>
>> demo-page: http://docs1.erp2py.com/sqleditable/demo/demo_en.html
>>
>> It is similar as gluon/contrib/spreadsheet. But, it is easy to use more.
>> If you are interested, please try.
>>
>> Thanks.
>>
>

-- 
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] How to conclude posts on one page sorted by creation date in separate blocks.

2014-07-03 Thread Капылов Данил
hello 

How to conclude posts on one page sorted by creation date in separate 
blocks. 

Example: unit - Today, the unit - This week, block - Long

-- 
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] Updating database outside web2py

2014-07-03 Thread Mayank Kumar
Hi,
I am working on a project where I need to update the website database 
outside web2py, i mean outside an standard HTTP request. For example, I 
have another server where TCP request comes, and I need to update one table 
in the database. Also, I have views defined inside web2py which prints out 
entry from the same tables. 

I am planning to use DAL for the database access outside web2py 
(http://www.web2py.com/AlterEgo/default/show/215). But, I am curious  - 
What sort additional of care should I take while coding this as write 
(outside web2py) and read (in some views of the website) can happen 
simultaneously. 

Thanks

-- 
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] Web2py sessions table does not exist?

2014-07-03 Thread Austin Bart


Recently after some updates to some of my models, I got this error in 
web2py.

Traceback (most recent call last):
  File "/Users/acbart/web2py/gluon/main.py", line 457, in wsgibase
session._try_store_in_db(request, response)
  File "/Users/acbart/web2py/gluon/globals.py", line 1116, in _try_store_in_db
record_id = table.insert(**dd)
  File "/Users/acbart/web2py/gluon/dal.py", line 9114, in insert
ret =  self._db._adapter.insert(self, self._listify(fields))
  File "/Users/acbart/web2py/gluon/dal.py", line 1360, in insert
raise eProgrammingError: (1146, u"Table 
'runestone_dev.web2py_session_runestone' doesn't exist")

My web2py application is named runestone, and the database is named 
runestone_dev. I've checked the MySQL database and the table doesn't exist. 
But it is my understanding that this is a table that should be 
automatically generated for me. Anyone know what gives? It doesn't appear 
to be a problem with my code...

-- 
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.