Re: [web2py] SASS experience

2010-05-04 Thread Thadeus Burgess
I use clevercss for large projects, which is similar to SASS. However, for dynamic css I use it as a template. And for small apps I just write css straight up in the static folder. -- Thadeus On Tue, May 4, 2010 at 9:12 AM, Carl wrote: > hi, > > Is anyone using SASS to manage their CSS defi

Re: [web2py] Re: SASS experience

2010-05-04 Thread Thadeus Burgess
them > outside of CleverCSS or a third way? > > > > On May 4, 5:27 pm, Thadeus Burgess wrote: >> I use clevercss for large projects, which is similar to SASS. >> >> However, for dynamic css I use it as a template. And for small apps I >> just write c

Re: [web2py] Re: SASS experience

2010-05-04 Thread Thadeus Burgess
, 2010 at 12:50 PM, Carl wrote: > perhaps it's time I dropped the css I've adopted from web2py! :) > > On May 4, 6:04 pm, Thadeus Burgess wrote: >> I do not understand. I do not have any web2py css files. >> >> -- >> Thadeus >> >> >> >

Re: [web2py] Re: First web2py app

2010-05-04 Thread Thadeus Burgess
Please, do tell! -- Thadeus On Tue, May 4, 2010 at 3:20 PM, mdipierro wrote: > We look forward to hear verything. ;-) > > On May 4, 1:07 pm, ScOut3R wrote: >> Hey There! >> >> My first web2py application started as a learning course and the >> application was designed for personal use but I

[web2py] Kill DAL

2010-05-04 Thread Thadeus Burgess
I have a DAL instance that I want to tear down so the database becomes unlocked. How can I accomplish this? -- Thadeus

[web2py] Re: Kill DAL

2010-05-04 Thread Thadeus Burgess
t up again. -- Thadeus On Tue, May 4, 2010 at 3:58 PM, Thadeus Burgess wrote: > I have a DAL instance that I want to tear down so the database becomes > unlocked. > > How can I accomplish this? > > -- > Thadeus >

Re: [web2py] Re: Kill DAL

2010-05-04 Thread Thadeus Burgess
, 2010 at 4:33 PM, mdipierro wrote: > db.close() ? > > On May 4, 4:22 pm, Thadeus Burgess wrote: >> More info: >> >> I have an "sqlite://:memory:" dal connection. I am reusing this memory >> database for unit testing. >> >> I need to compl

Re: [web2py] Re: Caching downloads

2010-05-04 Thread Thadeus Burgess
What webserver are you using? You could use the X-Sendfile header if it supports it. This way the webserver will send cache headers and web2py does not have to serve them. -- Thadeus On Tue, May 4, 2010 at 9:25 PM, mdipierro wrote: > response.stream (which you use) handles if-modified-since

Re: [web2py] Re: Caching Advise !

2010-05-05 Thread Thadeus Burgess
If your images are fairly large they are going to be slow no matter what. You probably need two versions, a mini thumbnail version, and then the original. On your main page just display the thumbnails, they will load quite fast, but you can link them to the original. -- Thadeus On Tue, May 4

Re: [web2py] Re: First web2py app

2010-05-05 Thread Thadeus Burgess
Nice work! -- Thadeus On Tue, May 4, 2010 at 11:02 PM, Yarko Tymciurak wrote: > > On May 4, 4:19 pm, ScOut3R wrote: >> Here it goes. First of all, I'm not a developer by profession, not >> even a web developer. You'll notice it on the design. By the way, I >> like the default style mdipierr

Re: [web2py] Re: Different results in console vs. script

2010-05-05 Thread Thadeus Burgess
I am about to post a unittesting module as part of web2py_utils, it takes out all needed configurations for unittesting and makes it dead simple. -- Thadeus On Wed, May 5, 2010 at 9:01 AM, mdipierro wrote: > I am lost. If you want send me you app and data (confidentially) I > will take a loo

Re: [web2py] Re: blocks in template

2010-05-05 Thread Thadeus Burgess
{{include}} must stay there for backwards compatibility. Basically, {{include}} will take any line from the child template that is not in a block that is declared in the parent and places it in {{include}} Simply, what gets left over is put into {{include}}. Lets see if I understand you correctly

Re: [web2py] Re: Different results in console vs. script

2010-05-05 Thread Thadeus Burgess
les B) A runner script to actually start the tests. Since it relies on the path to [A] -- Thadeus On Wed, May 5, 2010 at 11:07 AM, Jonathan Lundell wrote: > On May 5, 2010, at 8:59 AM, Thadeus Burgess wrote: > >> I am about to post a unittesting module as part of web2py_utils, it &

Re: [web2py] Deployment Recipes Page 281

