[web2py] Re: always https

2015-08-10 Thread Paolo Amboni
OK I'm waiting for a free certificate. But what i can't understand is why all the site is https not only the admin interface. I will study all the deployment chapter of the book to find some clues and how to use the new certificate. Thanks. Il giorno lunedì 10 agosto 2015 02:56:39 UTC+2, Anthon

Re: [web2py] Re: always https

2015-08-10 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 El 10/08/15 a las 10:11, Paolo Amboni escribió: > OK I'm waiting for a free certificate. > > But what i can't understand is why all the site is https not only the admin interface. I told you, some web2py contributor it was best to do it that way in

Re: [web2py] Re: always https

2015-08-10 Thread Paolo Amboni
OK now is much more clear. If i replace the apache configuration file with the one that i find on the book i can have https on admin interface only? I got a certificate from startssl but i really can't find a way to export or generate the server.crt and server.key files. My knowledge is not tha

Re: [web2py] Re: always https

2015-08-10 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 El 10/08/15 a las 10:57, Paolo Amboni escribió: > OK now is much more clear. > If i replace the apache configuration file with the one that i find on the book i can have https on admin interface only? Yes, apache will forward both http and https t

Re: [web2py] SQLFORM with external references

2015-08-10 Thread Massimiliano
You have to use requires in field definition. Something like: db.define_table('yourtable', Field('title','string'), Field('scheda', 'reference db.scheda', requires=IS_IN_DB(db, db.scheda.scheda, zero='Select...') ) Take a look here: http://www.web2py.com/books/def

[web2py] Re: The mobile device error

2015-08-10 Thread forumweb2py
The TicketFile: S'Traceback (most recent call last):\n File "/.../Desktop/web2py/gluon/restricted.py", line 227, in restricted\nexec ccode in environment\n File "/.../Desktop/web2py/applications/Daten/views/default/index.html", line 73, in \n File "/.../Desktop/web2py/gluon/globals.py",

Re: [web2py] Re: When will we have a "proper" forum ?

2015-08-10 Thread Richard Vézina
+1 Limedrop Do you think to something like the Mercurial book? http://hgbook.red-bean.com/read/how-did-we-get-here.html I saw side comments after... Richard On Thu, Aug 6, 2015 at 5:07 PM, Limedrop wrote: > The first step would be to add it to the web2py roadmap :-) I don't know > enough

[web2py] Software Testing

2015-08-10 Thread alexielgrace
I would like to know, if someone of you know something about Software Testing with web2py, how to test systems created with it. To test model / view / controller, the information in the database, test JavaScript, etc. In the reference manual of the framework, I found some information to do func

[web2py] db query that returns a list of field values

2015-08-10 Thread Jose W
Hello, I am new to Web2py and I am running into an issue with making a query to the DB, and returning a list of the filed values. Relevant Info: DB "db(db.websites).select(db.websites.URL)": websites.URL http://www.example.com http://www.example.com http://www.example.com http://www.ex

[web2py] Hidden fields are not read from the database

2015-08-10 Thread icodk
I need to represent field_1 dynamically base on another field (field_2) that should not be visible to the user in a smartgrid. However if I set db.table1.field_2.writable=db.table1.field_2.readable=False in order to hide it, then my row parameter to the lambda function of the represent settings

[web2py] Scheduler - import models

2015-08-10 Thread Peter Gastinger
Hi, I was wondering whether it is possible to import models when using the scheduler? I have a couple of scheduler tasks, one of them is created a textfile which takes a couple of minutes. Scheduling this was pretty easy. After the file is created, I want to send a mail with it as attachment t

[web2py] Re: sessions piling up

2015-08-10 Thread Massimo Di Pierro
You seem to have an old version of session2strash.py. The new one only uses self.expiration and not expiration. On Sunday, 9 August 2015 10:15:57 UTC-5, Bob St John wrote: > > Using 2.12.1 > > I run a small site... about 200 members who login (some using the > 'Remember me for 30 days') plus abo

[web2py] Re: Appconfig cast boolean

2015-08-10 Thread Massimo Di Pierro
That that should be correct. On Sunday, 9 August 2015 11:26:36 UTC-5, Mark Graves wrote: > > And, sanity check here, I can also do the following, correct: > > [db] > > uri = sqlite://storage.sqlite > migrate = > > myconf = AppConfig() > > mc = myconf.take('db.migrate',cast=bool) > > pri

[web2py] Re: Routes.py - Remove Application prefix

2015-08-10 Thread Massimo Di Pierro
yes but after some though the jammer is a fun example but not a really useful one. Yes you would send lots of crap to the client but you will also keep your own sever busy doing so. On Sunday, 9 August 2015 15:40:45 UTC-5, Jordan Ladora wrote: > > I was wondering how to also incorporate routing

[web2py] Re: Scheduler - import models

2015-08-10 Thread Massimo Di Pierro
The scheduler always sees models. It is executed in the same context as a controller. Then you can use import to import anything else you need. On Monday, 10 August 2015 10:39:37 UTC-5, Peter Gastinger wrote: > > Hi, > > I was wondering whether it is possible to import models when using the > s

[web2py] Re: db query that returns a list of field values

2015-08-10 Thread Massimo Di Pierro
yes a Row (a record is a dictionary) but you can do: def make_run(): siteList = [] rows = db(db.websites).select(db.websites.URL).as_list() for row in rows: siteList.append(row.URL) return locals() or def make_run(): rows = db(db.websites).select(db.websites.URL).as_l

Re: [web2py] Software Testing

2015-08-10 Thread Richard Vézina
See web2py.test and welcome_augmented : https://github.com/viniciusban/web2py.test https://github.com/niphlod/welcome_augmented Richard On Sun, Aug 9, 2015 at 4:44 PM, wrote: > I would like to know, if someone of you know something about Software > Testing with web2py, how to test systems cre

[web2py] SQLFORM.grid different classes for add and edit forms

2015-08-10 Thread Najtsirk
Hello, is it possible to assign different classes for add and edit forms in SQLFORM.grid? A this point there is no difference between them so I cannot use proper CSS selectors for JS. Best, Najtsirk -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.co

Re: [web2py] Software Testing

2015-08-10 Thread alexielgrace
Thanks Richard Alexiel Em segunda-feira, 10 de agosto de 2015 13:14:01 UTC-3, Richard escreveu: > > See web2py.test and welcome_augmented : > > https://github.com/viniciusban/web2py.test > > https://github.com/niphlod/welcome_augmented > > Richard > > On Sun, Aug 9, 2015 at 4:44 PM, > wrote: > >>

[web2py] Re: Code organization help

2015-08-10 Thread David Ripplinger
Here's an update after I learned some more: It looks like I can have the best of both worlds, since web2py has routers that can translate between a public URL and a back-end URL (see the subsection titled URL Rewrite in the b

[web2py] Problems with the shell

2015-08-10 Thread Martin Weissenboeck
On my testserver I made an update to 2.12.2 and tried the Shell At first a test in 2.9.12: print "1" print "2" The result (as expected): *web2py Shell 2.9.12-stable+timestamp.2015.01.17.06.11.03In [1] : print "1"1In [2] : print 11* --

[web2py] can a filename be suggested in a custom Exporter class for a SQLFORM.grid?

2015-08-10 Thread Yoel Benitez Fonseca
In sqlhtml.py: class ExportClass(object): label = None file_ext = None content_type = None def __init__(self, rows): self.rows = rows ... Is there a way to suggest a filename to the client ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - ht

[web2py] Re: SQLFORM.grid different classes for add and edit forms

2015-08-10 Thread Yoel Benitez Fonseca
you can tell when u are editing or creating by the args passed in request.args, for example in the view: {{if 'edit' in request.args:}} // do something {{elif 'new' in request.args:}} // do other thing {{pass}} El lunes, 10 de agosto de 2015, 12:13:53 (UTC-4), Najtsirk escribió: > > Hello,

[web2py] Re: can a filename be suggested in a custom Exporter class for a SQLFORM.grid?

2015-08-10 Thread Yoel Benitez Fonseca
i'm allways getting rows.EXT El lunes, 10 de agosto de 2015, 14:49:23 (UTC-4), Yoel Benitez Fonseca escribió: > > In sqlhtml.py: > > class ExportClass(object): > label = None > file_ext = None > content_type = None > > def __init__(self, rows): > self.rows = rows > ... > >

[web2py] Re: can a filename be suggested in a custom Exporter class for a SQLFORM.grid?

2015-08-10 Thread Yoel Benitez Fonseca
on sqlhtml.py line 2394: ... oExp = clazz(rows) export_filename = \ request.vars.get('_export_filename') or 'rows' filename = '.'.join((export_filename, oExp.file_ext)) response.headers['Content-Type'] = oExp.conte

[web2py] Re: can a filename be suggested in a custom Exporter class for a SQLFORM.grid?

2015-08-10 Thread Yoel Benitez Fonseca
Here is my solution, idk if this is corrent or not: class CustomExporter(ExportClass): label = '' file_ext = '' content_type = '' file_name = '' def __init__(self, rows): super(CustomExporter, self).__init__(rows) request = current.request request.vars.

[web2py] Re: db query that returns a list of field values

2015-08-10 Thread Jose W
That was it, I needed to pull the content using row.URL. Thank you for the prompt response. On Monday, August 10, 2015 at 11:52:26 AM UTC-4, Massimo Di Pierro wrote: > > yes a Row (a record is a dictionary) but you can do: > > def make_run(): > siteList = [] > rows = db(db.websites).sele

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2015-08-10 Thread Val K
As I see, the problem is that ajax request (may be not ajax only) didn't wait for closing session file by another one and read/save data from/to it at any time! Lock did not work on my Win7 because , as I think, for Win it's one process. Request processing may be not pure parallel but fully asy

[web2py] Re: Code organization help

2015-08-10 Thread Dave S
On Monday, August 10, 2015 at 11:41:44 AM UTC-7, David Ripplinger wrote: > > Here's an update after I learned some more: > > It looks like I can have the best of both worlds, since web2py has routers > that can translate between a public URL and a back-end URL (see the > subsection titled URL R

Re: [web2py] Re: one to many relationship

2015-08-10 Thread Vid Ogris
Thank you for detailed answer I am trying to implement this in SQLFORM? Looks like multiple option is not avaliable, the field is presented as text field in the form BTW - why web2py does not add new field to a table. If I set migrate to True I get an error "table already exists" if it is set to

Re: [web2py] Re: one to many relationship

2015-08-10 Thread Dave S
On Monday, August 10, 2015 at 7:32:31 PM UTC-7, Yebach wrote: > > Thank you for detailed answer > > I am trying to implement this in SQLFORM? Looks like multiple option is > not avaliable, the field is presented as text field in the form > > BTW - why web2py does not add new field to a table. If

Re: [web2py] Re: one to many relationship

2015-08-10 Thread Vid Ogris
Postgres. The thimg is i have no table files. They somehow got deleted On Aug 11, 2015 12:30 PM, "Dave S" wrote: > > > On Monday, August 10, 2015 at 7:32:31 PM UTC-7, Yebach wrote: >> >> Thank you for detailed answer >> >> I am trying to implement this in SQLFORM? Looks like multiple option is >>

Re: [web2py] Re: one to many relationship

2015-08-10 Thread Yebach
To create one to many form i tried to follow the post from this guy http://blog.jotbe-fx.de/articles/2522/web2py-Normalized-many-to-many-model-with-multiselect-drop-down Also to create the dropdown etc. The thing worked kind of but the problem was that my grid was not getting populated once yo