[web2py] Re: Ajax function and returning Row, not string

2013-06-18 Thread Derek
Well, you're doing it wrong. I mean, the way you are calling the ajax function... ajax('rank', ['department'], 'seafarer_experience_rank'); What that does is calls 'rank' with the argument 'department' and replace the contents of the element whose ID is 'seafarer_experience_rank' with the res

[web2py] Re: row.id with "L" after upgrading to

2013-06-18 Thread Derek
If you aren't using google app engine, then that should be okay. However if you are, you shouldn't convert it to an INT because you'll get errors. On Tuesday, June 18, 2013 7:11:14 AM UTC-7, palomar wrote: > > I've just updated to 2.5.1 and I found this problem: > Inside my site have a google m

[web2py] Re: Web2py SOAP and local wsdl file

2013-06-17 Thread Derek
You aren't quite making sense. You want to create a soap server with web2py, but you want that to consume another soap server's api? why? On Monday, June 17, 2013 6:44:06 AM UTC-7, Barry Bridges wrote: > > > Hi all, > I'm trying to create a SOAP server which uses a local wsdl file supplied > by

[web2py] Re: Padding Error...

2013-06-14 Thread Derek
ease elaborate - many thanks > > > > On Friday, June 14, 2013 3:12:56 PM UTC-5, Derek wrote: >> >> It means your Base64 has incorrect padding. Those equals signs at the end >> are important. You can try adding some or subtracting some to get the >> correct padding.

[web2py] Re: Padding Error...

2013-06-14 Thread Derek
It means your Base64 has incorrect padding. Those equals signs at the end are important. You can try adding some or subtracting some to get the correct padding. Chances are, your data is corrupted. On Friday, June 14, 2013 10:15:49 AM UTC-7, Auden RovelleQuartz wrote: > > Does anyone here know

[web2py] Re: Session object gets written even when there is no change in the content

2013-06-11 Thread Derek
dea is to sort it by key first... On Tuesday, June 11, 2013 9:46:36 AM UTC-7, Derek wrote: > > I don't think it would be too difficult to solve. Just use an > 'OrderedDict' instead of a regular dict. > > http://docs.python.org/2/library/collections.html#collections.Or

[web2py] Re: Session object gets written even when there is no change in the content

2013-06-11 Thread Derek
I don't think it would be too difficult to solve. Just use an 'OrderedDict' instead of a regular dict. http://docs.python.org/2/library/collections.html#collections.OrderedDict On Tuesday, June 11, 2013 9:21:21 AM UTC-7, Aravindan Rs wrote: > > Hi, > > We use web2py in GAE environment and during

[web2py] Re: Passing a JSON to a Web2py-based server. What am I missing?

2013-06-10 Thread Derek
uild your own CSV serialization)...YAML has the > exact same issue, but CSV has a major limit... How do you pass two values > with the same name as {id : [1, 2] } with CSV :-D ? > > On Monday, June 10, 2013 7:10:41 PM UTC+2, Derek wrote: >> >> Post the whole tra

[web2py] Re: Passing a JSON to a Web2py-based server. What am I missing?

2013-06-10 Thread Derek
Post the whole traceback. Also, I just want to make the comment that what you put here is not valid json... {'POST' : 'query POST'} Single quotes aren't allowed. Verify your json by going here: http://jsonlint.com/ Also, before using JSON you might want to read the spec. http://www.json.org/

Re: [web2py] Re: Python 3 compatibility?

2013-06-06 Thread Derek
Well, that's an issue with breaking compatibility. I've seen it happen several times with Python 2.x to 3.x, Zope 2.x to 3.x and the whole Zope Five fiasco. The problem is when you break compatibility you are essentially telling your developers that all that hard work they did will have to be d

[web2py] Re: what is step to access to MSSQL

2013-06-04 Thread Derek
You need odbc installed. On Tuesday, June 4, 2013 2:01:13 PM UTC-7, Nam Soo In wrote: > > I am trying to access remote mssql > My working env is ubuntu and mssql 2008 > Do I need any additional installs? > Thank you. > > -- --- You received this message because you are subscribed to the Googl

[web2py] Re: app about page

2013-06-04 Thread Derek
Negative numbers would indicate lines deleted? Anyway, I think the graph is fine, it should be thought of like a heartbeat - if it's flatline, it's no good. On Sunday, June 2, 2013 2:47:49 AM UTC-7, BlueShadow wrote: > > >

[web2py] Re: AD LDAP manage_user problem