2010-05-05 Thread Thadeus Burgess
The apt with super cow powers on a Mac! (eyes grow big in astonishment!) BLASPHEMY. -- Thadeus On Wed, May 5, 2010 at 2:56 PM, Yannick wrote: > Hello mate, > Sorry to bug you with that...it may be an offline question... Maybe > this is pretty easy but i was wondering the book give an exa

Re: [web2py] Re: Different results in console vs. script

2010-05-05 Thread Thadeus Burgess
OK. Thank you for the idea. You will be happy :) -- Thadeus On Wed, May 5, 2010 at 2:00 PM, Jonathan Lundell wrote: > On May 5, 2010, at 9:13 AM, Thadeus Burgess wrote: > >> It supports nosetests which includes a coverage plugin. I will look >> into adding the option sta

Re: [web2py] Re: Web2py Utilities

2010-05-05 Thread Thadeus Burgess
http://code.google.com/p/blogitizor/ -- Thadeus On Wed, May 5, 2010 at 6:48 PM, Matthew wrote: > s is excellent! I know that the documentation is in its early > stages, but are there any examples you can point to where this has > been us

Re: [web2py] Re: blocks in template

2010-05-05 Thread Thadeus Burgess
Right. As much as I would like the functionality... This cannot be done as the system stands. Child templates know nothing of their parent, therefore they are unable to request anything from the parent template. The way that you effectively override a block is by effort of the parent looking at a

Re: [web2py] Re: blocks in template

2010-05-05 Thread Thadeus Burgess
It might be possible for the parent to look into its children, and analyze the child blocks, and if a block in the child contains a {{super }} it can then take its own value and replace it into the {{super me}}. -- Thadeus On Wed, May 5, 2010 at 9:56 PM, Thadeus Burgess wrote: > Ri

Re: [web2py] Re: blocks in template

2010-05-05 Thread Thadeus Burgess
he speed of template processing? > > On May 5, 9:57 pm, Thadeus Burgess wrote: >> It might be possible for the parent to look into its children, and >> analyze the child blocks, and if a block in the child contains a >> {{super }} it can then take its own value an

Re: [web2py] Re: blocks in template

2010-05-05 Thread Thadeus Burgess
Wed, May 5, 2010 at 10:14 PM, Thadeus Burgess wrote: > I can't really say, we need some tests to analyze the effects of this. > > I am thinking of a way that might not include any extra overhead at all. > > -- > Thadeus > > > > > > On Wed, May 5, 2010

Re: [web2py] Re: blocks in template

2010-05-05 Thread Thadeus Burgess
I am confident this will break some blocks to that., although I am not >> sure how far, I am sure it's in the right direction. >> >> - Yarko >> >> >> >> > -- >> > Thadeus >> >> > On Wed, May 5, 2010 at 10:02 PM, mdipierro wro

Re: [web2py] Re: blocks in template

2010-05-05 Thread Thadeus Burgess
left over from body -- Thadeus On Wed, May 5, 2010 at 11:45 PM, mdipierro wrote: > wow. what else can I say. wow. > > On May 5, 10:45 pm, Thadeus Burgess wrote: >> Yarko, I am done. No overhead, just an extra dictionary with pointers in >> memory. >> >> Yes you

Re: [web2py] Re: Top 3 web2py features

2010-05-06 Thread Thadeus Burgess
1) DAL ( like SQL, runs almost anything, very logical and natural if you are used to writing pure SQL all the time ) 2) All in one package (batteries included) 3) Simplicity. -- Thadeus On Thu, May 6, 2010 at 10:33 AM, Jonathan Lundell wrote: > On May 6, 2010, at 8:28 AM, mdipierro wrote: >

Re: [web2py] Re: ORM-like DAL

2010-05-06 Thread Thadeus Burgess
I frankly remember a guy posting something (github?) that makes an ORM for the DAL, and it was a class you could almost put any kind of database to it. I too have been curious where this snippet of code ran off too. -- Thadeus On Thu, May 6, 2010 at 9:53 AM, mdipierro wrote: > I think you r

Re: [web2py] Re: blocks in template

2010-05-06 Thread Thadeus Burgess
Ok. But the purpose of layout.html is to define the "layout". It is effectively the parent who pays for the house and determines what room the child gets. I don't think I am quite fully grasping the concept that you have. Could you provide me with a code example of how you would like it to look, a

Re: [web2py] Re: blocks in template

2010-05-06 Thread Thadeus Burgess
gt; On May 6, 12:02 pm, Yarko Tymciurak > wrote: >> On May 6, 10:59 am, Thadeus Burgess wrote: >> >> > Ok. But the purpose of layout.html is to define the "layout". It is >> > effectively the parent who pays for the house and determines what room >&g

