Re: [web2py] Re: bootstrap 3 - if you care help test trunk now
Hello all. Do we know when the web2py Bootstrap 3 version will be released ? Regards. -- 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] user_id is none when session is db
hi, when session is stored in file, all is ok, but when using db (session.connect(..., db)) after loginin, the user_id is None. (in glueon/tools.py) btw, I'm using the latest version of web2py cheers, danny -- 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] Create new website off entry in database
Hello, I'm trying to create an application to help my teacher ask students questions but I'm not quite sure how to structure the MVC. Let's say I have 10 entries in the SQL database and my sql database looks something like this: db.define_table('teacher_questions', Field('id','integer'), Field('title','string'), Field('question','string'), Field('answer','string'), Field('hint','string'), Field('comments','string'), migrate=False) I could do a for loop to return all of the questions, but how could I make a link which points to specific questions. I also want the teacher to be able to add a new question and the list of questions will update automatically. In the page that pops up I want to have an input field which will take the students question and compare it against the answer in the database. If it is right it will use bootstrap success and say correct. If it is wrong it will use the bootstrap error. Is there an app that is already created or a model of a web page I could look at for guidance? I've been struggling with this concept for about a week now which is why I'm reaching out to the experts Any help is greatly appreciated... -- 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] Semantic UI instead of bootstap
is semantic UI a good frontend ? http://semantic-ui.com/ Regards -- 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: Semantic UI instead of bootstap
Seems very nice. The creator appears to be working hard on the upcoming 1.0 (lots of commits on the 1.0 branch) -- for the latest, see http://beta.semantic-ui.com/. Note, I think IE support is limited to 9+. Anthony On Monday, October 13, 2014 10:19:34 AM UTC-4, Ramos wrote: is semantic UI a good frontend ? http://semantic-ui.com/ Regards -- 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't start interactive shell
I resolved this problem by switching to web2py_src instead of windows web2py.exe On Sunday, October 12, 2014 7:49:41 PM UTC-4, LoveWeb2py wrote: What am I doing wrong? C:\web2py\web2pyweb2py.exe -S myapp web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2014 Version 2.9.5-stable+timestamp.2014.03.20.22.57.13 Database drivers available: SQLite(sqlite3), MySQL(pymysql), PostgreSQL(psycopg2), PostgreSQL(pg8000), MSSQL(pyodbc), DB2(pyodbc), Teradata(pyodbc), Ingres(pyodbc), IMAP(imaplib) WARNING:web2py:import IPython error; use default python shell Traceback (most recent call last): File string, line 6, in module File __main__.py, line 128, in module File __main__web2py__.py, line 33, in module File /home/mdipierro/make_web2py/web2py/gluon/widget.py, line 1105, in start File /home/mdipierro/make_web2py/web2py/gluon/shell.py, line 320, in run File /home/mdipierro/make_web2py/web2py/gluon/shell.py, line 35, in enable_autocomplete_and_history File /home/mdipierro/make_web2py/web2py/gluon/custom_import.py, line 100, in custom_importer AttributeError: 'module' object has no attribute 'unicode_helper' I've tried running the version without the console too and running my console as an admin. Still receive the same result. -- 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: SQLFORM.grid, selectable and id
I see this was never answered, but I'm looking for the same thing. How does SQLFORM.grid's 'selectable' determine which field to use for the 'ids'? I have a left join as well, and it is picking the 'id' field from the wrong table. Is there a way to specify which table to use? -Jim On Monday, March 12, 2012 7:41:18 AM UTC-5, Johann Spies wrote: When using the following grid: query = ((db.akb_authors.id.belongs(ids)) (db.akb_authors_article_link.author == db.akb_authors.uuid) (db.akb_authors_article_link.article == db.akb_articles.uuid) (db.akb_journal.uuid == db.akb_articles.journal)) left = (db.akb_authors_article_link.on((db.akb_authors.uuid == db.akb_authors_article_link.author) (db.akb_authors.id.belongs(ids)) (db.akb_authors_article_link.author == db.akb_authors.uuid) (db.akb_authors_article_link.article == db.akb_articles.uuid) (db.akb_journal.uuid == db.akb_articles.journal))) fields = [db.akb_authors.id, db.akb_authors.surname, db.akb_authors.firstname, db.akb_authors.name, db.akb_authors.birthdate, db.akb_authors.gender, db.akb_authors.race, db.akb_authors.address, db.akb_journal.title, db.akb_journal.subject ] headers = {'akb_journal.title': 'Journal'} form = SQLFORM.grid(query, fields=fields, maxtextlength = 100, deletable = False, editable = False, details = False, create = False, headers = headers, selectable = lambda ids: hanteer_verfyning(ids), orderby = db.akb_authors.auth_id|db.akb_authors.id ) the grid use the id's of the akb_articles. Is there an easy way to convince it to use the id specified in [fields] in stead? Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- 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: OWASP Top 10 web app vuln # 10
This seems to be fixed ONLY for login But issue exists for all other redirections (Am using 2.9.5-stable+timestamp.2014.03.16.02.35.39) e.g. 127.0.0.1:8000/user/profile?_next=http://www.google.com Or http://127.0.0.1:8000/user/logout?_next=http://www.google.com Is there some setting/code that we need to include in our application code ? -Mandar On Friday, August 26, 2011 7:20:57 PM UTC+5:30, ee...@seccuris.com wrote: Looked in trunk and issue has been resolved. Thanks. -Eric -- 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 new website off entry in database
I currently have this setup in my view: {{for question in all_questions:}} {{if question['difficulty']=='Hard':}} li class=paddeda href={{=question['id']}}{{=question['title']}}/a/li {{pass}} {{else:}} {{pass}} I want to be able to click on the link and load the question related to the database id in another div. To help with my question from earlier... what is the best way to achieve this? On Monday, October 13, 2014 9:58:57 AM UTC-4, LoveWeb2py wrote: Hello, I'm trying to create an application to help my teacher ask students questions but I'm not quite sure how to structure the MVC. Let's say I have 10 entries in the SQL database and my sql database looks something like this: db.define_table('teacher_questions', Field('id','integer'), Field('title','string'), Field('question','string'), Field('answer','string'), Field('hint','string'), Field('comments','string'), migrate=False) I could do a for loop to return all of the questions, but how could I make a link which points to specific questions. I also want the teacher to be able to add a new question and the list of questions will update automatically. In the page that pops up I want to have an input field which will take the students question and compare it against the answer in the database. If it is right it will use bootstrap success and say correct. If it is wrong it will use the bootstrap error. Is there an app that is already created or a model of a web page I could look at for guidance? I've been struggling with this concept for about a week now which is why I'm reaching out to the experts Any help is greatly appreciated... -- 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: OWASP Top 10 web app vuln # 10
I verified the code in gluon/tools.py - the issue exists for most of the method in Auth() - which take next as one of the parameters (change_password, retrive_password, reset_password, register, probably few more) The special check applied in login() is not present in rest of these methods. -Mandar On Monday, October 13, 2014 9:23:23 PM UTC+5:30, Mandar Vaze wrote: This seems to be fixed ONLY for login But issue exists for all other redirections (Am using 2.9.5-stable+timestamp.2014.03.16.02.35.39) e.g. 127.0.0.1:8000/user/profile?_next=http://www.google.com Or http://127.0.0.1:8000/user/logout?_next=http://www.google.com Is there some setting/code that we need to include in our application code ? -Mandar On Friday, August 26, 2011 7:20:57 PM UTC+5:30, ee...@seccuris.com wrote: Looked in trunk and issue has been resolved. Thanks. -Eric -- 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] crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11
I del al files in /sessions and update to 2.9.11 Traceback (most recent call last): File C:\web2py-m\gluon\main.py, line 435, in wsgibase session.connect(request, response) File C:\web2py-m\gluon\globals.py, line 931, in connect session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) TypeError: 'NoneType' object is not callable -- 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: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11
на одном компьютере страничка открыватся, на другом нет похоже когда вручную каталог с сессией удалил - произошла ошибка как отключить это? try? понедельник, 13 октября 2014 г., 21:22:57 UTC+4 пользователь Dmitry Ermolaev написал: I del al files in /sessions and update to 2.9.11 Traceback (most recent call last): File C:\web2py-m\gluon\main.py, line 435, in wsgibase session.connect(request, response) File C:\web2py-m\gluon\globals.py, line 931, in connect session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) TypeError: 'NoneType' object is not callable -- 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: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11
in line 931 I edit: try: session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) response.session_hash = hashlib.md5(session_pickled).hexdigest() except: pass and try open my URL - this rise a error than I comment my edit: #try: session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) response.session_hash = hashlib.md5(session_pickled).hexdigest() #except: # pass and error is end! File C:\web2py-m\gluon\globals.py, line 931, in connect -- 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: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11
You need to delete your browser cookies too. That said, this may also be a web2py error because it shouldn't break just because the browser gives him a non-existing session cookie. -- 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: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11
not worked ((( I has 2 sites - one rise this error but another not when I use try/except edit - site change - secon work but first error не работает у меня два сайта если один работает то у второго эта ошибка когда я с помощью try/except у одного сайта ошибку урал - она появилась на другом сайте понедельник, 13 октября 2014 г., 21:22:57 UTC+4 пользователь Dmitry Ermolaev написал: I del al files in /sessions and update to 2.9.11 Traceback (most recent call last): File C:\web2py-m\gluon\main.py, line 435, in wsgibase session.connect(request, response) File C:\web2py-m\gluon\globals.py, line 931, in connect session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) TypeError: 'NoneType' object is not callable -- 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: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11
2.9.9 ver work good! I restore to 2.9.9 -- 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: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11
I'm worried that in the session there's something that isn't picklable, a-la old Storage . On Monday, October 13, 2014 8:00:32 PM UTC+2, Leonel Câmara wrote: You need to delete your browser cookies too. That said, this may also be a web2py error because it shouldn't break just because the browser gives him a non-existing session cookie. -- 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 new website off entry in database
Massimo created a series of videos for a course he taught that included some really helpful tutorials and examples. In one of the videos, he built a complete app for Surveys - including the ability to build a list of questions, poll for answers, and other features. I think you'll find the answers and some ideas to help you with your app in the video. I started to build an index of the topics covered by the videos to help me go back and review. Unfortunately, I only thought of doing this after I watched all 5 videos but I've started to update the index every time I go back to find a topic. The index is only partially complete but does have an entry for the Survey app along with the time in the video so you can go directly to the spot with the Survey tutorial. Here's the index: https://docs.google.com/spreadsheet/ccc?key=0AskUxMwC3JzwdDNYRGtSZ3NTSTVEQ1g1QnBfR0FMa1E Please feel free to update the index if you watch more of the videos. On Monday, October 13, 2014 12:20:33 PM UTC-4, LoveWeb2py wrote: I currently have this setup in my view: {{for question in all_questions:}} {{if question['difficulty']=='Hard':}} li class=paddeda href={{=question['id']}}{{=question['title']}}/a/li {{pass}} {{else:}} {{pass}} I want to be able to click on the link and load the question related to the database id in another div. To help with my question from earlier... what is the best way to achieve this? On Monday, October 13, 2014 9:58:57 AM UTC-4, LoveWeb2py wrote: Hello, I'm trying to create an application to help my teacher ask students questions but I'm not quite sure how to structure the MVC. Let's say I have 10 entries in the SQL database and my sql database looks something like this: db.define_table('teacher_questions', Field('id','integer'), Field('title','string'), Field('question','string'), Field('answer','string'), Field('hint','string'), Field('comments','string'), migrate=False) I could do a for loop to return all of the questions, but how could I make a link which points to specific questions. I also want the teacher to be able to add a new question and the list of questions will update automatically. In the page that pops up I want to have an input field which will take the students question and compare it against the answer in the database. If it is right it will use bootstrap success and say correct. If it is wrong it will use the bootstrap error. Is there an app that is already created or a model of a web page I could look at for guidance? I've been struggling with this concept for about a week now which is why I'm reaching out to the experts Any help is greatly appreciated... -- 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: SQLFORM.grid, selectable and id
I'm assuming it gets the quite-obvious field_id parameter. If none, it just gets the first 'id' field of the first table in the join. On Monday, October 13, 2014 5:38:51 PM UTC+2, Jim S wrote: I see this was never answered, but I'm looking for the same thing. How does SQLFORM.grid's 'selectable' determine which field to use for the 'ids'? I have a left join as well, and it is picking the 'id' field from the wrong table. Is there a way to specify which table to use? -Jim On Monday, March 12, 2012 7:41:18 AM UTC-5, Johann Spies wrote: When using the following grid: query = ((db.akb_authors.id.belongs(ids)) (db.akb_authors_article_link.author == db.akb_authors.uuid) (db.akb_authors_article_link.article == db.akb_articles.uuid) (db.akb_journal.uuid == db.akb_articles.journal)) left = (db.akb_authors_article_link.on((db.akb_authors.uuid == db.akb_authors_article_link.author) (db.akb_authors.id.belongs(ids)) (db.akb_authors_article_link.author == db.akb_authors.uuid) (db.akb_authors_article_link.article == db.akb_articles.uuid) (db.akb_journal.uuid == db.akb_articles.journal))) fields = [db.akb_authors.id, db.akb_authors.surname, db.akb_authors.firstname, db.akb_authors.name, db.akb_authors.birthdate, db.akb_authors.gender, db.akb_authors.race, db.akb_authors.address, db.akb_journal.title, db.akb_journal.subject ] headers = {'akb_journal.title': 'Journal'} form = SQLFORM.grid(query, fields=fields, maxtextlength = 100, deletable = False, editable = False, details = False, create = False, headers = headers, selectable = lambda ids: hanteer_verfyning(ids), orderby = db.akb_authors.auth_id| db.akb_authors.id) the grid use the id's of the akb_articles. Is there an easy way to convince it to use the id specified in [fields] in stead? Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- 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: RESTful request args/vars with JSON array
you have to code your own methods. On Sunday, October 12, 2014 11:32:23 PM UTC+2, Henry Nguyen wrote: I have a function in my controller decorated with the @request.restful() decorator. I would like to be able to accept a JSON array of objects, [{id: 1, new_value: 1},{id: 2, new_value: 2}] , on a POST, PUT, or DELETE. For example, I'd like the client to be able to update a series of values on one request, as opposed to having to submit multiple requests for each individual update. However, the args and vars parameters being passed to the methods are empty when a request is sent with the JSON payload above. Specifically, args only gets populated from URL args and vars only get populated if the array is accompanied by a key, such as in: {update: [{id: 1, new_value: 1},{id: 2, new_value: 2}]} While it certainly isn't too much trouble to include that initial key, I was wondering if there's any way to retrieve the JSON objects from the request without having to specify the key so that I could pass a simple array instead? Thank you ahead of time for any help. -- 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: Item in ``from list'' not a string (custom_import.py) web2py 2.9.11
it's not a web2py issue but it seems something with the Shopify lib and that bug that isn't going very well as of web2py starts with something else you need to check your setup web2py can't choose what python version to run at runtime On Sunday, October 12, 2014 7:39:16 PM UTC+2, Luciano Laporta Podazza wrote: It seems to. I've tried using pyenv to switch to Python 2.7.5 (the one it works), declared it as global and verified that works running 'python', reinstalled web2py 2.9.11 on server but web2py it still uses Python *2.7.6*. On the other hand I've tried to apply the patch with no luck (actually I'm learning how to do it :P) Any suggestions?. Thanks! On Sun, Oct 12, 2014 at 10:07 AM, Niphlod nip...@gmail.com javascript: wrote: uhm, could be something related to http://bugs.python.org/issue21720 On Sunday, October 12, 2014 1:53:40 AM UTC+2, Luciano Laporta Podazza wrote: Hello, I'm using locally web2py (*2.9.8*) + Shopify API (2.0.4) on Mac OS X 10.9.5 (Python *2.7.5*) and this code works perfectly: from gluon.tools import Service service = Service() import gluon.contrib.simplejson as json def call(): session.forget() return service() @service.json def create_order(): data = json.loads(request.body.read()) import shopify #(API Key, Password) shop_url = https://%s:%s...@myshop.myshopify.com/admin; % ('key', 'secret') shopify.ShopifyResource.set_site(shop_url) shop = shopify.Shop.current orders = shopify.Order.find(financial_status='pending') new_order = shopify.Order() for order in orders: if order.order_number == data['order_number']: clone_order(order, new_order, order.attributes) def clone_order(objfrom, objto, names): for n in names: if hasattr(objfrom, n): if n in [source_name, cart_token, id, token, name, checkout_token, checkout_id]: objto.n = None elif n == line_items: v = getattr(objfrom, n) setattr(objto, n, v) if objto.line_items[-1].title != Cargo por COD: objto.line_items.append({variant_id : 972802884, quantity : 1, price: 2.5, title: Cargo por COD}) elif n == order_number: v = getattr(objfrom, n) objto.note = Agregado COD, numero de orden vieja: # + str(objfrom.order_number) else: v = getattr(objfrom, n) setattr(objto, n, v) objto.order_number = 1198 try: objto.save() objfrom.cancel() objfrom.close() return Success except Exception, e: return Fail But when deploying to server (Ubuntu 14.04 with Web2py *2.9.11* / Python *2.7.6 -note the different python and web2py version-*) I get this error: Traceback (most recent call last): File /home/www-data/web2py/gluon/restricted.py, line 224, in restricted exec ccode in environment File /home/www-data/web2py/applications/mascotanube/controllers/cash_on_delivery.py https://activecrime.com/admin/default/edit/mascotanube/controllers/cash_on_delivery.py, line 49, in module File /home/www-data/web2py/gluon/globals.py, line 392, in lambda self._caller = lambda f: f() File /home/www-data/web2py/applications/mascotanube/controllers/cash_on_delivery.py https://activecrime.com/admin/default/edit/mascotanube/controllers/cash_on_delivery.py, line 7, in call return service() File /home/www-data/web2py/gluon/tools.py, line 5138, in __call__ return self.serve_json(request.args[1:]) File /home/www-data/web2py/gluon/tools.py, line 4815, in serve_json s = universal_caller(self.json_procedures[args[0]], *args[1:], **d) File /home/www-data/web2py/gluon/tools.py, line 4474, in universal_caller return f(**arg_dict) File /home/www-data/web2py/applications/mascotanube/controllers/cash_on_delivery.py https://activecrime.com/admin/default/edit/mascotanube/controllers/cash_on_delivery.py, line 17, in create_order orders = shopify.Order.find(financial_status='pending') File /usr/local/lib/python2.7/dist-packages/pyactiveresource/activeresource.py, line 385, in find return cls._find_every(from_=from_, **kwargs) File /usr/local/lib/python2.7/dist-packages/pyactiveresource/activeresource.py, line 524, in _find_every prefix_options) File /usr/local/lib/python2.7/dist-packages/pyactiveresource/activeresource.py, line 555, in _build_list resources.append(cls(element, prefix_options)) File build/bdist.linux-i686/egg/shopify/base.py, line 130, in __init__ return super(ShopifyResource, self).__init__(attributes, prefix_options) File /usr/local/lib/python2.7/dist-packages/pyactiveresource/activeresource.py, line 362, in __init__ self._update(attributes) File /usr/local/lib/python2.7/dist-packages/pyactiveresource/activeresource.py, line 952, in
[web2py] Re: SQLFORM.grid, selectable and id
But, I'm linking 3 tables using the 'left' argument. It is getting the id from the last linked table. open_feed_orders = dbdb.feedOrder.invoiceNumber == None) | (db.feedOrder.invoiceNumber == 0)) db.feedOrder.siteId == site_id))._select(db. feedOrder.feedOrderId) used_feed_order_lines = db(db.workorder_finish.id 0)._select(db. workorder_finish.feed_order_line) queries = [db.feedOrderLine.feedOrderLineId 0] queries.append(db.feedOrderLine.feedOrderId.belongs(open_feed_orders)) queries.append(~db.feedOrderLine.feedOrderLineId.belongs( used_feed_order_lines)) queries.append(db.feedOrder.siteId == site_id) queries.append(db.feedLoad.deliverOn=from_date) queries.append(db.feedLoad.deliverOn=to_date) queries.append(~db.feedOrderLine.productNumber.belongs(['I00255', 'I00279','I00280','I00289'])) query = reduce(lambda a, b: (a b), queries) orderby = [db.feedOrderLine.productNumber, db.feedOrderLine.productName] left = [db.feedOrder.on(db.feedOrderLine.feedOrderId == db.feedOrder. feedOrderId), db.feedLoad.on(db.feedOrder.feedLoadId == db.feedLoad.feedLoadId )] fields = [db.feedLoad.deliverOn, db.feedOrder.orderNumber, db.feedLoad.loadNumber, db.feedOrderLine.productNumber, db.feedOrderLine.productName, db.feedOrderLine.quantityOrdered, db.feedOrderLine.feedOrderLineId] grid = SQLFORM.grid(query,fields=fields,create=False,editable=False, details=False,deletable=False,csv=False, searchable=False, orderby=orderby, left=left, selectable=lambda ids:redirect(URL('workorder', 'new_from_sales_order_confirm', vars=dict(ids=ids)), client_side=True), maxtextlength=256,paginate=256, formstyle= my_formstyle, ui=grid_ui) It is bringing the ID field from the feedLoad table. I want the id from the feedOrderLine table. Also, I've tried changing the order of the fields in my 'fields' list to have one from feedOrderLine first, but it doesn't care. -Jim On Monday, October 13, 2014 2:24:22 PM UTC-5, Niphlod wrote: I'm assuming it gets the quite-obvious field_id parameter. If none, it just gets the first 'id' field of the first table in the join. On Monday, October 13, 2014 5:38:51 PM UTC+2, Jim S wrote: I see this was never answered, but I'm looking for the same thing. How does SQLFORM.grid's 'selectable' determine which field to use for the 'ids'? I have a left join as well, and it is picking the 'id' field from the wrong table. Is there a way to specify which table to use? -Jim On Monday, March 12, 2012 7:41:18 AM UTC-5, Johann Spies wrote: When using the following grid: query = ((db.akb_authors.id.belongs(ids)) (db.akb_authors_article_link.author == db.akb_authors.uuid) (db.akb_authors_article_link.article == db.akb_articles.uuid) (db.akb_journal.uuid == db.akb_articles.journal)) left = (db.akb_authors_article_link.on((db.akb_authors.uuid == db.akb_authors_article_link.author) (db.akb_authors.id.belongs(ids)) (db.akb_authors_article_link.author == db.akb_authors.uuid) (db.akb_authors_article_link.article == db.akb_articles.uuid) (db.akb_journal.uuid == db.akb_articles.journal))) fields = [db.akb_authors.id, db.akb_authors.surname, db.akb_authors.firstname, db.akb_authors.name, db.akb_authors.birthdate, db.akb_authors.gender, db.akb_authors.race, db.akb_authors.address, db.akb_journal.title, db.akb_journal.subject ] headers = {'akb_journal.title': 'Journal'} form = SQLFORM.grid(query, fields=fields, maxtextlength = 100, deletable = False, editable = False, details = False, create = False, headers = headers, selectable = lambda ids: hanteer_verfyning(ids), orderby = db.akb_authors.auth_id| db.akb_authors.id) the grid use the id's of the akb_articles. Is there an easy way to convince it to use the id specified in [fields] in stead? Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- 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
Re: [web2py] Re: Item in ``from list'' not a string (custom_import.py) web2py 2.9.11
Thanks Niphlod, I've just managed to make any python version work ( 2.7.5), web2py runs the Python version I want but the error still remains. It's weird 'cause on my Mac, with Python *2.7.5 (default, Mar 9 2014, 22:15:05) *it works like a charm. I'll keep the research but this is driving me nuts. On Mon, Oct 13, 2014 at 4:28 PM, Niphlod niph...@gmail.com wrote: it's not a web2py issue but it seems something with the Shopify lib and that bug that isn't going very well as of web2py starts with something else you need to check your setup web2py can't choose what python version to run at runtime On Sunday, October 12, 2014 7:39:16 PM UTC+2, Luciano Laporta Podazza wrote: It seems to. I've tried using pyenv to switch to Python 2.7.5 (the one it works), declared it as global and verified that works running 'python', reinstalled web2py 2.9.11 on server but web2py it still uses Python *2.7.6*. On the other hand I've tried to apply the patch with no luck (actually I'm learning how to do it :P) Any suggestions?. Thanks! On Sun, Oct 12, 2014 at 10:07 AM, Niphlod nip...@gmail.com wrote: uhm, could be something related to http://bugs.python.org/issue21720 On Sunday, October 12, 2014 1:53:40 AM UTC+2, Luciano Laporta Podazza wrote: Hello, I'm using locally web2py (*2.9.8*) + Shopify API (2.0.4) on Mac OS X 10.9.5 (Python *2.7.5*) and this code works perfectly: from gluon.tools import Service service = Service() import gluon.contrib.simplejson as json def call(): session.forget() return service() @service.json def create_order(): data = json.loads(request.body.read()) import shopify #(API Key, Password) shop_url = https://%s:%s...@myshop.myshopify.com/admin; % ('key', 'secret') shopify.ShopifyResource.set_site(shop_url) shop = shopify.Shop.current orders = shopify.Order.find(financial_status='pending') new_order = shopify.Order() for order in orders: if order.order_number == data['order_number']: clone_order(order, new_order, order.attributes) def clone_order(objfrom, objto, names): for n in names: if hasattr(objfrom, n): if n in [source_name, cart_token, id, token, name , checkout_token, checkout_id]: objto.n = None elif n == line_items: v = getattr(objfrom, n) setattr(objto, n, v) if objto.line_items[-1].title != Cargo por COD: objto.line_items.append({variant_id : 972802884, quantity : 1, price: 2.5, title: Cargo por COD}) elif n == order_number: v = getattr(objfrom, n) objto.note = Agregado COD, numero de orden vieja: # + str(objfrom.order_number) else: v = getattr(objfrom, n) setattr(objto, n, v) objto.order_number = 1198 try: objto.save() objfrom.cancel() objfrom.close() return Success except Exception, e: return Fail But when deploying to server (Ubuntu 14.04 with Web2py *2.9.11* / Python *2.7.6 -note the different python and web2py version-*) I get this error: Traceback (most recent call last): File /home/www-data/web2py/gluon/restricted.py, line 224, in restricted exec ccode in environment File /home/www-data/web2py/applications/mascotanube/controllers/cash_on_delivery.py https://activecrime.com/admin/default/edit/mascotanube/controllers/cash_on_delivery.py, line 49, in module File /home/www-data/web2py/gluon/globals.py, line 392, in lambda self._caller = lambda f: f() File /home/www-data/web2py/applications/mascotanube/controllers/cash_on_delivery.py https://activecrime.com/admin/default/edit/mascotanube/controllers/cash_on_delivery.py, line 7, in call return service() File /home/www-data/web2py/gluon/tools.py, line 5138, in __call__ return self.serve_json(request.args[1:]) File /home/www-data/web2py/gluon/tools.py, line 4815, in serve_json s = universal_caller(self.json_procedures[args[0]], *args[1:], **d) File /home/www-data/web2py/gluon/tools.py, line 4474, in universal_caller return f(**arg_dict) File /home/www-data/web2py/applications/mascotanube/controllers/cash_on_delivery.py https://activecrime.com/admin/default/edit/mascotanube/controllers/cash_on_delivery.py, line 17, in create_order orders = shopify.Order.find(financial_status='pending') File /usr/local/lib/python2.7/dist-packages/pyactiveresource/activeresource.py, line 385, in find return cls._find_every(from_=from_, **kwargs) File /usr/local/lib/python2.7/dist-packages/pyactiveresource/activeresource.py, line 524, in _find_every prefix_options) File /usr/local/lib/python2.7/dist-packages/pyactiveresource/activeresource.py, line 555, in _build_list resources.append(cls(element, prefix_options)) File
[web2py] Re: SQLFORM.grid, selectable and id
what if you pass to field_id the one you want ? On Monday, October 13, 2014 9:32:19 PM UTC+2, Jim S wrote: But, I'm linking 3 tables using the 'left' argument. It is getting the id from the last linked table. open_feed_orders = dbdb.feedOrder.invoiceNumber == None) | (db.feedOrder.invoiceNumber == 0)) db.feedOrder.siteId == site_id))._select(db. feedOrder.feedOrderId) used_feed_order_lines = db(db.workorder_finish.id 0)._select(db. workorder_finish.feed_order_line) queries = [db.feedOrderLine.feedOrderLineId 0] queries.append(db.feedOrderLine.feedOrderId.belongs(open_feed_orders)) queries.append(~db.feedOrderLine.feedOrderLineId.belongs( used_feed_order_lines)) queries.append(db.feedOrder.siteId == site_id) queries.append(db.feedLoad.deliverOn=from_date) queries.append(db.feedLoad.deliverOn=to_date) queries.append(~db.feedOrderLine.productNumber.belongs(['I00255', 'I00279','I00280','I00289'])) query = reduce(lambda a, b: (a b), queries) orderby = [db.feedOrderLine.productNumber, db.feedOrderLine. productName] left = [db.feedOrder.on(db.feedOrderLine.feedOrderId == db.feedOrder. feedOrderId), db.feedLoad.on(db.feedOrder.feedLoadId == db.feedLoad. feedLoadId)] fields = [db.feedLoad.deliverOn, db.feedOrder.orderNumber, db.feedLoad.loadNumber, db.feedOrderLine.productNumber, db.feedOrderLine.productName, db.feedOrderLine.quantityOrdered, db.feedOrderLine.feedOrderLineId] grid = SQLFORM.grid(query,fields=fields,create=False,editable=False, details=False,deletable=False,csv=False, searchable=False, orderby=orderby, left=left, selectable=lambda ids:redirect(URL('workorder', 'new_from_sales_order_confirm', vars=dict(ids=ids )), client_side=True), maxtextlength=256,paginate=256, formstyle= my_formstyle, ui=grid_ui) It is bringing the ID field from the feedLoad table. I want the id from the feedOrderLine table. Also, I've tried changing the order of the fields in my 'fields' list to have one from feedOrderLine first, but it doesn't care. -Jim On Monday, October 13, 2014 2:24:22 PM UTC-5, Niphlod wrote: I'm assuming it gets the quite-obvious field_id parameter. If none, it just gets the first 'id' field of the first table in the join. On Monday, October 13, 2014 5:38:51 PM UTC+2, Jim S wrote: I see this was never answered, but I'm looking for the same thing. How does SQLFORM.grid's 'selectable' determine which field to use for the 'ids'? I have a left join as well, and it is picking the 'id' field from the wrong table. Is there a way to specify which table to use? -Jim On Monday, March 12, 2012 7:41:18 AM UTC-5, Johann Spies wrote: When using the following grid: query = ((db.akb_authors.id.belongs(ids)) (db.akb_authors_article_link.author == db.akb_authors.uuid) (db.akb_authors_article_link.article == db.akb_articles.uuid) (db.akb_journal.uuid == db.akb_articles.journal)) left = (db.akb_authors_article_link.on((db.akb_authors.uuid == db.akb_authors_article_link.author) (db.akb_authors.id.belongs(ids)) (db.akb_authors_article_link.author == db.akb_authors.uuid) (db.akb_authors_article_link.article == db.akb_articles.uuid) (db.akb_journal.uuid == db.akb_articles.journal))) fields = [db.akb_authors.id, db.akb_authors.surname, db.akb_authors.firstname, db.akb_authors.name, db.akb_authors.birthdate, db.akb_authors.gender, db.akb_authors.race, db.akb_authors.address, db.akb_journal.title, db.akb_journal.subject ] headers = {'akb_journal.title': 'Journal'} form = SQLFORM.grid(query, fields=fields, maxtextlength = 100, deletable = False, editable = False, details = False, create = False, headers = headers, selectable = lambda ids: hanteer_verfyning(ids), orderby = db.akb_authors.auth_id| db.akb_authors.id) the grid use the id's of the akb_articles. Is there an easy way to convince it to use the id specified in [fields] in stead? Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- 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
[web2py] Re: SQLFORM.grid, selectable and id
That is EXACTLY what I want. Sorry to bother you with something like this that I totally missed in the doc and reading through the code. -Jim On Monday, October 13, 2014 2:41:29 PM UTC-5, Niphlod wrote: what if you pass to field_id the one you want ? On Monday, October 13, 2014 9:32:19 PM UTC+2, Jim S wrote: But, I'm linking 3 tables using the 'left' argument. It is getting the id from the last linked table. open_feed_orders = dbdb.feedOrder.invoiceNumber == None) | (db.feedOrder.invoiceNumber == 0)) db.feedOrder.siteId == site_id))._select(db. feedOrder.feedOrderId) used_feed_order_lines = db(db.workorder_finish.id 0)._select(db. workorder_finish.feed_order_line) queries = [db.feedOrderLine.feedOrderLineId 0] queries.append(db.feedOrderLine.feedOrderId.belongs(open_feed_orders )) queries.append(~db.feedOrderLine.feedOrderLineId.belongs( used_feed_order_lines)) queries.append(db.feedOrder.siteId == site_id) queries.append(db.feedLoad.deliverOn=from_date) queries.append(db.feedLoad.deliverOn=to_date) queries.append(~db.feedOrderLine.productNumber.belongs(['I00255', 'I00279','I00280','I00289'])) query = reduce(lambda a, b: (a b), queries) orderby = [db.feedOrderLine.productNumber, db.feedOrderLine. productName] left = [db.feedOrder.on(db.feedOrderLine.feedOrderId == db.feedOrder. feedOrderId), db.feedLoad.on(db.feedOrder.feedLoadId == db.feedLoad. feedLoadId)] fields = [db.feedLoad.deliverOn, db.feedOrder.orderNumber, db.feedLoad.loadNumber, db.feedOrderLine.productNumber, db.feedOrderLine.productName, db.feedOrderLine.quantityOrdered, db.feedOrderLine.feedOrderLineId] grid = SQLFORM.grid(query,fields=fields,create=False,editable=False, details=False,deletable=False,csv=False, searchable=False, orderby=orderby, left=left, selectable=lambda ids:redirect(URL('workorder', 'new_from_sales_order_confirm', vars=dict(ids=ids )), client_side=True), maxtextlength=256,paginate=256, formstyle= my_formstyle, ui=grid_ui) It is bringing the ID field from the feedLoad table. I want the id from the feedOrderLine table. Also, I've tried changing the order of the fields in my 'fields' list to have one from feedOrderLine first, but it doesn't care. -Jim On Monday, October 13, 2014 2:24:22 PM UTC-5, Niphlod wrote: I'm assuming it gets the quite-obvious field_id parameter. If none, it just gets the first 'id' field of the first table in the join. On Monday, October 13, 2014 5:38:51 PM UTC+2, Jim S wrote: I see this was never answered, but I'm looking for the same thing. How does SQLFORM.grid's 'selectable' determine which field to use for the 'ids'? I have a left join as well, and it is picking the 'id' field from the wrong table. Is there a way to specify which table to use? -Jim On Monday, March 12, 2012 7:41:18 AM UTC-5, Johann Spies wrote: When using the following grid: query = ((db.akb_authors.id.belongs(ids)) (db.akb_authors_article_link.author == db.akb_authors.uuid) (db.akb_authors_article_link.article == db.akb_articles.uuid) (db.akb_journal.uuid == db.akb_articles.journal)) left = (db.akb_authors_article_link.on((db.akb_authors.uuid == db.akb_authors_article_link.author) (db.akb_authors.id.belongs(ids)) (db.akb_authors_article_link.author == db.akb_authors.uuid) (db.akb_authors_article_link.article == db.akb_articles.uuid) (db.akb_journal.uuid == db.akb_articles.journal))) fields = [db.akb_authors.id, db.akb_authors.surname, db.akb_authors.firstname, db.akb_authors.name, db.akb_authors.birthdate, db.akb_authors.gender, db.akb_authors.race, db.akb_authors.address, db.akb_journal.title, db.akb_journal.subject ] headers = {'akb_journal.title': 'Journal'} form = SQLFORM.grid(query, fields=fields, maxtextlength = 100, deletable = False, editable = False, details = False, create = False, headers = headers, selectable = lambda ids: hanteer_verfyning(ids), orderby = db.akb_authors.auth_id| db.akb_authors.id) the grid use the id's of the akb_articles. Is there an easy way to convince it to use the id specified in [fields] in stead? Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you.
[web2py] Re: Create new website off entry in database
Thanks, Michael! I think I've figured it out somewhat. The answer I was looking for was vars. Being able to reference vars in different controllers is very powerful. By referencing the var I can select the record from the table I was referencing and render it in the view. A simple concept for most I would imagine, but I learn something new everyday with web2py. Thanks again!! On Monday, October 13, 2014 3:21:54 PM UTC-4, Michael Beller wrote: Massimo created a series of videos for a course he taught that included some really helpful tutorials and examples. In one of the videos, he built a complete app for Surveys - including the ability to build a list of questions, poll for answers, and other features. I think you'll find the answers and some ideas to help you with your app in the video. I started to build an index of the topics covered by the videos to help me go back and review. Unfortunately, I only thought of doing this after I watched all 5 videos but I've started to update the index every time I go back to find a topic. The index is only partially complete but does have an entry for the Survey app along with the time in the video so you can go directly to the spot with the Survey tutorial. Here's the index: https://docs.google.com/spreadsheet/ccc?key=0AskUxMwC3JzwdDNYRGtSZ3NTSTVEQ1g1QnBfR0FMa1E Please feel free to update the index if you watch more of the videos. On Monday, October 13, 2014 12:20:33 PM UTC-4, LoveWeb2py wrote: I currently have this setup in my view: {{for question in all_questions:}} {{if question['difficulty']=='Hard':}} li class=paddeda href={{=question['id']}}{{=question['title']}}/a/li {{pass}} {{else:}} {{pass}} I want to be able to click on the link and load the question related to the database id in another div. To help with my question from earlier... what is the best way to achieve this? On Monday, October 13, 2014 9:58:57 AM UTC-4, LoveWeb2py wrote: Hello, I'm trying to create an application to help my teacher ask students questions but I'm not quite sure how to structure the MVC. Let's say I have 10 entries in the SQL database and my sql database looks something like this: db.define_table('teacher_questions', Field('id','integer'), Field('title','string'), Field('question','string'), Field('answer','string'), Field('hint','string'), Field('comments','string'), migrate=False) I could do a for loop to return all of the questions, but how could I make a link which points to specific questions. I also want the teacher to be able to add a new question and the list of questions will update automatically. In the page that pops up I want to have an input field which will take the students question and compare it against the answer in the database. If it is right it will use bootstrap success and say correct. If it is wrong it will use the bootstrap error. Is there an app that is already created or a model of a web page I could look at for guidance? I've been struggling with this concept for about a week now which is why I'm reaching out to the experts Any help is greatly appreciated... -- 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.py -G configure issues? Trouble with /admin on GAE
Cool, I tried grouping the regex, put back the section I had comented out and it seems to be working. Thanks -Miguel On Fri, Oct 10, 2014 at 9:43 AM, lpg lucas.gei...@gmail.com wrote: Hi Miguel, I've been talking with Niphlod, w2p maintainer. See here. https://groups.google.com/forum/#!topic/web2py-developers/CYE9E7sL7QI Looks like there will be an update to w2p shortly. Meanwhile you can try what Niphlod developed, I attached here. It works with Release Pipelines as well (Which IMO is a great feature of GAE). On Wednesday, October 8, 2014 9:54:28 AM UTC-4, Miguel wrote: Hi Please find my app.yaml file attached. I have not tried the release pipeline with GitHub. -Miguel On Fri, Oct 3, 2014 at 6:51 AM, Lucas Geiger l...@keyscores.com wrote: I'm not having luck with that. Can you post your yml file here? Another question: have you tried using GAE's release pipeline with Github? It seems the yml is not valid and fails. Wondering if it's related. See here: https://groups.google.com/forum/#!topic/web2py-developers/ldksNnV7EeQ On Fri, Oct 3, 2014 at 8:56 AM, Miguel Goncalves goncalv...@gmail.com wrote: Hi I cleared the cache and also tried running in IE and Chrome. Everything is still working properly for me. -Miguel On Thu, Oct 2, 2014 at 9:57 AM, Lucas Geiger l...@keyscores.com wrote: Hi Miguel, this seems to break the rest of app for me, including welcome: https://www.dropbox.com/s/sa7s3yp5xy47ckb/Screenshot% 202014-10-02%2012.55.58.png?dl=0 I didn't notice it until clearing the browser cache. Can you confirm? Thanks On Thu, Oct 2, 2014 at 9:47 AM, Miguel Goncalves goncalv...@gmail.com wrote: Try to do comment the 2dn url line in the the app.yaml : handlers: # Warning! Static mapping - below - isn't compatible with # the parametric router's language logic. # You cannot use them together. - url: /(.+?)/static/_\d.\d.\d\/(.+) static_files: applications/\1/static/\2 upload: applications/(.+?)/static/(.+) secure: optional expiration: 365d #- url: /(.+?)/static/(.+) # static_files: applications/\1/static/\2 # upload: applications/(.+?)/static/(.+) # secure: optional This solved the problem for me. I also tried to access an image directly in my views without having a version number in the static/ path and it seems to work. Nothing else broke so far. -Miguel On Wed, Oct 1, 2014 at 4:25 PM, lpg lucas@gmail.com wrote: Testing the latest 2.9.11 on GAE, seems like /admin app is breaking, since many static resources can't be found. I used the new web2py.py -G configure. However it seems like the .yaml may not have all the static routes? See Screenshot here: https://www.dropbox.com/s/6zbb2zezmfrzhxe/Screenshot% 202014-10-01%2019.24.36.png?dl=0 And here: https://www.dropbox.com/s/ywk8spbyd79oah2/Screenshot% 202014-10-01%2019.21.34.png?dl=0 -- 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+un...@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 a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/sN8mWOiCqgI/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/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+un...@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 a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit
[web2py] automated html helper converter?
Hello, I have a fair amount of HTML I would like to convert, but I would like to turn it into a function so I can use LOAD and have it automatically update each time a student guesses a question. I've tried implementing javascript, but couldn't get it to work. Is there an automated HTML Helper converter? I could use to wrap all of these div's together? What would be the best way to approach this problem? Here is my code: div id=challenge-accordion class=styled-accordion panel-group div class=panel panel-default div class=panel-heading a class=accordion-toggle toggle data-toggle=collapse data-parent=#answer-accordion href=#collapseAnswer{{ last_ten = db(db.questions_answered.question==request.vars['chal']).select(db.questions_answered.ALL, orderby=~db.questions_answered.id, limitby=(0,10))}} span class=chevron glyphicon glyphicon-chevron-up icon-white icon-small/span Previous Submissions /a /div div id=collapseFlag class=panel-body collapse div class=panel-body ul{{for answer in last_ten: if answer['correct'] == True:}} li class=correct{{=answer['submitted']}}/li {{else:}} li class=incorrect{{=answer['submitted']}} /li {{pass}} {{pass}} /ul /div /div /div /div -- 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] automated html helper converter?
Why do you need a function? Why not just make that HTML the view for your LOAD action? Also, you should pull that db select out of the view and put it in the controller. 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: automated html helper converter?
Hi Anthony, I think that is the ultimate goal. Wouldn't I have to use the helpers or is there someway to use the XML function in the load? I wouldn't even know where to start On Monday, October 13, 2014 11:41:50 PM UTC-4, Anthony wrote: Why do you need a function? Why not just make that HTML the view for your LOAD action? Also, you should pull that db select out of the view and put it in the controller. 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: automated html helper converter?
LOAD simply makes an Ajax call to a controller action, which has its own view and works like any other controller action. Your HTML would be in a template file, just like any other template. Check out the documentation on components: http://web2py.com/books/default/chapter/29/12/components-and-plugins#Components--LOAD-and-Ajax. 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] Regarding the defect with two auths in one app.
Hi, I made two auths auth and fileauth for my app. Now I have a problem with auth.is_logged_in() and fileauth.is_logged_in(). They both return True even if only one of them is logged in. Can you please find a solution? Regards, Nurendra Choudhary -- 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 set a default represent for all fields
I've gotten several complaints from my users about fields that display the value None. In some cases the actual field value could be None verses the database field just being empty (and displaying the value None). I've started using represent when I describe my tables so that an empty field displays '---': Field('aField',represent = lambda value,row: '---' if value == None else value) Is there a way to have web2py default to display '---' for an empty database field? This would be much easier that updating my table descriptions. 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: Create new website off entry in database
Massimo put together a series of 5 videos available on YouTube for a class he taught that are really helpful. In one of the videos, he walked through a tuturial for building a survey app with questions and answers (and other features). You may find it helpful with your app. I watched all 5 videos but decided afterwards that I should have kept notes, like an index or table of contents, for the videos which would have been helpful to go back and review specific topics. I started to create this index afterwards but it's far from complete. However, it does have an entry with the specific video and time within the video to help you get to the specific spot. Here it is: https://docs.google.com/spreadsheet/ccc?key=0AskUxMwC3JzwdDNYRGtSZ3NTSTVEQ1g1QnBfR0FMa1E If you watch more of the video, feel free to add to the index so maybe we'll have it become a complete index of all videos available. On Monday, October 13, 2014 12:20:33 PM UTC-4, LoveWeb2py wrote: I currently have this setup in my view: {{for question in all_questions:}} {{if question['difficulty']=='Hard':}} li class=paddeda href={{=question['id']}}{{=question['title']}}/a/li {{pass}} {{else:}} {{pass}} I want to be able to click on the link and load the question related to the database id in another div. To help with my question from earlier... what is the best way to achieve this? On Monday, October 13, 2014 9:58:57 AM UTC-4, LoveWeb2py wrote: Hello, I'm trying to create an application to help my teacher ask students questions but I'm not quite sure how to structure the MVC. Let's say I have 10 entries in the SQL database and my sql database looks something like this: db.define_table('teacher_questions', Field('id','integer'), Field('title','string'), Field('question','string'), Field('answer','string'), Field('hint','string'), Field('comments','string'), migrate=False) I could do a for loop to return all of the questions, but how could I make a link which points to specific questions. I also want the teacher to be able to add a new question and the list of questions will update automatically. In the page that pops up I want to have an input field which will take the students question and compare it against the answer in the database. If it is right it will use bootstrap success and say correct. If it is wrong it will use the bootstrap error. Is there an app that is already created or a model of a web page I could look at for guidance? I've been struggling with this concept for about a week now which is why I'm reaching out to the experts Any help is greatly appreciated... -- 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] Old bug, supposedly updated still occuring - unsupported format character
Line 50 with the error is not in my code and thus I would assume inserted by the framework. I am running the latest version. How do I resolve this? Error ticket for button Ticket ID 127.0.0.1.2014-10-13.08-20-54.0005b39b-3509-4030-8641-07be3a8e83ad type 'exceptions.ValueError' unsupported format character ':' (0x3a) at index 5 Version web2py™ Version 2.10.0-beta+timestamp.2014.09.24.13.35.58 Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Traceback (most recent call last): File /home/mc/development/web2py_api/gluon/restricted.py, line 224, in restricted exec ccode in environment File /home/mc/development/web2py_api/applications/button/controllers/data.py https://127.0.0.1:8000/admin/default/edit/button/controllers/data.py, line 50, in module File /home/mc/development/web2py_api/gluon/globals.py, line 393, in lambda self._caller = lambda f: f() File /home/mc/development/web2py_api/applications/button/controllers/data.py https://127.0.0.1:8000/admin/default/edit/button/controllers/data.py, line 37, in taxonomies grid = SQLFORM.smartgrid(db.taxonomy, linked_tables=['product', 'campaign'], user_signature=False) File /home/mc/development/web2py_api/gluon/sqlhtml.py, line 2926, in smartgrid grid.view_form.record)) File /home/mc/development/web2py_api/gluon/sqlhtml.py, line 2796, in format return table._format % row ValueError: unsupported format character ':' (0x3a) at index 5 In file: /home/mc/development/web2py_api/applications/button/controllers/data.py 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. __author__ = 'mc' import socket response https://127.0.0.1:8000/examples/global/vars/response.menu = [['Taxonomy', False, URL https://127.0.0.1:8000/examples/global/vars/URL('taxonomies')], ['Manufacturer', False, URL https://127.0.0.1:8000/examples/global/vars/URL('manufacturers')], #['Campaign', False, URL('campaign')] ] def index(): html = P https://127.0.0.1:8000/examples/global/vars/P('Welcome to the data administration section.') + P https://127.0.0.1:8000/examples/global/vars/P('Select an option from the Edit menu.') request.env.http_client_ip request.env.http_x_forwarded_for request.env.remote_addr if response https://127.0.0.1:8000/examples/global/vars/response: html += DIV https://127.0.0.1:8000/examples/global/vars/DIV( HTML https://127.0.0.1:8000/examples/global/vars/HTML('HOST: ') + str(request https://127.0.0.1:8000/examples/global/vars/request.env.http_host) + BR https://127.0.0.1:8000/examples/global/vars/BR() + HTML https://127.0.0.1:8000/examples/global/vars/HTML('HOSTName: ') + str(socket.gethostbyname(socket.gethostname())) + BR https://127.0.0.1:8000/examples/global/vars/BR() + HTML https://127.0.0.1:8000/examples/global/vars/HTML('HTTP Client IP: ') + str(request https://127.0.0.1:8000/examples/global/vars/request.env[http_client_ip]) + BR https://127.0.0.1:8000/examples/global/vars/BR() + HTML https://127.0.0.1:8000/examples/global/vars/HTML('HTTP X Forward: ') + str(request https://127.0.0.1:8000/examples/global/vars/request.env[http_x_forwarded_for]) + BR https://127.0.0.1:8000/examples/global/vars/BR() + HTML https://127.0.0.1:8000/examples/global/vars/HTML('REMOTE: ') + str(request https://127.0.0.1:8000/examples/global/vars/request.env[remote_addr]) , _class='alert alert-info', _role='alert') else: html += DIV https://127.0.0.1:8000/examples/global/vars/DIV('IP: No response object', _class='alert alert-info', _role='alert') html += DIV https://127.0.0.1:8000/examples/global/vars/DIV(BEAUTIFY https://127.0.0.1:8000/examples/global/vars/BEAUTIFY(request https://127.0.0.1:8000/examples/global/vars/request.user_agent()), _class='alert alert-info', _role='alert') return dict(message=html) def taxonomies(): grid = SQLFORM https://127.0.0.1:8000/examples/global/vars/SQLFORM.smartgrid(db.taxonomy, linked_tables=['product', 'campaign'], user_signature=False) return dict(grid=grid) def manufacturers(): grid = SQLFORM https://127.0.0.1:8000/examples/global/vars/SQLFORM.smartgrid(db.manufacturer, linked_tables=['manufacturer_brand', 'product', 'campaign'], user_signature=False) return dict(grid=grid) #def campaign(): #grid = SQLFORM.smartgrid(db.product, linked_tables=['campaign', 'product_view', 'product_sale'], user_signature=False) #return dict(grid=grid) response https://127.0.0.1:8000/examples/global/vars/response._vars=response https://127.0.0.1:8000/examples/global/vars/response._caller(taxonomies) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -
[web2py] LinkedIn API
Hey everyone I was wondering how to integrate the linkedin API with my web2py application I am currently running it on my local host as it is still in development. I found http://www.web2pyslices.com/slice/show/1541/integrating-linkedin-with-web2py. However I am unsure exactly what to do to get it up and running once those steps are completed. Essentially (And I hope this isn't asking too much) can someone who has used the api with web2py before maybe give me a walk through of some sort with exactly how this process works. Thanks everyone. -- 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] Adding an events calendar
Hey, I'm new to web2py and are creating a site as part of a course. I am looking at making an events page for a business that displays a calendar and the events on that calendar. I'm looking for some direction on how to go about this via a plugin/code, etc. Is there a plugin that will display a calendar for me, and then I just somehow link that to a database I will create and populate with events? Thanks in advance -- 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] Simple CSS for hover image to enlarge
I have a very simple css (below) to enlarge an image when hover over but it doesn't work when I try to use it with web2py view like this: src={{=URL('static','images/pic1.jpg')}}. Is there a way to make this work somehow or the only way to do this in web2py is by using java script? a class=thumb href=#img src=images/pic1.jpg alt=spanimg src=images/pic2.jpg style=width:500px alt=/span/a style .thumb span { position:absolute; visibility:hidden; } .thumb:hover, .thumb:hover span { visibility:visible; top:100px; left:450px; z-index: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] Error starting up scheduler with postgresql - type oid 114 not mapped to py
Hello, I am having some trouble starting up web2py's scheduler. I am working on a Ubuntu server, using web2py 2.9.9 deployed with nginx, and PostgreSQL. Everything works just right, but whenever I try to run the scheduler (python web2py.py -K myapp), I get continous *Error retrieving status* errors. The Scheduler object is being created in a model, and all the appropriate scheduler tables have been automatically created, so the issue does not seem to be there. If I modify scheduler.py to get some more info about the error, I see that the exception that generates this error message is NotSupportedError: type oid 114 not mapped to py type, thrown from here: '...web2py/gluon/scheduler.py, line 958, in send_heartbeat, mybackedstatus = db(sw.worker_name == self.worker_name).select().first()'. I found a similar error here (https://groups.google.com/forum/#!topic/web2py/BfSIbUSPk38), but I assumed in that case that the bug was on a custom table that person was using. Here I am simply trying to start the scheduler with PostgreSQL. I hope there is not a bug that prevents using the scheduler with PostgreSQL... Is there anything that I am missing, or that I am doing wrong? Thanks in advance, Sebastian -- 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: Apostrophe causes new column in PYFPDF
Thanks Professor, I'll contact them soon. Good luck on the promotion. I know how difficult a hurdle that is. You merit the post for many reasons; passion, dedication, technical insight and responsiveness. On Oct 10, 2014 1:17 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I am pretty sure this is a pyfpdf issue and you should report it to the maintainers. On Friday, 10 October 2014 08:00:49 UTC-5, Richard Warg wrote: Here are some additional observations- it only fails in tables, either inside a td/ or TD (). the actual application is using text from a database column. RTF and CSV output conversions work as expected with the same data. I suspect an issue with the pdf table conversion 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 a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/tOVmx3QJ5fo/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.
Re: [web2py] pg8000 driver that comes with web2py 2.8.2 is not supporting JSON field type?
Hi, I am facing the exact same issue. Any work-around for this? On Saturday, March 8, 2014 8:15:26 PM UTC+5:30, Tony Locke wrote: Thanks for your list (and patch) Mariano, that's very useful. I've opened an issue for it at: https://github.com/mfenniak/pg8000/issues/30 On Monday, 3 March 2014 20:26:15 UTC, Mariano Reingart wrote: Including contrib in sys.path would be interesting but there could be collisions (for example, in this case, witch pg8000 will be imported: the one installed or the one in gluon.contrib?) Tony: there are other changes needed for web2py (see the diff for web2py DAL I've attached earlier), the most important are: * missing __version__ attribute (now it is on setup.py, web2py need it to differentiate drivers capabilities) * connect doesn't suppor dsn string anymore (you need to pass keyword parameters) * set_client_encoding is not present anymore (you need to execute SQL SET ...) * server_version attribute has a leading underscore (_server_version), this is need to detect server capabilities like JSON Also, for the pg8000 driver currently in web2py, I'd applied many bugfixes reported in github / launchpad for the original project (mainly data types, unicode, importing, etc.) Also, I'd improved the psycopg2 compatibility (i.e. set_client_encoding, autocommit, set_isolation_level), implementing the simple query protocol (the one that uses psycopg2, and to avoid overhead of non-prepared statements) and two-phase commit support. The last would be important for web2py distributed_transaction_commit, but currently gluon.dal is sending raw SQL PREPARE TRANSACTION / COMMIT PREPARED / ROLLBACK PREPARED without using dbapi proposed methods TPC Connection Methods (tpc_begin, tpc_prepare, tpc_commit, tpc_rollback, tpc_recover) You can see the detail of the changes applied to the web2py contrib pg8000 here: https://code.google.com/p/pg8000/source/list https://github.com/reingart/pg8000/commits/master If this kind of changes could be accepted (psycopg2 compatibility, simple query protocol, dbapi 2.0 two-pass commit, etc.), I could help to make the pull requests (note that some could depend on each other). Sorry I couldn't keep track of pg8000 due lack of time, so I don't know what direction the project has taken. Best regards, Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On Mon, Mar 3, 2014 at 10:23 AM, Massimo Di Pierro massimo@gmail.com wrote: I agree with Niphlod. I do not like packages that need to be installed to work and explicit relative imports is better than absolute imports. Yet, this is not the only package we had to tweak to include in contrib. So this may come up again. Any objection to include contrib in sys.path? On Sunday, 2 March 2014 18:29:45 UTC-6, Niphlod wrote: as long as you can use it without installing it in sys.path, then it's fine. If not, it can't be shipped with web2py, just supported as a module. I don't like packages that needs a complete install to work. It's true that we have venvs for quite some time now, but a module with less than 10 files can accomodate for relative imports quite finely without impairing the code-reader in everyone of us :P BTW, search for explicit relative imports in that doc :-P On Sunday, March 2, 2014 7:24:58 PM UTC+1, Tony Locke wrote: Hi, I'm a contributor to pg8000 and if there are any changes you need to get pg8000 working with web2py, let me know. Looking at the absolute import problem, PEP8 seems to think absolute imports are the way to go: http://legacy.python.org/dev/peps/pep-0008/ http://www.google.com/url?q=http%3A%2F%2Flegacy.python.org%2Fdev%2Fpeps%2Fpep-0008%2Fsa=Dsntz=1usg=AFQjCNG8T4Krvic_V8TCmT4iog4T5e4pyg (search for 'relative' in the text) but I'm open to persuasion :-) Cheers, Tony. On Saturday, 1 March 2014 11:18:43 UTC, Joe Barnhart wrote: Hi Mariano -- I'd like to encourage you to keep making pg8000 a viable alternative for web2py. I started with it but had to change to psycopg2 because of some issues that postgres handled better under the psy driver. But I think pypy could be the future of python and it won't support a driver like psycopg2 -- but it could support pg8000 since it is all python. It's just good to have an alternative because no driver does it all. -- Joe B. On Tuesday, February 25, 2014 6:55:17 PM UTC-8, Mariano Reingart wrote: Hi Horst: Sadly there have been a lot of changes in pg8000, so it is not backward compatible with the current custom version in web2py. First, you need to delete the pg8000 folder in contrib, and put the new pg8000 folder (the one with __init__.py) directly in the web2py top level folder (at the same level as gluon). Note that the new pg8000 uses absolute imports that will not work if pg8000 is in contrib folder (or it should be added to the PYTHONPATH) Second, you need
[web2py] about format %Y-%m-%d
Hello, someone knows a javascript or method for a user that can not change %d, %m, and can not change that Y%.for %d, %m by default it's still January 01 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: Semantic UI instead of bootstap
I really like semantic ui. On Monday, 13 October 2014 09:19:34 UTC-5, Ramos wrote: is semantic UI a good frontend ? http://semantic-ui.com/ Regards -- 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.