2013-06-03 Thread Derek
We need to see the whole traceback. On Monday, June 3, 2013 9:21:51 AM UTC-7, mrendon wrote: > > Hi. I'm trying to get email address and name attributes imported into my > database. I'm using Active Directory and version web2py > 2.4.7-stable+timestamp.2013.05.24.17.48.47. > I think I've follow

[web2py] Re: is_upper() no found

2013-06-03 Thread Derek
I am having a difficult time understanding what you want. 1. Do you want the form to give an error if the text is not in uppercase? 2. Or do you want to change the text to uppercase before saving the data? If you want it to change to uppercase, use the 'string = string.uppercase()' function. Th

[web2py] Re: offtopic: general python code required

2013-05-31 Thread Derek
not a bad try, i think it may be more beautiful with recursion. i'll give a stab at it. If Alan reads this, I suspect he can spit something out fast. On Friday, May 31, 2013 9:42:04 AM UTC-7, Massimo Di Pierro wrote: > > data = """0'a'

[web2py] Re: Found solution! cgi.FieldStorage problem exposed

2013-05-31 Thread Derek
me! > > https://groups.google.com/d/msg/web2py/XF0LbfNl9ag/j2DbOtR1mf0J > > On Thursday, May 30, 2013 9:51:05 AM UTC-7, Derek wrote: >> >> You ran into a bug (imho) that has existed in python since 2001 (at >> least). >> >> http://bugs.python.org/issue444913

[web2py] Re: Nested dictionaries / JSON to nested HTML-lists

2013-05-31 Thread Derek
Alan, that is a beautiful recursive function. On Friday, May 31, 2013 10:32:52 AM UTC-7, Alan Etkin wrote: > > > Now I would like to turn this into a nested html-list? How would I >> accomplish this task in web2py? (possibly by using html-helpers). >> > > # You can put something like the follow

[web2py] Re: parse in json

2013-05-31 Thread Derek
Add this at the top... T.lazy=False On Friday, May 31, 2013 5:29:21 AM UTC-7, Pawan Jha wrote: > > > row = db.executesql("SELECT * FROm > GetIncidentByIncidentId('"+Incidentid+"')") > T.force('hi') > MessageType=T('Please reach') > return MessageType > > list=[] > for i i

[web2py] Re: Found solution! cgi.FieldStorage problem exposed

2013-05-30 Thread Derek
You ran into a bug (imho) that has existed in python since 2001 (at least). http://bugs.python.org/issue444913 Now it's preserved for backwards compatibility. On Thursday, May 30, 2013 2:06:20 AM UTC-7, Joe Barnhart wrote: > > I've had the most awful time trying to get the actual filename of a

[web2py] Re: PAAS supporting web2py

2013-05-29 Thread Derek
You can take a look at Windows Azure - I believe they have quite a few datacenters in India. I'm in the process of setting up a site with them, and it's pretty simple. https://www.microsoft.com/india/azure/windows-azure-and-other-development-platforms.aspx On Monday, May 27, 2013 8:19:39 PM UTC

[web2py] Re: Preventing repeated submissions, or rate limiting submissions

2013-05-29 Thread Derek
Well, if the goal is to reduce the impact of the brute force, a cache decorator could work. The book shows a few methods, I like the method of caching the 'Render' result. You can set it to a low value like 1 second or so... On Wednesday, May 29, 2013 6:27:37 AM UTC-7, Calvin wrote: > > Just wo

[web2py] Re: Making RSS feed auto-detectable?

2013-05-29 Thread Derek
Usually the RSS feed is just a regular link on a page. Some readers will check all the hrefs for ending in RSS and then present that. On Wednesday, May 29, 2013 6:53:30 AM UTC-7, Lamps902 wrote: > > Thanks, Niphlod. So it does seem to be the case that I implemented the > standard method of emb

[web2py] Re: mysql db connections

2013-05-29 Thread Derek
d is concerned, but when i create the connections as i need them, I can run asynchronously. On Wednesday, May 29, 2013 5:38:00 PM UTC-7, Derek wrote: > > Have you tried to enable caching? > > On Sunday, May 26, 2013 1:07:53 PM UTC-7, Saba wrote: >> >> Thanks for the re

[web2py] Re: mysql db connections

2013-05-29 Thread Derek
Have you tried to enable caching? On Sunday, May 26, 2013 1:07:53 PM UTC-7, Saba wrote: > > Thanks for the reply. I really appreciate. I'm developing an app using > web2py to pull up records from mysql db and present it to the user using > custom views. It looks like sometimes it takes < 1sec to