Re: [web2py] Re: blocks in template

2010-05-06 Thread Thadeus Burgess
So don't use {{include}} just use blocks, and override them. You don't Have to use {{include}} anymore, as you said it is effectively deprecated (although I find usefull for being lazy :) -- Thadeus On Thu, May 6, 2010 at 12:26 PM, Yarko Tymciurak wrote: > t is, your guests come to the addre

Re: [web2py] Re: blocks in template

2010-05-06 Thread Thadeus Burgess
hat events might appear in a different layout from documents, for example. >> >> Anyway, I offer this as food for thought. >> >> Best wishes, >> >> --r. >> On May 6, 2010, at 10:02 AM, Yarko Tymciurak wrote: >> >> >> >> > On M

[web2py] Web2py Utils now on the CheeseShop, With a new unittesting module

2010-05-06 Thread Thadeus Burgess
The documentation will now live on the cheeseshop. http://packages.python.org/web2py_utils/ You can now easy_install it This release includes a new Test Runner module, to help properly UnitTest web2py applications. It includes WebTest, Nosetests, Coverage support, as well as creating a fake web2

Re: [web2py] Re: blocks in template

2010-05-06 Thread Thadeus Burgess
Extend will effectively make the template its parent in the tree. Include will parse the template, and take its response and stick it in the tree at that point. An included file does not have access to its parents blocks, because it is effectively become part of the original template. So an inclu

Re: [web2py] Re: blocks in template

2010-05-06 Thread Thadeus Burgess
I need an example of "dynamic skin behavior". Code. (even if pseudocode). I need some code to understand. -- Thadeus On Thu, May 6, 2010 at 1:48 PM, Yarko Tymciurak wrote: > ther than fixing the point of responsibility point, and making the > actions naturally there to try to enable effecti

Re: [web2py] Re: blocks in template

2010-05-06 Thread Thadeus Burgess
Sure, and it will do it. And you can even get yourself into a circular import situation and cause it to crash from max-recursion-depth exception. -- Thadeus On Thu, May 6, 2010 at 1:56 PM, Yarko Tymciurak wrote: > On May 6, 1:47 pm, Thadeus Burgess wrote: >> Extend will effecti

Re: [web2py] Re: blocks in template

2010-05-06 Thread Thadeus Burgess
t; On May 6, 1:52 pm, Thadeus Burgess wrote: >> I need an example of "dynamic skin behavior". >> >> Code. (even if pseudocode). I need some code to understand. > > more: > > App has  layout with header, status bar, body, footer. > Any app page c

Re: [web2py] Re: blocks in template

2010-05-06 Thread Thadeus Burgess
10 at 2:22 PM, Yarko Tymciurak wrote: > On May 6, 1:52 pm, Thadeus Burgess wrote: >> I need an example of "dynamic skin behavior". >> >> Code. (even if pseudocode). I need some code to understand. > > continuing w/ the body panel discussion: > > > -

Re: [web2py] Idea/question

2010-05-07 Thread Thadeus Burgess
It would be very nice if we could control the order, alas it is alphabetical. So we must resort to craziness such as A_config.py B_settings.py C_db.py D_auth.py E_crud.py F_other_mode.py etc etc. =) -- Thadeus On Fri, May 7, 2010 at 10:08 AM, Miguel Lopes wrote: > On Fri, May 7, 2010 at

Re: [web2py] Idea/question

2010-05-07 Thread Thadeus Burgess
a bit =? -- Thadeus On Fri, May 7, 2010 at 10:11 AM, Thadeus Burgess wrote: > It would be very nice if we could control the order, alas it is alphabetical. > > So we must resort to craziness such as > > A_config.py > B_settings.py > C_db.py > D_auth.py > E_crud

Re: [web2py] Re: When will the web2py book open to all editing?

2010-05-07 Thread Thadeus Burgess
I do not want to go in and clean up "trash" if there is a way to prevent it from getting there in the first place. -- Thadeus On Fri, May 7, 2010 at 4:16 PM, Patrick wrote: > > > On May 7, 12:32 pm, waTR wrote: >> I was just wondering if there are plans to open the book wiki to >> editing t

Re: [web2py] Error in template.py

2010-05-07 Thread Thadeus Burgess
O.O, my bad, Sent Massimo a patch. -- Thadeus On Fri, May 7, 2010 at 8:56 PM, Jose wrote: > name in self.lexers:\nTypeError: argument > of type \'NoneType\' is not iterab

Re: [web2py] Fullcalendar with JSON

