[web2py] Re: How to insert data in data base by xml file

2015-07-03 Thread Anthony
All of the effort will be in parsing the XML, so you should check the documentation of the various XML libraries and ask questions in their forums (or on Stack Overflow). The details will depend on the structure of your XML. Ultimately, you want to loop over the records in the XML, and for each

[web2py] Re: common_filter

2015-07-03 Thread Anthony
A lambda function is just an anonymous function (i.e., one you define in place without naming it). The common_filter does not have to be a lambda function -- it can be any callable object that takes a single argument and returns a Query object. So, you could do: def my_common_filter(query):

Re: [web2py] Re: Error in database giving 'NoneType' object has no attribute 'first_name'.

2015-07-03 Thread Anthony
It's not clear exactly what you have done. Please show some code. On Friday, July 3, 2015 at 12:00:22 PM UTC-4, Sai Harsh Tondomker wrote: > > Dear Anthony, > > Yesterdays it self I have tried these but after logout it instead of > redirecting to index page it show the error which I have mention.

[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-07-03 Thread Dmitry Ermolaev
I continue tests... Any request with some PORT (for example http://mydom:PORT) after restarting Apache will take this PORT as success but all others PORTS as error for example if first request is http://my_domain:90 than app request wirt PORT != 90 - raise error! пятница, 3 июля 2015 г., 22:29:

[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-07-03 Thread Dmitry Ermolaev
in 2.11 error: Traceback (most recent call last): File "C:\web2py-m\gluon\main.py", line 436, in wsgibase session.connect(request, response) File "C:\web2py-m\gluon\globals.py", line 960, in connect session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) File "C:\web2py-m\gluon

[web2py] Re: date question

2015-07-03 Thread 黄祥
i think you can use logical operator or e.g. rows = db((db.problem.Duedate == request.now + datetime.timedelta(days = 1) ) | (db.problem.Duedate == request.now - datetime.timedelta(days = 1)) ).select() ref : http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Logical-op

Re: [web2py] Re: Error in database giving 'NoneType' object has no attribute 'first_name'.

2015-07-03 Thread 黄祥
i think you can achieve it in 2 parts *controllers* if you want to have a validator for check is user login or not in controller you can use : @auth.requires_login e.g. @auth.requires_login def abcd(): return locals() *models* you can also use if function for each of table definition e.g. aut

[web2py] Re: common_filter

2015-07-03 Thread 黄祥
please see python lambda ref: http://web2py.com/books/default/chapter/29/02/the-python-language#lambda best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (R

[web2py] Re: Form upload troubles when AJAX=True on component

2015-07-03 Thread 黄祥
i think it's related with the ajax and the table field type (upload) ref: http://web2py.com/books/default/chapter/29/12/components-and-plugins#Ajax-post-does-not-support-multipart-forms best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://githu

Re: [web2py] Re: What you think about this logotype?

2015-07-03 Thread António Ramos
see mine I see 3 times the w or the 3 letter. [image: Imagem inline 1] 2015-07-03 17:05 GMT+01:00 Massimo Di Pierro : > :-) > > > On Friday, 3 July 2015 11:00:22 UTC-5, Алексей Трифонов wrote: >> >> >>

[web2py] Re: What you think about this logotype?

2015-07-03 Thread Massimo Di Pierro
:-) On Friday, 3 July 2015 11:00:22 UTC-5, Алексей Трифонов wrote: > > > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

Re: [web2py] Re: Semantic 2.0

2015-07-03 Thread Massimo Di Pierro
We cannot make the layout name a variable because it would break bytecode compilation. If you make a semantic scaffolding app I would like to see it. We can make a site where multiple apps are posted. On Thursday, 2 July 2015 06:48:36 UTC-5, 黄祥 wrote: > > have a plan to use semantic for web2py s

Re: [web2py] Re: Error in database giving 'NoneType' object has no attribute 'first_name'.

2015-07-03 Thread Sai Harsh Tondomker
Dear Anthony, Yesterdays it self I have tried these but after logout it instead of redirecting to index page it show the error which I have mention. What I need to do. If you want I can explain you on what project I am working. Please help me to solve this problem. Waiting for your response. Bes

[web2py] common_filter

2015-07-03 Thread Paolo Amboni
Can someone translate the expression db.blog_post._common_filter = *lambda query:* db.blog_post.is_public == True *without the use of lambda function?* I'm trying to understand how to set up common filter in controller but lambda function always confuse me. *So, for now, the only way to set th

[web2py] Re: grid: get rid of view buttons

2015-07-03 Thread jackson . read
Thank I must have missed that On Wednesday, July 1, 2015 at 3:50:58 PM UTC-4, jackso...@quantachrome.com wrote: > > I have a sqlform.grid, I would like to get rid of the view buttons at the > end of each row. Unfortunately the grid has no attribute 'viewable' that > you can set to False. Does a

[web2py] date question