[web2py] Re: Preventing repeated submissions, or rate limiting submissions

2013-05-28 Thread Derek
I'd agree with that approach. I write interfaces where we can have bursts of 100 messages a minute, and if I took all those requests and pushed them to the database, then the interactive users would experience delays. So, what I do is have a mandatory pause of 15 seconds between messages. So if

Re: [web2py] Re: Memory leak, SQLite, Windows (7, 2008)

2013-05-28 Thread Derek
Yea, of course in the real world you'd never use it that way, I've seen people baffled why the result set is returned out of order when they didn't specify an order. If there are multiple people using a database, sometimes the database may be in the middle of returning a resultset that is simil

[web2py] Re: web2py 2.4.7 is Out

2013-05-24 Thread Derek
*Navy Platinum Bulldog * On Friday, May 24, 2013 2:46:27 PM UTC-7, Alan Etkin wrote: > > El viernes, 24 de mayo de 2013 14:56:11 UTC-3, Massimo Di Pierro escribió: >> >> I posted web2py 2.4.7. Includes mostly bug fixes. > > > Codenamed? > -- --- You received this message because you are subscr

[web2py] Re: REF: Bare Ajax Login

2013-05-23 Thread Derek
You did read the book before you asked, yes? http://www.web2py.com/book/default/chapter/09#Access-Control-and-Basic-Authentication On Thursday, May 23, 2013 9:49:21 AM UTC-7, software.ted wrote: > > Is there a way of using a pure Ajax request to web2py authentication and > create a session for a

[web2py] Re: Dynamically loaded pages not found when link clicked from 'user' function/pages

2013-05-20 Thread Derek
I'd start by debugging - the variable in question would be 'request.folder'. does it change in some way when the current page is a 'user' page? On Monday, May 20, 2013 11:53:06 AM UTC-7, Lamps902 wrote: > > I have a few pages (about, FAQ, terms of service) that are loaded from > text files in t

[web2py] Re: What would be the best way to optimize/resize images after upload

2013-05-20 Thread Derek
lace it's check with the same function. On Monday, May 20, 2013 10:52:28 AM UTC-7, Derek wrote: > > That won't do anything. You want this: > db.table_name.picture.requires = RESIZE(200, 200) > > Form.requires probably does absolutely nothing. > > Your table name is

[web2py] Re: What would be the best way to optimize/resize images after upload

2013-05-20 Thread Derek
That won't do anything. You want this: db.table_name.picture.requires = RESIZE(200, 200) Form.requires probably does absolutely nothing. Your table name is 'test' and your field with the image is called 'pic' so to adapt the imageutils.py example to your site would be this: db.test.pic.requires

[web2py] Re: SPA vs ROCA (and greetings)

2013-05-20 Thread Derek
Where does it fall? Probably more near ROCA than SPA, but you can build your apps however you want. It's open enough to allow both of those use cases. OO may be helpful, but it's not necessary with Web2py. Web2py just gives you all the help you need to build your app as quickly as possible. It

[web2py] Re: A more concise way to update or insert?

2013-05-20 Thread Derek
Right, well, it sounds like you know what you want then. Some kind of update mechanism that doesn't take null fields. Nothing like that exists in Web2py, so that answers your question. However, the way I see it, you can write one fairly easily. Get your 'update' row, make it a dict (dict a). If t

[web2py] Re: GET and POST issue

2013-05-17 Thread Derek
Take a look here... http://www.web2py.com/book/default/chapter/11#Ajax-form-submission On Friday, May 17, 2013 11:21:38 AM UTC-7, Annet wrote: > > Hi Derek, > > Thanks for you reply. > > The key is, you want to submit via ajax, and make sure you do a 'return >> fa

[web2py] Re: GET and POST issue

2013-05-17 Thread Derek
Should be fine to have the form in a modal window. I do it on a lot of websites. The key is, you want to submit via ajax, and make sure you do a 'return false'. If there is an error in your javascript, you may see the post getting sent to the current url or the action setting of the form. On Fr

[web2py] Re: Regarding update count