2010-05-08 Thread Thadeus Burgess
That is incorrect, and only if you want to run that example.. I use fullcalendar and I have it at /init/people/calendar.html and I have the json at /init/ajax_lib/events.json. You just need to make sure to return the correct JSON structure that fullcalendar understands. You will need a custom json

Re: [web2py] New to web app development -- is web2py a good choice

2010-05-08 Thread Thadeus Burgess
One thing I have noticed is django and RoR is for the most part, a designer oriented community. IE: Lots of designers, few real programmers/engineers, this is why you see design-oriented keywords floating around in those frameworks. Most of us here in the web2py community are programmers/engineers/

Re: [web2py] migratin apps

2010-05-08 Thread Thadeus Burgess
Your tables already exist in the database. However you must have deleted your /app/databases/*.table files, so as far as web2py is concerned it is a blank database. To remedy the solution, add this to each of your define table statements db.define_table('.', fake_migrate=True) Run your code

Re: [web2py] is row.update(name='someone') really works??

2010-05-08 Thread Thadeus Burgess
Looks like you are not running the latest version of web2py . -- Thadeus On Sat, May 8, 2010 at 4:34 PM, Eldr3D wrote: > Hello all > > i just back to web2py a few weeks ago and i am still learning all the > new changes reading online official web2py book. > > currently i am using web2py DALs

Re: [web2py] Re: Why not session['key'] ?

2010-05-08 Thread Thadeus Burgess
The reason is session.button1 returns None if the key is not found whereas session['button1'] raises an exception when the key is not found. This is typically python behavior. -- Thadeus On Sat, May 8, 2010 at 11:44 PM, ionel wrote: > I think I found a bug. > > Traceback (most recent c

Re: [web2py] Re: Why not session['key'] ?

2010-05-09 Thread Thadeus Burgess
e as key. > For example: > > some_id = 'my_id' > session[some_id] = 'some content' > > But I think, I need to learn the python way :) > > i > > On May 9, 8:47 am, ionel wrote: >> Thank you. >> I didn't know :) I'm still a py

Re: [web2py] Re: Is anyone using MongoDB with web2py?

2010-05-09 Thread Thadeus Burgess
Yes, response._caller. You can wrap this function, take a look at the following for an example. http://packages.python.org/web2py_utils/output.html#compress-output http://hg.thadeusb.com/Web/web2py_utils/file/9581a47022ee/web2py_utils/output.py Notice how I change response._caller to my custom f

Re: [web2py] Re: Errors with the new version

2010-05-09 Thread Thadeus Burgess
I have seen this quite a bit with my sqlite databases as well... Basically, this is what is happening. The referential integrity of your database is failing (IE: a FK links to a record that does not exist). This has happened many many times, and when I do a csv export of my database, sure enough

Re: [web2py] Re: Errors with the new version

2010-05-09 Thread Thadeus Burgess
> On Sun, May 9, 2010 at 12:52 PM, Thadeus Burgess > wrote: >> >> I have seen this quite a bit with my sqlite databases as well... >> >> Basically, this is what is happening. >> >> The referential integrity of your database is failing (IE: a FK links >&g

[web2py] IOError, scalability concerned

2010-05-09 Thread Thadeus Burgess
What could possibly be causing this? python 2.6 web2py trunk apache/mod_wsgi 2.6 Any idea's on how I can narrow this down, or stop this? The pages consist of static html (cached in RAM), and a page with a giant SQLFORM on it. It kind of concerns me about the scalability of web2py, as the errors r

[web2py] Re: IOError, scalability concerned

2010-05-09 Thread Thadeus Burgess
, how to stop this? -- Thadeus On Sun, May 9, 2010 at 9:28 PM, Thadeus Burgess wrote: > What could possibly be causing this? > > python 2.6 > web2py trunk > apache/mod_wsgi 2.6 > > Any idea's on how I can narrow this down, or stop this? The pages > consist of sta

[web2py] Re: IOError, scalability concerned

2010-05-09 Thread Thadeus Burgess
It is not a robot... I performed an IP lookup on some of the IP addresses that caused the error, and they come from ISP and typically in residential areas, and spread out. So this is a big issue since robots do not cause it. -- Thadeus On Sun, May 9, 2010 at 9:36 PM, Thadeus Burgess wrote

Re: [web2py] Re: IOError, scalability concerned

2010-05-09 Thread Thadeus Burgess
Ticket. I usually see them the next day when I check admin. No, it is usually just one IP but it happens to a lot of people at the same time, scaled by the amount of traffic being put on the server. Roughly about 10% of the requests generate this error. > A user not waiting for a request to compl

Re: [web2py] Re: IOError, scalability concerned

2010-05-09 Thread Thadeus Burgess
WSGI script '/web2py/wsgihandler.py'. [Sun Jan 31 13:42:51 2010] [error] [client **] IOError: failed to write data -- Thadeus On Sun, May 9, 2010 at 11:52 PM, Graham Dumpleton wrote: > > > On May 10, 1:51 pm, Thadeus Burgess wrote: >> Ticket. I usually see them

Re: [web2py] Re: IOError, scalability concerned

2010-05-09 Thread Thadeus Burgess
What if there was an IO error with cgi.FieldStorage ? -- Thadeus On Mon, May 10, 2010 at 12:06 AM, mdipierro wrote: > Yes. it is safe to ignore, but it still causes a minor slow down > because web2py issues a ticket and that may be unnecessary. > > On May 10, 12:01 am, Tha

Re: [web2py] Re: IOError, scalability concerned

2010-05-09 Thread Thadeus Burgess
Looking at the sites analytics, there are roughly about 1000 requests a day, of which I will receive 100 of these tickets, give or take 20. -- Thadeus On Mon, May 10, 2010 at 12:10 AM, Thadeus Burgess wrote: > What if there was an IO error with cgi.FieldStorage ? > > > &g

Re: [web2py] Re: IOError, scalability concerned

2010-05-10 Thread Thadeus Burgess
cherokee with no problems. Massimo, looks reasonable... we can always change it later. [1] the requests are unique visits, no robots included -- Thadeus On Mon, May 10, 2010 at 1:53 AM, Graham Dumpleton wrote: > > > On May 10, 3:11 pm, Thadeus Burgess wrote: >> Looking at the

Re: [web2py] Re: IOError, scalability concerned

2010-05-10 Thread Thadeus Burgess
figured by a user >> (not by default), such that the user can specify exception types and >> exception descriptions which can be ignored for the particular hosting >> system or combination of WSGI middleware they use. >> >> Graham >> >> > Massimo >> &g

Re: [web2py] Re: Review my web2py app: Radbox.me

2010-05-11 Thread Thadeus Burgess
This is great! You guys did such a nice job, many kudos! -- Thadeus On Tue, May 11, 2010 at 1:55 PM, b00m_chef wrote: > Great job!  I am happy to see web2py apps that don't just use the > default admin interface design, and actually do their own. > > > > On May 11, 2:40 am, Adi wrote: >> I

Re: [web2py] Re: New to web app development -- is web2py a good choice

2010-05-12 Thread Thadeus Burgess
We need tutorials, a beginners, intermediate, and expert level on web2py apps, each going into different details of web2py step by step line by line. -- Thadeus On Wed, May 12, 2010 at 4:17 AM, cjrh wrote: > On May 12, 6:11 am, Richard wrote: >> The book was a huge improvement but there i

Re: [web2py] Re: ORM-like DAL

2010-05-12 Thread Thadeus Burgess
VirtualFields? -- Thadeus On Tue, May 11, 2010 at 11:59 PM, vihang wrote: > Some of the apps I am working currently are much more easy to build if > the models can be defined as a class with methods that act on them. > > > On May 12, 5:51 am, Álvaro Justen wrote: >> On Tue, May 11, 2010 at

Re: [web2py] Re: Why not session['key'] ?

2010-05-12 Thread Thadeus Burgess
session['fav_color'] = "blue" works just fine. session is just a gluon/storage.Storage() class. which is a subclass of "dict" and it only provides an extra method to give you the attribute access to make things easier. Otherwise works exactly like any other python dictionary. You can use the sess

Re: [web2py] Re: ORM-like DAL

2010-05-13 Thread Thadeus Burgess
nk(post) -- Thadeus On Thu, May 13, 2010 at 1:44 AM, vihang wrote: > Maybe we could inherit in some way, but I need to inherit a bunch. > Hence it does not help. > > On May 12, 8:08 pm, Thadeus Burgess wrote: >> VirtualFields? >> >> -- >> Thadeus >&

Re: [web2py] web2pyslices source code

2010-05-13 Thread Thadeus Burgess
nice, thanks! -- Thadeus On Thu, May 13, 2010 at 10:50 AM, mr.freeze wrote: > This has been updated for anyone interested: > http://www.web2pyslices.com/main/static/share/web2py.app.web2pyslices.w2p > >

Re: [web2py] Re: Idea: Appliance remote management

2010-05-13 Thread Thadeus Burgess
This is similar to how PluginCentral will be designed, if we ever get that spec finalised =) -- Thadeus On Thu, May 13, 2010 at 11:14 AM, blackthorne wrote: > One more thing, web2py could have a list of repositories url, with the > default the one we can find on the official website but also

Re: [web2py] large sites/application.

2010-05-13 Thread Thadeus Burgess
But the problem with web2py is that what if you don't want portal models to execute when they are on the public portion of the site? But the public depends on the portals models and visa versa. No matter which way you hash it, your going to have a massive web2py spaghetti on your plate with some gi

Re: [web2py] Re: Idea: Appliance remote management

2010-05-13 Thread Thadeus Burgess
Massimo, we can take the ideas for plugin metadata and use it for applications as well? Change the name from plugincentral to web2pycentral. We can start an open source version of the web2pycentral and decide who can work on it. -- Thadeus On Thu, May 13, 2010 at 2:07 PM, Jason Brower wrote

Re: [web2py] Re: large sites/application.

2010-05-15 Thread Thadeus Burgess
hould not be a problem but make sure migrate=False >> for speed and bytecde compiled the app. >> >> Massimo >> >> > On Thu, May 13, 2010 at 23:07, Thadeus Burgess >> > wrote: >> > > But the problem with web2py is that what if you don't wan

Re: [web2py] Re: large sites/application.

2010-05-15 Thread Thadeus Burgess
t; > Havn't tried it. But if it works, we only have two places for model > files, as good as django. > > On May15, 6:51pm, Thadeus Burgess wrote: >> Yes, web2py runs fine with 50 models. And this is awesome if your just >> dealing with one application >> &g

Re: [web2py] Re: PGP Mail

2010-05-15 Thread Thadeus Burgess
I think mail.settings. If you have multiple sends that get different PGP keys, you can always change mail.settings in between function calls -- Thadeus On Sat, May 15, 2010 at 10:12 AM, mdipierro wrote: > The send method does not specify the sender account. > mail.settings.sender does. T

Re: [web2py] Re: large sites/application.

2010-05-15 Thread Thadeus Burgess
should be > clearly in charge of migrations > 3) even if two apps access the same db table(s) it is not obvious they > need to see the same model (i.e. all fields in the same order). > > > > On May 15, 5:51 am, Thadeus Burgess wrote: >> Yes, web2py runs fine with 50 mode

Re: [web2py] Re: rpc from jquery

2010-05-15 Thread Thadeus Burgess
For multiple elements you might want to try and put it into a jQuery plugin, allowing you to re-use the code for each sparkline. $(".spark").makeSparkline({url:/path/to/call/sparkdata, args:etc}); -- Thadeus On Sat, May 15, 2010 at 1:34 PM, MikeEllis wrote: > > After spending some time with

Re: [web2py] Testing an upload function

2010-05-15 Thread Thadeus Burgess
I attempted to solve this by inserting data into the request environment, including the form name, however I did not have any luck.. I would use WebTest for file upload testing instead, however you will need to use a mixture of webtest and new_env(), this is because you need to get the unique _for

Re: [web2py] Error with template.py from revision e9e41cce0c onwards.

2010-05-15 Thread Thadeus Burgess
Ah, this is quite a nasty bug to fix :) Originally we just looked if the line started with return, however the following line of code would then fail... {{ if True: return }} I sent a patch to Massimo, would you mind testing again when he applies it? -- Thadeus On Sat, May 15, 2010 at 3:06

Re: [web2py] Re: rpc from jquery

2010-05-15 Thread Thadeus Burgess
]]> */ > > This is the sparkline.html template > {{for n in xrange(ngraphs):}} > > Bar chart with dynamic data: class="dynamicbar">Loading.. > > {{pass}} > {{=BEAUTIFY(response._vars)}} > > > That's it. BTW, sparkline charts are really usef