2015-07-03 Thread reddyreddy
Hello, I have a form where the teacher can select the duedate for each of the problem he posts. Now I want to write a query to select all the problems for whic the due date has finished 1 or more than 1 day back. Can anyone help please??? t = datetime.date.today() problems = db((db.problem.Du

[web2py] PowerTable plugin: layout broken (live not a function).

2015-07-03 Thread Phillip
The following link contains a solution to the first powerTable problem: charCodeAt is not a function https://groups.google.com/d/msg/web2py/iRTDzkIZMxc/CM0umjRzsuwJ I followed the steps that was said solved his problem (copy a different version of a js file to a folder and include the fi

[web2py] What you think about this logotype?

2015-07-03 Thread Алексей Трифонов
-- 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) --- Yo

[web2py] Changing primary button color and removal of span - help block in web2py login form

2015-07-03 Thread ankit kedia
Hi I am trying to customize the web2py login form. I want to make these changes: 1) Change background color of 'Log In' button to a custom color - say 'grey' 2) Remove " " block to place 'Log In' and 'Lost password' button in sameline,. For 1) , I tried using "form.element(_type='submit')['

[web2py] Re: How to insert data in data base by xml file

2015-07-03 Thread Sai Harsh Tondomker
Thanks for replying. Could you please give me one example. Waiting for your response On Wednesday, July 1, 2015 at 7:56:17 PM UTC+5:30, Anthony wrote: > > You can parse the XML with something like ElementTree, lxml, or Beautiful > Soup. Then you would have to write some code to extract the d

[web2py] Re: as_dict() on a row fails when connected to MySQL on Amazon RDS

2015-07-03 Thread Robert Porter
Could you show your DB code for reference? And you should jump in appadmin to check just what has been uploaded to the DB to be sure. On Wednesday, 1 July 2015 07:01:19 UTC-7, Sean Ballow wrote: > > We are connecting successfully to MySQL on RDS > > And when attempting to insert a new record it

[web2py] Form upload troubles when AJAX=True on component

2015-07-03 Thread Robert Porter
This first part works fine on its own. It's when I try to make this part of an AJAX component inside another page that it fails. Model: db.define_table('temp_pics', Field('image', 'upload', required=True, notnull=True, requires=IS_IMAGE())) Controller: # This will reload itself and allow changi

[web2py] Re: GUI crossroads: Cappuccino and/or web2py

2015-07-03 Thread Phillip Veda
Also, speaking of gui2py, it would be useful if to know if there could be any difficulties (that would make worth trying something else) in using a desktop client interface with a deployed GAE app. I've little experience with any of this, so I am still trying to determine whether it would make

Re: [web2py] Bunch/Batch/Bulk insert Re-use db.define_table field definition in SQLFORM.factory() ?

2015-07-03 Thread 黄祥
just an idea, why not use web2py component? *example 1* first component for add the details using sqlform.factory or whatever and store it on sessions second component is for modifying the sessions (in case you want to edit the detail e.g. quantity, price, etc), the submit to insert in database

[web2py] Re: expire user password

2015-07-03 Thread 黄祥
thanks leonel for your recommendation, i'll look forward about lock user after a few input (wrong password) tried. thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com

[web2py] Re: Apache on Windows + many applications

2015-07-03 Thread Dmitry Ermolaev
https://7pay.in/ - worked http://7pay.in/ - error in rockets server all OK in Apache - errors (( pickle with Apache rise error -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/li

[web2py] Apache on Windows + many applications

2015-07-03 Thread Dmitry Ermolaev
I have Windows Server and Apache 2.2 and many apps: applications/app1 applications/app2 applications/app3 in Apache config: Include conf/includes/*.conf localhost:80 ### # кто-то стучится черз

Re: [web2py] Dynamic drop down menu

2015-07-03 Thread Manuele Pesenti
Il 02/07/15 17:25, Gael Princivalle ha scritto: > Hello all. > > I've to set a dynamic drop down menu with 5 different fields. > > I would like to check which is today the best web2py way to do it. > > This plugin seems interesting: > http://dev.s-cubism.com/plugin_lazy_options_widget > > Is there

[web2py] Re: Removing email uniqueness from registration form and using other custom field for unique id of users

2015-07-03 Thread Ramashish Gaurav
So as of now, the user is able to use his unique username to log in, instead of email. On Friday, July 3, 2015 at 12:56:22 PM UTC+5:30, Ramashish Gaurav wrote: > > Hello all, > > I thank Villas, Anthony and Stiffan, for their interest. I have come up > with the solution to my problem. > > I def

[web2py] Re: Removing email uniqueness from registration form and using other custom field for unique id of users

2015-07-03 Thread Ramashish Gaurav
Hello all, I thank Villas, Anthony and Stiffan, for their interest. I have come up with the solution to my problem. I defined a custom registration form, and included 'username' as one of its fields and made it true. And also removed the IS_NOT_IN_DB() constraint from the email field. As of n