2013-05-15 Thread Derek
Simple enough, check_count is a rows object, not an int. check_count=db(db.phalanx_request.url==single_md5_url[1]).select(db.phalanx_request.urlcount) That's a rowset. You'd want to probably just get the 'count' check_count=db(db.phalanx_request.url==single_md5_url[1]).select(db.phalanx_request.

[web2py] Re: CMS functionality

2013-05-13 Thread Derek
I don't see a question here. If you are asking if it would be possible, then yes. You wouldn't want to put your content in 'static' unless you want to bypass the web2py authentication and access control for it. On Monday, May 13, 2013 2:40:34 AM UTC-7, leon wrote: > > Hello, > I use DITA Open T

[web2py] Re: How can Web2py prevent web scraping?

2013-05-09 Thread Derek
I've read an idea about using a 'ticket' system... each session gets X # of tickets. Tickets regenerate at a fixed rate. Normal users would never run out of tickets. Each query operation would have a fixed cost of tickets. Inserts would cost double selects... You don't have to calculate regener

Re: [web2py] rad2py

2013-05-08 Thread Derek
Man, I love pythoncard. Too bad it hasn't been updated since 2006. On Tuesday, May 7, 2013 1:02:03 AM UTC-7, Mariano Reingart wrote: > > rad2py is in stand-by, I plan to finish it as my master thesis (maybe > the next semester). > It should be usable (including the debugger), but not for beggine

[web2py] Re: The Great Web Framework Shootout

2013-05-08 Thread Derek
.. > Please point me some performance problems and I'll fix and re-run the > tests. > > .oj > > On Wednesday, April 17, 2013 1:05:35 AM UTC+3, Derek wrote: >> >> Seems a bit low, but no way to really critique until we see the >> application. If you w

[web2py] Re: Web Frameworks Performance

2013-05-08 Thread Derek
Well, if you look at the benchmarks, several things stand out. 1. All the WSGI servers are pre-loaded. That means the code is already pre-compiled and loaded in ram, ready to run. Web2py doesn't quite work that way, because each request loads the database, does migrations if necessary, and inse

[web2py] Re: Passing javascript data to web2py controller using json?

2013-05-06 Thread Derek
You don't normally send just json data directly to a server. jquery will post data to a server to make it appear that a form was submitted. Generally as ""application/x-www-form-urlencoded" So it's a key:value format which is better than json anyway. If you did want to send a json string, you'd a

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-05-03 Thread Derek
It may be 0.01% difference on Python 2.7, but on PyPy, that's a 3x difference in speed there! On Friday, May 3, 2013 2:02:24 PM UTC-7, Arnon Marcus wrote: > > Well, no, since as I said, SQLA's "Identity Map" is actually equating the > primary-keys of the object, so I guess they got it right!

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-05-03 Thread Derek
Let's take a look at identity comparison vs integer comparison... import timeit setup = """ def isequalItems(itemone, itemtwo): return itemone is itemtwo def isequalInts(itemone, itemtwo): return itemone == itemtwo def testOne(): a = 1 b = 2 isequalItems(a,b) def testTwo():

[web2py] Re: Anyone used WHOOSH as search engine with web2py?

2013-05-01 Thread Derek
That's an interesting project. Have you taken a look at GIEWIKI? It's "tiddlywiki that runs on Google App Engine" and it is amazing. You can see it running here: http://giewiki.appspot.com/ It will work with most any tiddlywiki setup. The default of GIEWiki is more of a blog with comments, but y

[web2py] Re: Comparing floats in a database query

2013-05-01 Thread Derek
Comparing floats for equality is an issue with MySQL. Floats are rarely equal, since the internal representation can be different than the actual number. You'd want to use a different data type, or make your comparison a greater than or less than. On Wednesday, May 1, 2013 6:59:27 AM UTC-7, Ann

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-05-01 Thread Derek
You don't get to define terms any way you see fit. DAL and ORM have specific meanings. DAL is a TLA (three letter acronym) for "Database Abstraction Layer". ORM is a TLA for "Object Relational Mapping". So, what does a DAL do? Wikipedia tells us that it "... is an application programming inter

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Derek
Have you not tried just importing sqla in your 0.py model, and writing your models and code as you see fit? You can certainly bypass the DAL if you want. On Tuesday, April 30, 2013 1:49:53 PM UTC-7, Arnon Marcus wrote: > > Hi Massimo, > You should "really" watch this lecture: > http://lanyrd.com

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Derek
Agreed, you'd never do it this way. First of all, you have the ID already, so why would you use 'getItemByName'. Second, the getItemByName is flawed, it will return a set, not a single row. Third, if you are selecting anything, before you perform an action on it, you should at least verify that

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-29 Thread Derek
I think the issue here is that the feature you are proposing doesn't provide any real benefit, not many people are interested, it would take significant development time to implement, and potentially confuse new users of the software. The thing is, web2py is open source and released under the L

[web2py] Re: Sahana Eden GSOC Project - anybody interested?

2013-04-29 Thread Derek
Seems interesting, but impracticable. If you are on top of a mountain, how are you going to get cellular service? And if you do get service, why not just call someone and say "hey im stuck up here, get some help". Also, would I really want my local fire department (coast guard, police) monitori

[web2py] Re: Count and distinct

2013-04-26 Thread Derek
Now this makes sense. The book does not. On Thursday, April 25, 2013 2:27:34 PM UTC-7, Anthony wrote: > > db.person.id.count() returns an Expression object. It generates SQL like > "COUNT(person.id)". When it is passed to the .select(), the count is > returned as one of the columns in the result

[web2py] Re: Count and distinct

2013-04-25 Thread Derek
Yeah, I agree. I read the documentation and I have no clue what is happening there. Are there two people named Alex? Does 'Alex' own two items? Why is it grouping by person name instead of person id? Why is 'count' assigned as a count of person IDs, used as an argument in the select (presumably

Re: [web2py] SQL Server Connection String Please HELP

2013-04-24 Thread Derek
Don't need pyodbc, web2py comes with pypyodbc. On Tuesday, April 23, 2013 5:35:03 PM UTC-7, Richard wrote: > > Did you install pyodbc? > > Also, your connection string seems to me doubtfull : > > Mine start like that : > db=DAL() > > You should stick with db since it is a convention for us and may

[web2py] Re: Nice open source CMS (still maintained) in Web2py?

2013-04-24 Thread Derek
The builtin wiki works as a CMS.. other than that, instantpress. 1) create a new app 2) edit default.py so that def index(): return auth.wiki() 3) navigate to http:///yourappname https://groups.google.com/forum/#!topic/web2py/Y84vndej0jI/discussion On Wednesday, April 24, 2013 6:57:52 A