Re: [web2py] Re: bug in dal.py _first() and SQLFORM ._tablename

2010-05-15 Thread Thadeus Burgess
.dog.ALL))==0 > > and if you have 3000 records (1000 in each table) this returns 10^9 > rows. This runs out out RAM. I think you simply want > >   if db(db.person.id)count()+db(db.dog_type.id).count() > +db(db.dog.ALL).count(): > > > On Apr 8, 2:57 pm, Thadeus Bur

Re: [web2py] Re: rpc from jquery

2010-05-15 Thread Thadeus Burgess
Nice :) -- Thadeus On Sat, May 15, 2010 at 10:50 PM, MikeEllis wrote: > Done.  See http://www.web2pyslices.com/main/slices/take_slice/79 > > On May 15, 8:44 pm, Thadeus Burgess wrote: >> Would you make a web2pyslice of this with some screenshots? Looks lik

Re: [web2py] Re: Different results in console vs. script

2010-05-16 Thread Thadeus Burgess
ffort to answer these questions. It's very helpful. > > And I also found out about web2py_utils! > > On May 5, 6:24 pm, Thadeus Burgess wrote: >> OK. Thank you for the idea. You will be happy :) >> >> -- >> Thadeus >> >> On Wed, May 5, 2010 at 2:00 PM,

