[web2py] cpdb.py 'Cannot resolve reference auth_group in auth_permission'
I'm having the following messages when trying to copy a sqlite:// database. EXCEPTION: could not make a copy of the database 'Cannot resolve reference auth_group in auth_permission' When it happens, the only tables created in the database are: - auth_user - sqlite_sequence auth_permission.goup_id field references auth_group, so I guess that auth_group should be created before ... I don't know HOW cpdb.py is supposed to deal with the references... Is there a fix or a workaround to this problem? Regards Andre PS: Web2py 'Version 2.9.5-stable+timestamp.2014.03.16.02.35.39' -- 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: create web2py application with 2 database
El Wed, 8 Oct 2014 19:50:37 -0700 (PDT) Anthony abasta...@gmail.com escribió: 1 for fake data (tax reporting to government) Hmm, not sure I want to answer this one... it would be propper to rephrase that... to maybe... backup data?, or auxiliar information and definitely exclude the whole government part... ** back to sleep ** Marco. -- 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] Apsis Pro
Hello, has anybody used Apsis Pro mailinglist/newsletter API integration with web2py. I'm trying to get started but running into all kinds of problems. Kenneth -- 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] Pythonic coding
Good morning, I am developing a large app and have doubt about proper coding using web2py. Variables may have different web2py types e.g. int, row, rows, set. Does the web2py community has agreed on variable naming conventions from which the type can be derived. This will be convenient for software quality and coding speed. Richard D -- 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: Apostrophe causes new column in PYFPDF
Is the file where this code is in utf-8? I don't think it is. If you replace *Row's %*s %i with (u*Row's %*s %i).encode('utf-8') Does it work? Better yet just make sure to save the file with encoding utf-8 and change nothing. If it still doesn't work then I'm out of ideas and you can just escape the apostrophe using #39; -- 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: Pythonic coding
Why are you worrying about this? No, you should not use any variable naming convention (like hungarian notation http://en.wikipedia.org/wiki/Hungarian_notation) this goes completely against how Python should be coded IMO. -- 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: Pythonic coding
Like Leonel, it is a pretty bad idea... What happen when you change the type of your vars because you realize that it will be more convinient to use a dict than a list? You have to change the name of your variable all over the app, no no... In clean code chapter 2 page 23 section Avoid Encodings. Richard On Thu, Oct 9, 2014 at 9:10 AM, Leonel Câmara leonelcam...@gmail.com wrote: Why are you worrying about this? No, you should not use any variable naming convention (like hungarian notation http://en.wikipedia.org/wiki/Hungarian_notation) this goes completely against how Python should be coded IMO. -- 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. -- 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 web2py application with 2 database
see there - https://groups.google.com/forum/?fromgroups#!searchin/web2py/dal$20test$20prod/web2py/NCH0_lcWD_g/sPydNBZgPz0J Am Donnerstag, 9. Oktober 2014 02:00:24 UTC+2 schrieb 黄祥: hi, is it possible to create web2py application with 2 database? 1 for real data and 1 for fake data (tax reporting to government) if possible how can i achieve it using web2py application? 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/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: Pythonic coding
Thank you, I'll continue the way I was started. On Thursday, October 9, 2014 10:17:48 AM UTC+2, Richard wrote: Good morning, I am developing a large app and have doubt about proper coding using web2py. Variables may have different web2py types e.g. int, row, rows, set. Does the web2py community (do we) has agreed on variable naming conventions from which the type can be derived. e.g. what variable syntax belong to the following code: db(db.entity.id==10) db(db.entity.id10) db(db.entity.id10).select() db(db.entity.id==10).select().first().id which equals db.entity[10].id This will be convenient for software quality and coding speed. Richard D -- 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: a very selfish request
Seems like a reasonable request, good luck with your promotion, from what I've seen from your video lectures and comments from your students you clearly deserve it. -- 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 web2py application with 2 database
1 for real data and 1 for fake data (tax reporting to government) This may be the best question ever asked in this group. -- 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 web2py application with 2 database
Maybe 2 apps and 1 DB will deliver your requirements. On Thursday, October 9, 2014 2:00:24 AM UTC+2, 黄祥 wrote: hi, is it possible to create web2py application with 2 database? 1 for real data and 1 for fake data (tax reporting to government) if possible how can i achieve it using web2py application? 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/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: create web2py application with 2 database
:D On Thu, Oct 9, 2014 at 10:40 AM, Richard richard.dijks...@planet.nl wrote: Maybe 2 apps and 1 DB will deliver your requirements. On Thursday, October 9, 2014 2:00:24 AM UTC+2, 黄祥 wrote: hi, is it possible to create web2py application with 2 database? 1 for real data and 1 for fake data (tax reporting to government) if possible how can i achieve it using web2py application? 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/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. -- 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: create web2py application with 2 database
pardon me, for asking improper question in this group. i've been asked to create the application like this, but i don't have any clue for doing this in the background (database communication or the calculation for (real n fake) if i'm using 1 application with 2 database ) thanks, sorry n 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 (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: a very selfish request
how do I use the URLdo I paste text at the end of the string? do I paste the link into my Twitter account in the box that says compose new tweet and add my text afterwards? Alex Glaros -- 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: a very selfish request
I simply tweeted with the hashtag #massimo4full seems to have worked. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] web2py database
Can I user web2py with mssql server 7? Its an old version of mssql and web2py connects but could not do any crud. 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] shared hosting with mod_python, subdomain doesn't work
Greetings, i have a problem with subdomain. I have bought a hosting service and i'm running web2py on it. It's shared hosting with mod_python. (http://www.web2py.com/books/default/chapter/29/13/deployment-recipes#Shared-hosting-with-mod_python) Folders: /httpdocs/ /httpdocs/web2py files are here /httpdocs/applications/ /httpdocs/applications/mydomain (this works) /httpdocs/applications/subdomain (this works only in www.mydomain.com/subdomain) My homepage at mydomain.com works, and also my newsite at www.mydomain.com/subdomain works. But when i try subdomain.mydomain.com i get errors. Cpanel points mydomain to /httpdocs/ folder and also subdomain to same place. Routes.py is configured so that domain.com points to applications/domain folder and subdomain.domain.com points to applications/subdomain folder. Here is the error from logs: http://pastebin.com/KSfwBRXy What i'm doing wrong? -- 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] pythonanywhere
Hello, I realize that when deploying simple web2py applications on pythonanywhere, they get deployed via HTTPS so it is served as https://myuser.pythonanywhere.com. Is there any way to avoid this? I have not changed any default setting in web2py. Thanks in advance, Clara -- 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: a very selfish request
As long as your keep commitin :D -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Web2py on Pythonanywhere
Hello all, I have used python anywhere to deploy simple web2py applications. In the last few I updloaded onto pythonanywhere I realize that the website is served as an HTTPS (SSL enabled) application. I have not changed any default setting in web2py neither have I uncommented the line: # request.requires_https() in db.py. Looking at older loaded applications I can see that they are served as http applications. I really need the web2py applications in Pythonanywhere to not require SSL. Any help on this? Thank you! Clara -- 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 delete records where db.table.field value doesnt exist in list?
Hi, I have a list of names namelist = ['Niels', 'Bob', 'Frank', 'Pat', 'Ann'] I'd like to remove all records from a table where the name field does not have a name in the list. For example if all the above exist in the table Is there a function to do this or will I need to loop through each row in the table. I was thinking something like this might work? rows = db(db.people.name != namelist).select() del db.mytable[rows] -- 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: Limit SQLFORM.grid results
2014 m. spalis 8 d., trečiadienis 10:39:37 UTC+1, Niphlod rašė: 4) If all goes well and I close my eyes to the fact that user will retrieve slightly more records than I defined in *cache_count*, there still is a problem. If user would click on the table headers to change sort order - he would see *cache_count *number of records from the end of full dataset. (eg. *cache_count=10;* *paginate=4; returned **dataset=52; in this case user will be able to see first **12 rows, then reorder and see last 12 rows in the dataset, that is 24 rows in total instead of initially desired 10...)* Doesn't change what web2py can do. Even if we cut the number of rows displayed exactly as you wish (i.e. 13), they won't be the same if user changes ordering. If you want a fixed set of records that the user needs to see, you need to pass a query to the grid (i.e. db.table.id.belongs((1,2,3,4,5,6,7))). But this clearly defies what you started the question with, that was my users can see 1+m records anyway I have never said anything like you quoted, what I said though was: users who can get to the search page ideally would be able to search/see all the records. Meaning, that users has access to the 1+m records, however when they define search query, if one is not accurate enough, it can potentially return really large datasets, therefore I would like to limit output to the defined number of rows. Imagine you type in the google search web2py and hit enter. My browser yields ~373 000 matches, however I can only browse through the first 10 pages, that is equal to ~ 100 matches accessible to me, despite the fact that there are 372 900 other ones. My query was not accurate enough and it is obvious to me, obvious to google, that I will not click 37 290 more times, to browse among other matches, I must redefine my query. Does it make sense? What you have suggested is simply incorrect. -- 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 make search in grid/smartgrid case insensitive ? (v2.9.11)
Hi, I need case insensitive search in grid/smartgird. Is there a way to implement it ? My code looks like : def phone_catalogue_manage(): form = SQLFORM.grid(db.t_phone_catalogue) return locals() My database is sqlite. 2.9.11-stable+timestamp.2014.09.15.23.35.11 (Running on Apache/2.2.3 (CentOS), Python 2.6.8) -- 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: a very selfish request
If that URL does not work then try https://twitter.com/intent/tweet?text=%23massimo4full%20 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: How to delete records where db.table.field value doesnt exist in list?
db(~db.people.name.belongs(namelist)).delete() Anthony On Thursday, October 9, 2014 1:45:23 PM UTC-4, Niels Jensen wrote: Hi, I have a list of names namelist = ['Niels', 'Bob', 'Frank', 'Pat', 'Ann'] I'd like to remove all records from a table where the name field does not have a name in the list. For example if all the above exist in the table Is there a function to do this or will I need to loop through each row in the table. I was thinking something like this might work? rows = db(db.people.name != namelist).select() del db.mytable[rows] -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py database
I've used it with SQL 2000. Don't try to use legacy tables though. On Wednesday, October 8, 2014 10:46:08 PM UTC-7, T.R.Rajkumar wrote: Can I user web2py with mssql server 7? Its an old version of mssql and web2py connects but could not do any crud. Thank you. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: web2py trunk is broken??
I should make a fossil repo and update it rarely. On Wednesday, October 8, 2014 1:32:35 PM UTC-7, LightDot wrote: Googlecode and Github repos are equal, there are no plans to abandon either one, AFAIK. I'll raise this up on the devel list. I just pulled from both, made a diff and there really is a problem at the moment. I'll report the issue in a bit. This happened a couple of times in the past and was always fixed quickly. Regards On Wednesday, October 8, 2014 8:34:11 PM UTC+2, Jim S wrote: Me too, not a git user, only have a github account to keep up with the latest web2py developments. Personally, I'd really like to see the mercurial repos to still be available, but I understand it makes sense to only keep one. On Wed, Oct 8, 2014 at 1:30 PM, Dave S snide...@gmail.com wrote: On Monday, October 6, 2014 9:48:48 AM UTC-7, Jim S wrote: Any options to clone/pull using Mercurial? Mercurial has the Convert extension that covers Git repos, and another one that I think only does Git, but I haven't tried accessing GitHub with them. Web2py is the only reason I have a GitHub account, and I just do a download from the web interface instead of a pull. /dps -- 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/pvVGtt7lpdc/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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Apsis Pro
Looks good! Can you tell us more or less how much it cost? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: How to delete records where db.table.field value doesnt exist in list?
Thanks! So simple, I reread the docs after your reply and can't believe I missed it. -- 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: a very selfish request
After some thinking, I tweeted and, by doing so, I probably put at stake your promotion, with my bad reputation. Sorry ;-) Massimo thank you for you work. Lucky your students. You deserve a load of tweets! mic 2014-10-09 22:22 GMT+02:00 Iuri Guilherme dos Santos Martins aindatenhoco...@gmail.com: If that URL does not work then try https://twitter.com/intent/tweet?text=%23massimo4full%20 -- 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. -- 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: Embed Tweets
Thanks Massimo My nose has been too close to the ground. The code which led me in that direction was adapted from - web2py Complete Reference Manual, 6th Edition. I think changes in Twitter's login has invalidated the snippets in Chapter 14. Thanks for the heads up I'll give the embedded timeline a shot.Regards On Thursday, October 9, 2014 8:52:53 AM UTC+10, Massimo Di Pierro wrote: why server side when you can do it client side? https://dev.twitter.com/web/embedded-timelines On Monday, 6 October 2014 22:48:51 UTC-5, Nate wrote: How do I embed my tweets when I create a page in web2py? Many Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Problem combining two queries into one
It is difficult to understand... Your combined query is not the same as the splitted one... groupID=db((db.groups.ownerID==5) db((db.groups.ownerID==id) In one case you pass id not 5... What you appear to do is a join... I don't know why it is not working because you don't explecitly tell us what is the difference in the output in both case split and merged query. Does it return error? Does it return rows but you don't get the rows you want... Notice that when you have more than one table in a query you have to specify the table and field to recorver row value not just the field name for disambiguation in case there is 2 fields with the same name in both table: Query one table : row[fieldname] Query two tables : row[table_name][fieldname] You can try with join web2py syntax that render an SQL Join request according to ANSI-92 join syntax (your request lead to ANSI-89 syntax) Try this : db((db.groups.ownerID == 5) (db.node.computedSubClassID==SC_RELATEDNAMES)).select(join=[db.groups.on(db.groups.nodeID == db.node.id), db.membership.on(db.membership.nodeID == db.node.id), db.membership.on(db.membership.groupID == db.node.id]) Hope it helps, I am not sure if what I wrote is gonna lead to the result you want, but the idea is there. One last thing you can do for debugging is to extract the SQL of you web2py query : db((db.groups.ownerID == 5) (db.node.computedSubClassID==SC_RELATEDNAMES)) ._select(join=[db.groups.on(db.groups.nodeID == db.node.id), db.membership.on(db.membership.nodeID == db.node.id), db.membership.on(db.membership.groupID == db.node.id]) Notice the underscode... It will return a string of the SQL generated by web2py for the query... So you may have more clue on what is wrong with the way to write you web2py query by seeing what the SQL is... Richard On Mon, Apr 15, 2013 at 3:43 AM, Annet anneve...@googlemail.com wrote: I have a query, which when I split it up in two queries works and doesn't work when I combine the two into one query. The following code works: groupID=db((db.groups.ownerID==5)(db.groups.nodeID==db.node.id )(db.node.computedSubClassID==SC_RELATEDNAMES)).select().first(). groups.id rows=db((db.membership.groupID==groupID)(db.membership.nodeID==db.node.id )).select() However, these two combined doesn't work: rows=db((db.groups.ownerID==id)(db.groups.nodeID==db.node.id )(db.node.computedSubClassID==SC_RELATEDNAMES)(db.groups.id ==db.membership.groupID)(db.membership.nodeID==db.node.id)).select() The problems is caused by this part of the code: (db.membership.nodeID== db.node.id) Why? Kind regards, Annet -- --- 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/groups/opt_out. -- 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: a very selfish request
sent. Best luck Massimo! 2014-10-09 21:01 GMT-03:00 Michele Comitini michele.comit...@gmail.com: After some thinking, I tweeted and, by doing so, I probably put at stake your promotion, with my bad reputation. Sorry ;-) Massimo thank you for you work. Lucky your students. You deserve a load of tweets! mic 2014-10-09 22:22 GMT+02:00 Iuri Guilherme dos Santos Martins aindatenhoco...@gmail.com: If that URL does not work then try https://twitter.com/intent/tweet?text=%23massimo4full%20 -- 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. -- 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. -- []'s Marco Tulio -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] web2py DAL bug: OperationalError - MySQL server has gone away while closing a connection in pool
Environment: Ubuntu 12.04; Web2py 2.9.11-stable Let me describe the problem as below: - We use 2 DAL instance talking to 2 different databases, each with a connection pool of 10 - We make many frequent DAL calls using both the DAL connections which results in many objects in the connection pool - At some point, web2py starts throwing an OperationalError with MySQL server has gone away when closing a connection. The stack trace is as below: S'Traceback (most recent call last):\n File “.../app/gluon/main.py, line 543, in wsgibase\nBaseAdapter.close_all_instances(\'rollback\')\n File “.../app/gluon/dal.py, line 611, in close_all_instances\n db._adapter.close(action)\n File “.../app/gluon/dal.py, line 591, in close\ngetattr(self, action)()\n File “…/app/gluon/dal.py, line 1922, in rollback\nreturn self.connection.rollback()\nOperationalError: (2006, \'MySQL server has gone away\')\n' This made the whole app very unstable with error tickets occurring almost for every action. We had tried wrapping all our DAL with exception handlers for this error but we were unable to get this sorted. Eventually, the only way I could fix this is to put an exception handler around the the code block which is throwing the error as below: # added this to line 611 in dal.py try: db._adapter.close(action) except: pass Note this, this error is reproducible in older versions of web2py as well. I would like to bring this forward to the group for further action on the same. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: How to make search in grid/smartgrid case insensitive ? (v2.9.11)
Please open a ticket. We should be able to pass a parameter. On Thursday, 9 October 2014 04:09:47 UTC-5, Nikos Papageorgiou wrote: Hi, I need case insensitive search in grid/smartgird. Is there a way to implement it ? My code looks like : def phone_catalogue_manage(): form = SQLFORM.grid(db.t_phone_catalogue) return locals() My database is sqlite. 2.9.11-stable+timestamp.2014.09.15.23.35.11 (Running on Apache/2.2.3 (CentOS), Python 2.6.8) -- 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: a very selfish request
Thanks everybody. I am out of words. On Thursday, 9 October 2014 21:53:37 UTC-5, Marco Tulio wrote: sent. Best luck Massimo! 2014-10-09 21:01 GMT-03:00 Michele Comitini michele.comit...@gmail.com: After some thinking, I tweeted and, by doing so, I probably put at stake your promotion, with my bad reputation. Sorry ;-) Massimo thank you for you work. Lucky your students. You deserve a load of tweets! mic 2014-10-09 22:22 GMT+02:00 Iuri Guilherme dos Santos Martins aindatenhoco...@gmail.com: If that URL does not work then try https://twitter.com/intent/tweet?text=%23massimo4full%20 -- 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. -- 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. -- []'s Marco Tulio -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py DAL bug: OperationalError - MySQL server has gone away while closing a connection in pool
Can you please open a ticket about this? On Thursday, 9 October 2014 23:15:14 UTC-5, Babu Annamalai wrote: Environment: Ubuntu 12.04; Web2py 2.9.11-stable Let me describe the problem as below: - We use 2 DAL instance talking to 2 different databases, each with a connection pool of 10 - We make many frequent DAL calls using both the DAL connections which results in many objects in the connection pool - At some point, web2py starts throwing an OperationalError with MySQL server has gone away when closing a connection. The stack trace is as below: S'Traceback (most recent call last):\n File “.../app/gluon/main.py, line 543, in wsgibase\nBaseAdapter.close_all_instances(\'rollback\')\n File “.../app/gluon/dal.py, line 611, in close_all_instances\n db._adapter.close(action)\n File “.../app/gluon/dal.py, line 591, in close\ngetattr(self, action)()\n File “…/app/gluon/dal.py, line 1922, in rollback\nreturn self.connection.rollback()\nOperationalError: (2006, \'MySQL server has gone away\')\n' This made the whole app very unstable with error tickets occurring almost for every action. We had tried wrapping all our DAL calls with exception handlers for this error but we were unable to get this sorted. Eventually, the only way I could fix this is to put an exception handler around the code block which is throwing the error as below: # added this to line 611 in dal.py try: db._adapter.close(action) except: pass Note that, this error is reproducible in older versions of web2py as well. I would like to bring this forward to the group for further action on the same. -- 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] ajax question
I need to update multiple targets when a link is clicked. This example builds a list of links. When the link is clicked, the callback needs to populate two different parts of the .html file. The actual application uses bokeh for plotting. The table of links is created dynamically. The user will click on a link, the 'linkDetails1' and 'linkDetails2' will hold the script and div return from calls to bokeh.component() The user will click on a link, and the script, div returned from bokeh's component() function will populate the 'linkDetails'. Obviously this naive approach does not work. How can I make a list of links that when clicked on will populate two separate places in the .html file? #views/default/test.html: {{extend 'layout.html'}} {{=linkDetails1}} {{=linkDetails2}} {{=links}} # controllers/default.py: def test(): example action using the internationalization operator T and flash rendered by views/default/index.html or views/generic.html if you need a simple wiki simply replace the two lines below with: return auth.wiki() d = dict() links = [] for ii in range(5): link = A(click on link %d%ii, callback=URL('linkHandler/%d'%ii), ) links.append([Item %d%ii, link]) table = TABLE() table.append([TR(*rows) for rows in links]) d[links] = table d[linkDetails1] = linkDetails1 d[linkDetails2] = linkDetails2 return d def linkHandler(): import os d = dict() # request.url will be linked/N ii = int(os.path.split(request.url)[1]) # want to put some information into linkDetails, some into linkDiv # this does not work: d = dict() d[linkDetails1] = linkHandler %d%ii d[linkDetails2] = linkHandler %d%ii return d -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py DAL bug: OperationalError - MySQL server has gone away while closing a connection in pool
Thanks for the reply Massimo. Raised a new ticket Issue 1995 https://code.google.com/p/web2py/issues/detail?id=1995. On Friday, October 10, 2014 10:14:31 AM UTC+5:30, Massimo Di Pierro wrote: Can you please open a ticket about this? On Thursday, 9 October 2014 23:15:14 UTC-5, Babu Annamalai wrote: Environment: Ubuntu 12.04; Web2py 2.9.11-stable Let me describe the problem as below: - We use 2 DAL instance talking to 2 different databases, each with a connection pool of 10 - We make many frequent DAL calls using both the DAL connections which results in many objects in the connection pool - At some point, web2py starts throwing an OperationalError with MySQL server has gone away when closing a connection. The stack trace is as below: S'Traceback (most recent call last):\n File “.../app/gluon/main.py, line 543, in wsgibase\nBaseAdapter.close_all_instances(\'rollback\')\n File “.../app/gluon/dal.py, line 611, in close_all_instances\n db._adapter.close(action)\n File “.../app/gluon/dal.py, line 591, in close\ngetattr(self, action)()\n File “…/app/gluon/dal.py, line 1922, in rollback\nreturn self.connection.rollback()\nOperationalError: (2006, \'MySQL server has gone away\')\n' This made the whole app very unstable with error tickets occurring almost for every action. We had tried wrapping all our DAL calls with exception handlers for this error but we were unable to get this sorted. Eventually, the only way I could fix this is to put an exception handler around the code block which is throwing the error as below: # added this to line 611 in dal.py try: db._adapter.close(action) except: pass Note that, this error is reproducible in older versions of web2py as well. I would like to bring this forward to the group for further action on the same. -- 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.