Re: [web2py] Re: how to avoid an overhead

2013-04-23 Thread Derek
Why not have a different function create the form, and use a cache decorator? @cache('createExpensiveForm',time_expire=3600,cache_model=cache.ram) def createExpensiveForm() form = expensive calculations here() return form then your mypage would look like so: def mypage() form=createE

Re: [web2py][share] usage_statistics

2013-04-23 Thread Derek
Be sure to put stuff like this that you want to share on http://www.web2pyslices.com . Searching the group for neat tricks is not something people generally do. On Tuesday, April 23, 2013 6:21:33 AM UTC-7, Richard wrote: > > Of course, what could be done, make a

[web2py] Re: Global (session) variable not updating (using components) until I refresh the page

2013-04-23 Thread Derek
also see this thread... https://groups.google.com/forum/?fromgroups=#!topic/web2py/I0qpV7P_Vrw -- --- 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+unsu

[web2py] Re: Global (session) variable not updating (using components) until I refresh the page

2013-04-23 Thread Derek
I think part of the problem may be that since you are loading all with AJAX, they may not be loading in the proper order. You might want to set the first one to ajax=False so that it will be loaded first, and the other two loaded after it. On Tuesday, April 23, 2013 12:23:10 PM UTC-7, Derek

[web2py] Re: Global (session) variable not updating (using components) until I refresh the page

2013-04-23 Thread Derek
Yes, sessions are not saved until the end of a request. You may want to consider putting the 'patient id' in a cookie, or using it as part of the URL, so you can use request.vars to retrieve it. On Tuesday, April 23, 2013 5:42:39 AM UTC-7, AnnG wrote: > > Hi, > I have a main patient input page w

[web2py] Re: jquery 2.0

2013-04-22 Thread Derek
I'd like to see it as a conditional load. if browser version > IE8 then load it. However, I think it would be cool to add requirejs to the default scaffolding. On Friday, April 19, 2013 6:43:22 AM UTC-7, Massimo Di Pierro wrote: > > it is out > > http://blog.jquery.com/2013/04/18/jquery-2-0-rele

[web2py] Re: anybody installed areyouahuman in web2py?

2013-04-22 Thread Derek
seems pretty poorly written. Their demo doesn't even work and generates multiple javascript errors on my pc. On Saturday, April 20, 2013 3:12:10 AM UTC-7, ad...@egasolineras.com wrote: > Ok, happy you like it. But my question was how to install it in web2py. > > My steps: > > - copy the ayah.py