Re: [web2py] Re: web2py 1.78.2

2010-05-17 Thread Thadeus Burgess
You cannot have random = signs in your view. The syntax is {{python code here}} {{=python variable here}} You MUST declare {{= with no space in between. the bracket and equal sign. -- Thadeus On Mon, May 17, 2010 at 2:23 AM, szimszon wrote: > default/index.html: > --- cut

Re: [web2py] Re: web2py 1.78.2

2010-05-17 Thread Thadeus Burgess
tests > for template.py > > massimo > > > On May 17, 10:15 am, szimszon wrote: >> There is odd because I have a lot of code with >> {{                 =some.var}} >> >> and >> >> {{if something: >>     =T('something') >&

Re: [web2py] Re: web2py 1.78.2

2010-05-17 Thread Thadeus Burgess
emplate.py >> >> > massimo >> >> > On May 17, 10:15 am, szimszon wrote: >> >> There is odd because I have a lot of code with >> >> {{                 =some.var}} >> >> >> and >> >> >> {{if something: >> >>  

Re: [web2py] Re: New Django version 1.2

2010-05-17 Thread Thadeus Burgess
Here's the thing I don't get about django... Polls.objects.filter(order__lte=5) I don't know about you, but that syntax makes NO sense to me as an software engineer, (less than or equal to equals 5) Designer based framework! db(db.polls.order <= 5).select() makes so much more sense! =) <3

Re: [web2py] Re: New Django version 1.2

2010-05-17 Thread Thadeus Burgess
(Polls.order <= 5).select() vs db(Polls.order <= 5).select() I see no difference. I don't see any reason to give it an __iter__ method >.< Just put .select() -- Thadeus On Mon, May 17, 2010 at 9:18 PM, mdipierro wrote: > e could also give query and set objects and __iter__ method and be >

Re: [web2py] Re: Production releases

2010-05-17 Thread Thadeus Burgess
I also run web2py in production, but I also don't upgrade my web2py version with the latest release (unless it is a security release). I usually stay 2-3 versions behind on my production code... sometimes even older code unless there is a security release OR I want some new functionality. The bigg

Re: [web2py] Sending html emails [bug?]

2010-05-18 Thread Thadeus Burgess
You must set the mimetypes of outgoing email, I do not believe the current mailer supports this... Checkout the code on the wiki http://wiki.web2py.com/Sending_Email_with_Plain_Text_HTML_Versions_plus_Attachments -- Thadeus On Tue, May 18, 2010 at 4:07 AM, Jon Romero wrote: > It seems that

Re: [web2py] new in Django

2010-05-18 Thread Thadeus Burgess
Polls.objects.get(order__lte=5) No... no their not. Still a designer based framework, and developer limiting. -- Thadeus On Tue, May 18, 2010 at 4:11 PM, Kuba Kucharski wrote: > http://docs.djangoproject.com/en/dev/releases/1.2/ > > "Support for multiple database connections in a single Dj

Re: [web2py] Re: new in Django

2010-05-20 Thread Thadeus Burgess
ot; . > > Obviously, I don't know and i don't have all the knowledge that a > developer have, and I respect them all. > > Please, don't generalize. I respect you and I greatly appreciate your > contributions, really! > > Best regards, > > Pepe. &g

Re: [web2py] google fonts

2010-05-20 Thread Thadeus Burgess
everyone should have please upgrade browser links anyways, unless their using software that requires IE 5... *curses blackboard and mathlab* -- Thadeus On Thu, May 20, 2010 at 9:20 AM, Albert Abril wrote: > > > On Thu, May 20, 2010 at 3:50 PM, Jonathan Lundell > wrote: >> >> On May 20, 2010

Re: [web2py] Re: nice slides on postgresql vs nodb

2010-05-21 Thread Thadeus Burgess
I also see really no reason to use NoSQL unless you really just don't like writing SQL... thats why we have ORMs and DALs anyways. You still have to use FK relationships with document based sets... ie: with a 4MB document limit, they suggest you split comments for a post into its own document and

Re: [web2py] Re: nice slides on postgresql vs nodb

2010-05-21 Thread Thadeus Burgess
, Russ Ferriday wrote: > Final thought... > I think if NoSQL were indicated for use with a web2Py app,  it might be most > appropriate to replace some, but not all SQL-based tables. > --r. > On May 21, 2010, at 9:31 AM, Thadeus Burgess wrote: > > I also see really no reason to us

Re: [web2py] Re: Custom registration form -- password_two

2010-05-24 Thread Thadeus Burgess
Stick the following code in a controller import copy user_table = [copy.copy(f) for f in db.auth_user] form = SQLFORM.factory( *user_table, Field('password2', 'password', length=512, requires=db.auth_user.password.requires), ) if form.accepts(request.vars, session): if form.vars.pas

Re: [web2py] Re: Custom registration form -- password_two

2010-05-24 Thread Thadeus Burgess
Wait... Doesn't web2py already have this built in? Maybe I don't understand the question... Using a plain vanilla `form = auth()` You get a register form... http://thadeusb.com/admin/user/register -- Thadeus On Mon, May 24, 2010 at 10:57 PM, Thadeus Burgess wrote: > Stick

Re: [web2py] Re: Custom registration form -- password_two

2010-05-24 Thread Thadeus Burgess
This may be a stupid question but... Why are you not using form.custom ? {{form.custom.start}} {{form.custom.email.widget}} -- Thadeus On Mon, May 24, 2010 at 11:15 PM, Thadeus Burgess wrote: > Wait... Doesn't web2py already have this built in? > > Maybe I don't unde

Re: [web2py] Re: Custom registration form -- password_two [CLOSED (for now)]

2010-05-24 Thread Thadeus Burgess
http://web2pyslices.com/main/default/user/register Ok here is a link working since I disabled it on my blog. This is just built into Auth class. You can do custom styling with {{form.custom.password_two.widget}} And add by hand your fieldsets and etc. Unless you are looking for more than just

Re: [web2py] Re: in trunk - scraping utils

2010-05-24 Thread Thadeus Burgess
> So why our own? Because it converts it into web2py helpers. And you don't have to deal with installing anything other than web2py. -- Thadeus On Tue, May 25, 2010 at 12:14 AM, Kevin Bowling wrote: > Hmm, I wonder if this is worth the possible maintenance cost?  It also > transcends the r

Re: [web2py] Re: import external libraries

2010-05-25 Thread Thadeus Burgess
Don't edit the path in production, this can get quite nasty. -- Thadeus On Tue, May 25, 2010 at 8:36 AM, mdipierro wrote: > or just add the folder where they are now to > > sys.path.append('path/to/folder') > > this line would go in web2py.py or on top of the handler you use. > > Massimo > >

Re: [web2py] Changes in Development environment

2010-05-26 Thread Thadeus Burgess
You probably don't want to develop on your live data. To be able to migrate data the DAL includes two functions.. db.export_to_csv_file(open('/path.csv', 'w')) db.import_from_csv_file(open('/path.csv', 'r')) So you can export your data, and then stick it on the server and re-import it. This also

Re: [web2py] postgresql connection problem

2010-05-26 Thread Thadeus Burgess
Try postgres://w2p:passw...@localhost:5432/w2p -- Thadeus On Wed, May 26, 2010 at 5:17 PM, Julius Minka wrote: > This is virtual server with centos 5.5 in internet. > I have successfully instaled web2py with Apache and mod_wsgi based > mainly on instructions from > http://web2py.com/AlterEg

Re: [web2py] Moving apps outside /applications

2010-05-27 Thread Thadeus Burgess
Just another method. I symlink my projects folder into the applications so I have ~/Applications/web2py/ ~/Workspace/Web/Blogitizor/ Symlink. ~/Applications/web2py/applications/blogitizor -> ~/Workspace/Web/Blogitizor/ -- Thadeus On Thu, May 27, 2010 at 8:40 AM, Albert Abril wrote: > What

[web2py] Hide tables to appadmin based on user permissions

2010-05-27 Thread Thadeus Burgess
I would like to hide all tables except the selected one from a user unless they have specific privileges. I am thinking maybe the following at the top of appadmin.py if auth.has_permission('Operations', auth.user.id): tables = [copy.copy(t) for t in db] db = DAL(db._connection) for t in

[web2py] Re: Hide tables to appadmin based on user permissions

2010-05-27 Thread Thadeus Burgess
grate=False, fake_migrate=False) db = opdb So obviously if they are admin, it leaves it alone and they see all tables. Also all tables are decorated with @auth.reuquires_membership('Operations') -- Thadeus On Thu, May 27, 2010 at 11:23 AM, Thadeus Burgess wrote

Re: [web2py] Re: Hide tables to appadmin based on user permissions

2010-05-27 Thread Thadeus Burgess
Me and my displaced mind... =) I ment "all of my controller functions are decorated with..." -- Thadeus On Thu, May 27, 2010 at 2:31 PM, Mathieu Clabaut wrote: > Thank you for sharing ! > On Thu, May 27, 2010 at 19:16, Thadeus Burgess > wrote: >> >&

  1   2   3   4   5   6   7   8   9   10   >