[web2py] Re: gluon.main not part of Windows installation

2013-04-22 Thread Derek
http://effbot.org/pyfaq/what-is-init-py-used-for.htm and there are _init__.py files, so you are correct... On Monday, April 22, 2013 12:06:21 PM UTC-7, Derek wrote: > > *dots within the name of an imported module do in fact indicate a > hierarchy of directories* > > I thought i

[web2py] Re: gluon.main not part of Windows installation

2013-04-22 Thread Derek
*dots within the name of an imported module do in fact indicate a hierarchy of directories* I thought it only did that if there was an __init__.py... On Sunday, April 21, 2013 12:04:22 PM UTC-7, Anthony wrote: > > Although web2py is generally easy to use and set up, it does assume some > knowle

[web2py] Re: @cache decorator

2013-04-22 Thread Derek
M UTC-4, BlueShadow wrote: >> >> So you are basicly saying I did exactly what I wanted to do save the >> entire generated page on disk. >> So how can I find out what is taking so long for the page to load? >> >> @Derek: thats easy: I want the page cached from 00:

[web2py] Re: db select with rows

2013-04-22 Thread Derek
That does make it a list... temp = [x for x in db(db.tableB.id ==row.id).select()] would be more pythonic, no? On Sunday, April 21, 2013 1:58:51 AM UTC-7, Paolo valleri wrote: > > You get the last element simply because in the loop you have an > assignment. So that you will

Re: [web2py] Returning gzipped content, generic.json.gz ?

2013-04-22 Thread Derek
erver.py or any place when calling the wsgi application > as: > > from wsgitools.filters import WSGIFilterMiddleware, GzipWSGIFilter > # filter web2py wsgi application > wsgiapp = WSGIFilterMiddleware(gluon.main.wsgibase, GzipWSGIFilter) > > > > > > 2013/4/22 Derek

Re: [web2py] Re: The Great Web Framework Shootout

2013-04-22 Thread Derek
: > > session.forget() in a model called 0.py is best for this type of tests > Il giorno 22/apr/2013 19:59, "Derek" > ha > scritto: > >> here you go: >> 1 - db migration is enabled, you should only migrate once and unless you >> modify your model, you

[web2py] Re: The Great Web Framework Shootout

2013-04-22 Thread Derek
.com/seedifferently/the-great-web-framework-shootout/issues/14 > ... > Please point me some performance problems and I'll fix and re-run the > tests. > > .oj > > On Wednesday, April 17, 2013 1:05:35 AM UTC+3, Derek wrote: >> >> Seems a bit low, but no way to

Re: [web2py] Returning gzipped content, generic.json.gz ?

2013-04-22 Thread Derek
Unless you are using IE lower than 5.5, all clients support gzip. Looks like 'Rocket' doesn't though. You could modify the 'write' on line 1758 to gzip files though. Just have to set the content-length and content-encoding yourself. You could add in a check to see if it's supported... if 'gzip

Re: [web2py] Re: EmberJS is the web2py of the client! :)

2013-04-18 Thread Derek
What's the question that it's supposed to answer? On Thursday, April 18, 2013 8:13:55 AM UTC-7, Ramos wrote: > > is meteor the answer? > > > 2013/4/18 Magnitus > > >> I'm not even sure I'll go with Angular myself at this point. I'll delve >> more deeply into that framework once I feel I have a su

[web2py] Re: @cache decorator

2013-04-18 Thread Derek
Why would you be using 'returnDatestring + Somepage' as your key to the cache? On Thursday, April 18, 2013 9:17:36 AM UTC-7, BlueShadow wrote: > > Hi I got a site which calls some major calculating. So I thought lets use > the cache decoator to speed up second time loads. > But it doesnt seem t

[web2py] Re: The Great Web Framework Shootout

2013-04-16 Thread Derek
Seems a bit low, but no way to really critique until we see the application. If you were using the one in issue 14, I can point to several performance problems in that application already. Also, what version of web2py? One thing I noticed, you aren't using gevent or any other concurrency frame

Re: [web2py] Re: Async Web3Py ?

2013-04-16 Thread Derek
On Tuesday, April 16, 2013 1:43:13 PM UTC-7, Arnon Marcus wrote: > > Yup. As noted, there is a proliferation of c-extensions binding to various > event-loop implementations - no "native" one, not until 2014, that is... :) > > Still, it shows how doable things are even now for web2py the way it i

[web2py] Re: performance issue time to first byte

2013-04-15 Thread Derek
That looks like a nice increase. You might be able to get more than 100 users by using an evented wsgi instance. You can launch web2py with 'anyserver.py' using gevent, gunicorn, mongrel2. if using gevent, you could try the monkey.patch_all(). Also, with gevent, I like to add in sleep(0) betwee

[web2py] Re: ZeroMQ in web2py

2013-04-15 Thread Derek
And that's fine, but I still don't see the "need" for ZeroMQ in that example. It's not adding websocket support to a non-real-time web-app. It's only serving as the transport for messages from the webserver to the websocket server. You could accomplish that just fine with a regular TCP connecti

[web2py] Re: request.env.http_referrer

2013-04-12 Thread Derek
ah, you don't have a typo, you spelled the word right. unfortunately, in the spec it's spelled wrong! On Friday, April 12, 2013 4:38:18 AM UTC-7, Domagoj Kovač wrote: > > I have a typo :(, request.env.http_referer works. > > On Friday, April 12, 2013 1:27:10 PM UTC+2, Domagoj Kovač wrote: >> >> H

[web2py] Re: ZeroMQ in web2py

2013-04-11 Thread Derek
TCP is only the transport - you still have your application-specific protocols that you'd need to write. If your logstash gets a message like 'addlog "i like pizza" 07-11-2011' it doesn't know whether 'i like pizza' is an application, a status, or a priority level. So ZeroMQ isn't going to make

[web2py] Re: firebase anybody

2013-04-11 Thread Derek
Yup, it's very cool. On Thursday, April 11, 2013 9:34:55 AM UTC-7, Massimo Di Pierro wrote: > > Somebody pointed me to this: > >https://www.firebase.com > > Looks very interesting service. > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" g

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Derek
my performance fluctuates depending on the network. i have an Internal site that is a basic wsgi site, and i couldn't figure out why i was getting 200ms times. then one day i worked late, everyone else had gone home. all of a sudden i was getting 10ms. so it may have nothing to do with your c

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Derek
my performance fluctuates depending on the network. i have an Internal site that is a basic wsgi site, and i couldn't figure out why i was getting 200ms times. then one day i worked late, everyone else had gone home. all of a sudden i was getting 10ms. so it may have nothing to do with your c

Re: [web2py] Server performance (cpu/memory)

2013-04-10 Thread Derek
and how much ram and CPU does a simple wsgi server use? -- --- 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 opti

[web2py] Re: ZeroMQ in web2py

2013-04-10 Thread Derek
If you're talking about a webserver serving a database-backed website, I see no need to use it. Perhaps some esoteric uses could be found for it. On Wednesday, April 10, 2013 4:28:08 PM UTC-7, Massimo Di Pierro wrote: > > I really like 0MQ too but I would like to understand a typical test case >

[web2py] Re: ZeroMQ in web2py

2013-04-10 Thread Derek
I think the more software will esit that has it buil-in, the more easy it will become to build dynamically changing modular software infrastructures I have no idea what you are trying to say there. Anyway, yes, it's cool, you don't worry about message delivery because it's completely out of yo

[web2py] Re: integrating the stripe library into web2py

2013-04-10 Thread Derek
Yes. PCI has a self assessment though so you can check to be sure.. https://www.pcisecuritystandards.org/merchants/self_assessment_form.php On Wednesday, April 10, 2013 4:30:36 PM UTC-7, David Ripplinger wrote: > > Would the fact that the server processes the actual credit card number > (even th

[web2py] Re: legacy database with reserved word field name

2013-04-08 Thread Derek
try putting it in [brackets] or "quotes". On Sunday, April 7, 2013 7:32:03 PM UTC-7, Martin Barnard wrote: > > Continuing on my Oracle adventures, I have found a table which I need to > access, which has an integer field called '*drop*'. For *obvious*reasons, it > is disallowed. Is there any wa

[web2py] Re: How to - using DAL for "Between"

2013-04-08 Thread Derek
Of course, you could omit the db.issues.date_today <= request.now if you know for a fact there are no time travelers opening tickets in the future. ;) On Monday, April 8, 2013 6:27:18 AM UTC-7, Niphlod wrote: > > from datetime import timedelta > now = request.now > six_days_back = now - timedelt

[web2py] Pypy 2.0 beta2 - is there anyone testing this with web2py?

2013-04-07 Thread Derek
i tested with 1.9. worked without scheduler. no gevent though, so i stayed away from implementing it. should work with 2.0 -- --- 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, s

[web2py] Re: web2py with ExtJS - advice required on restructing

2013-04-05 Thread Derek
I'd suggest all the 'views' be placed in static. Your ExtJS should handle all the data. Add json services and let the ExtJS consume them. Note that you won't get form helpers or the security that web2py provides, but you get the authentication, DAL, automatic jsonifying and caching. On Thursda

[web2py] Re: any good open courses with web2py?

2013-04-05 Thread Derek
Post your code on github, link to it here, we could provide you a with a code review if that's what you're after. On Thursday, April 4, 2013 6:37:15 AM UTC-7, jjg0 wrote: > > Are there any good self paced learning courses on webdev with web2py? > > So far I am enjoying learning how to make webs

[web2py] Re: Article: Frameworks Round 2

2013-04-05 Thread Derek
take a hit in this setup because of their shim, but not by much. On Friday, April 5, 2013 12:41:47 PM UTC-7, Derek wrote: > > I've said in the past that they were unfair to Ruby because they were > using their ruby server in dev mode which recompiles code on every access. > >

[web2py] Re: Article: Frameworks Round 2

2013-04-05 Thread Derek
I've said in the past that they were unfair to Ruby because they were using their ruby server in dev mode which recompiles code on every access. This time, I looked more closely at their 'Flask' setup. They are running Flask via gunicorn, so you'd think all is good. However, they aren't setting

[web2py] Re: Server-Sent Events

2013-04-04 Thread Derek
1. How? Usually by a yield somewhere. Where? The already existing open connection knows where. 2. Slow down there, you're overthinking it. Web2py comes with this. Look at web2py/gluon*/contrib/*comet_messaging.py And... watch this video by Bruno Rocha http://vimeo.com/18399381 On Thursday, Ap

[web2py] Re: EmberJS is the web2py of the client! :)

2013-04-04 Thread Derek
g fun writing my own "framework". Perhaps one day I'll release it. As of now, it just connects via ldap, authorizes users, does sql queries (from sql written by hand) and outputs to json. WSGI is a nice PEP and makes writing your web apps or frameworks easier. On Wednesday, Apr

Re: [web2py] Re: EmberJS is the web2py of the client! :)

2013-04-04 Thread Derek
I read that metawidget thing and it seems interesting, can you write more about how to get metawidget working with web2py? On Wednesday, April 3, 2013 10:31:36 PM UTC-7, Alec Taylor wrote: > > On Thu, Apr 4, 2013 at 7:05 AM, Arnon Marcus > > > wrote: > > I agree that it does seem right now, th

[web2py] Re: need teaching advice (JS+jQuery)

2013-04-03 Thread Derek
Flickr, Panaramio, RSS to JSON (http://ejohn.org/projects/rss2json/) Yahoo YQL (http://developer.yahoo.com/yql/guide/response.html), Twitter, Salesforce.com... One thing that bugs me is that jQuery returns jQuery objects not dom objects, so certain things you want to do just don't work if you t

[web2py] Re: EmberJS is the web2py of the client! :)

2013-04-03 Thread Derek
And that's my whole issue with it, is you'd have two MVC frameworks that you'd have to work through, or you have static pages and your controller would just be a link back into the data access layer (DAL). Now, for Web3py that's maybe all that is needed - create a DAL, authentication, caching

[web2py] Re: Is there a stable web2py release for python 2.3?

2013-04-02 Thread Derek
No, it uses decorators, decimal, and generators, all not part of 2.3. The first release was in 2007, Python 2.4 came out in 2004. Sorry, no 2.3 python supporting version is available. On Friday, March 29, 2013 10:15:23 AM UTC-7, Javier Luis de los Mozos wrote: > > Hello, I manage a hosted web si

Re: [web2py] Re: EmberJS is the web2py of the client! :)

2013-04-02 Thread Derek
Eh, I don't see much of a need for a client side framework. Just client side templates. jQote2 works great for that. Submitting data via ajax is as simple as calling ajax('url',[data to be saved], ':eval'). Templates are the slowest part of a webserver (

[web2py] Re: I wonder where Web2Py stands here...

2013-04-01 Thread Derek
That particular benchmark was quite unfair to rails, they had configured it in dev mode which recompiles code on every request. Also, it's not unbiased. They've released a lot of their own software which is written in Java, and it pays to have your own software ranked as highest performance, es

<    1   2   3   4   5   6   7   8   9   >