Re: [web2py] Re: Hide Error on SQLFORM

2010-07-27 Thread Thadeus Burgess
am surprised it does not. can you help debug. Try form.errors.clear() On Jul 27, 2:29 am, Thadeus Burgess thade...@thadeusb.com wrote: I don't get it SQLFORM.factory(Field., hideerror=True). It doesn't do what its supposed to. How can I make sure that none of my widgets render

Re: [web2py] Re: Hide Error on SQLFORM

2010-07-27 Thread Thadeus Burgess
mdipie...@cs.depaul.edu wrote: I am surprised it does not. can you help debug. Try form.errors.clear() On Jul 27, 2:29 am, Thadeus Burgess thade...@thadeusb.com wrote: I don't get it SQLFORM.factory(Field., hideerror=True). It doesn't do what its supposed to. How can I make

Re: [web2py] Re: Hide Error on SQLFORM

2010-07-27 Thread Thadeus Burgess
with custom widgets. On Jul 27, 4:42 am, Thadeus Burgess thade...@thadeusb.com wrote: There is no possible way it can. Looking through the source code, it never passes along the extra attributes to anything. The current way the widgets are implemented never use attributes passed to them

Re: [web2py] Re: Hide Error on SQLFORM

2010-07-27 Thread Thadeus Burgess
If I need to use a workaround to perform the most basic needs of a system, then that system is flawed to begin with. A form system, by its very nature of what it is, should require 100% customization ability without ugly, undocumented hacks. -- Thadeus On Tue, Jul 27, 2010 at 9:53 PM,

[web2py] table migration metadata storage location

2010-07-26 Thread Thadeus Burgess
When migrate = False and fake_migrate = False the .table files are not even read from the filesystem, meaning they do not technically *need* to exist to run your application. Running code on production always uses migrate = False except for when I run migration scripts which allow the DAL to

Re: [web2py] IS_IN_SET syntax

2010-07-26 Thread Thadeus Burgess
db.candidate.for_language.requires = IS_IN_SET(['english', 'french', 'german'], zero=None) If you notice how web2py will put a blank option in the drop down? the zero attribute of IS_IN_SET or IS_IN_DB will control the value of that first dropdown option. To completely rid yourself of the bank

Re: [web2py] Re: book revision

2010-07-26 Thread Thadeus Burgess
IS_IN_SET zero changes and how they work and why it is that way now. -- Thadeus On Mon, Jul 26, 2010 at 11:20 PM, Iceberg iceb...@21cn.com wrote: On Jul 24, 5:53am, mdipierro mdipie...@cs.depaul.edu wrote: I am revising the book. Please list what features are not mentioned in the book or

Re: [web2py] dynamic urls or catch-all controllers

2010-07-25 Thread Thadeus Burgess
I would use a routes_in that would redirect to a single function which would then look at the arguments of the path to determine what to do =/ -- Thadeus On Sun, Jul 25, 2010 at 2:47 PM, Andrew Thompson andre...@aktzero.com wrote:  If I wanted to create pages like /about /contact /asdf1

Re: [web2py] Re: book revision

2010-07-25 Thread Thadeus Burgess
Update the deployment section. I never got the instructions in the book to work without tweaking, so I think it needs some fine tuning and references to web2pyslices slice 14, 29, 33, 36, 57, 64 -- Thadeus On Sun, Jul 25, 2010 at 5:27 PM, howesc how...@umich.edu wrote: I use google app

Re: [web2py] advice on ListProperty

2010-07-25 Thread Thadeus Burgess
Yes. Just go the extra half a mile and add it for every database that will use a table behind the scenes. -- Thadeus On Sun, Jul 25, 2010 at 6:17 PM, mdipierro mdipie...@cs.depaul.edu wrote: GAE has a ListPropery and IS_IN_DB(...,multiple=True) does not use it but uses '|2|34|45|' instead

Re: [web2py] Re: Recent change to string escaping breaks dynamic javascript

2010-07-25 Thread Thadeus Burgess
escaping when, in reality, they were JS strings. If we had a review board, would you have opposed to this change? Massimo On Jul 23, 5:28 pm, Thadeus Burgess thade...@thadeusb.com wrote: I also agree that this is a break in backwards

Re: [web2py] Re: global name 'MySQLdb' is not define d

2010-07-24 Thread Thadeus Burgess
Perhaps WSGI is configured to use python 2.4 and the libraries are not linked correctly. -- Thadeus On Sat, Jul 24, 2010 at 10:58 AM, oktay onur.ok...@gmail.com wrote: Yes, it works with import MySQLdb at the top of web2py.py: web2py Enterprise Web Framework Created by Massimo Di

Re: [web2py] Re: Recent change to string escaping breaks dynamic javascript

2010-07-24 Thread Thadeus Burgess
I don't know enough about the problem to say if I would support or oppose this change. I also agree that a template symbol is easier than having to wrap the entirety around a function. -- Thadeus On Sat, Jul 24, 2010 at 3:02 AM, mdipierro mdipie...@cs.depaul.edu wrote: ad a review board,

Re: [web2py] Re: Recent change to string escaping breaks dynamic javascript

2010-07-23 Thread Thadeus Burgess
I also agree that this is a break in backwards compatibility. It is also a change that was never considered for longer than 15 minutes before the decision to make the change was implemented. I really wish we would put certain things such as this under a review board so they don't get into web2py

Re: [web2py] Re: Recent change to string escaping breaks dynamic javascript

2010-07-23 Thread Thadeus Burgess
uservoice but for bugfixes. -- Thadeus On Fri, Jul 23, 2010 at 5:31 PM, mr.freeze nat...@freezable.com wrote: There was talk of a week long RC period for all releases unless there was an important bug fix but we seem to have reverted to old habits. On Jul 23, 5:28 pm, Thadeus Burgess thade

Re: [web2py] Sorting alphanumeric data

2010-07-23 Thread Thadeus Burgess
It is possible to create SQL functions that will represent your natural sort. You can use db.executesql() to call the function. Read the following comments in the below link for examples on performing this with postgresql. http://www.postgresql.org/docs/8.0/interactive/queries-order.html --

Re: [web2py] Re: LEFT JOIN query as object?

2010-07-22 Thread Thadeus Burgess
It is kinda possible. Save both queries as objects. Left is just a query that tells web2py which fields in the tables should be linked together. For example, lefton = (db.friend.dog_id == db.dog.id) where = db(db.friend.name == fred) ... continue and do some stuff with the where query object

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Thadeus Burgess
I will make said changes, and add my Flask-DAL extension to the flask app, so at least the database layer will be the exact same. Flask handles sessions too. I shouldn't disable web2py sessions while letting flask use sessions, that would be an unfair test too. The good news is, that even with

Re: [web2py] Re: Error in wsgi/apache

2010-07-21 Thread Thadeus Burgess
. Is that correct? This could help us narrow down the problem. Massimo On Jul 20, 7:17 pm, Thadeus Burgess thade...@thadeusb.com wrote: The solution: I switched to Flask. And the problems dissipated completely, without modifying any configuration of the web server. I would

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Thadeus Burgess
? filesystem or client? If they are saved on the client that is closer to session.forget() in web2py since filling the filesystem with one question file for every http request when running ab may cause problems. Massimo On Jul 21, 9:44 am, Thadeus Burgess thade...@thadeusb.com wrote: I

Re: [web2py] Re: The one video you should watch

2010-07-20 Thread Thadeus Burgess
Web2py is now in a league of its own. This is the vision of web2py that has been in mind since the begininning, all of the other stuff (DAL, templateing etc) is just the means to this end. -- Thadeus On Tue, Jul 20, 2010 at 10:40 AM, MikeEllis michael.f.el...@gmail.comwrote: Massimo, I'm

Re: [web2py] Re: Error in wsgi/apache

2010-07-20 Thread Thadeus Burgess
The solution: I switched to Flask. And the problems dissipated completely, without modifying any configuration of the web server. I would not, and will not use web2py for any application that is mission critical. For personal sites, or quick projects that I know won't receive that much

Re: [web2py] Re: The one video you should watch

2010-07-20 Thread Thadeus Burgess
Odd. I do not hear any when I watched it. -- Thadeus On Tue, Jul 20, 2010 at 5:08 PM, mdipierro mdipie...@cs.depaul.edu wrote: I wish I knew how. I do not know where the z comes from. On Jul 20, 4:07 pm, Mengu whalb...@gmail.com wrote: great screencast but you should really stop

Re: [web2py] Re: The one video you should watch

2010-07-20 Thread Thadeus Burgess
I just realized why I did not hear it, I was listening on one of those headsets that have a built-in inline audio card, so it was performing a filter and it took that noise out. Playing through my PC speakers and the noise is there -- Thadeus On Tue, Jul 20, 2010 at 9:59 PM, weheh

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-19 Thread Thadeus Burgess
) David On 19 čnc, 06:22, Thadeus Burgess thade...@thadeusb.com wrote: I am wondering if this is a web2py issue or a DAL issue. I would like to re-run my tests just rendering a simple template with no dbio and see if I still get the same results. I love the DAL and there is nothing else

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-19 Thread Thadeus Burgess
Now the question is why? I don't see how it can just be the generation of the form, I am willing to bet it is the session and CSRF tokens. If someone has time, we need to test a couple of scenarios. A) display a simple FORM B) display a simple FORM, but do NOT include a form.accepts in the

Re: [web2py] How to handle jaywalking - parsing a comma-delimited value in field and do lookups (1,4,5,6...)

2010-07-19 Thread Thadeus Burgess
Web2py is actually guilty of performing this same operation, however instead of commas, we use the pipe char '|' The theory works like this If you have the following |1|23|4|55|15| You can perform the following query to find the record with group id of 55 db(db.groups.like(%|55|%)).select()

Re: [web2py] Re: How to handle jaywalking - parsing a comma-delimited value in field and do lookups (1,4,5,6...)

2010-07-19 Thread Thadeus Burgess
where does this kind of thing happen with web2py? Could you please specify what exactly are you writing about here? Does this mean the web2py database abstraction layer produces this kind of hackery instead of intersection tables on a many-2-many relation? Consider the following schema.

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-18 Thread Thadeus Burgess
pm, Thadeus Burgess thade...@thadeusb.com wrote: Massimo, web2py.com is not a valid application to be testing this on. Most of what web2py.com does is just render a template and display it, it hardly does any kind of strenuous dbio. As you know I have a few separate servers running

Re: [web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread Thadeus Burgess
One thing Ive learned. NEVER update your production code to the latest version. ALWAYS find a stable release, and stick to it until you can test another stable release 100%. Honestly I would stay away from upgrading at all unless you are needing a new feature. Typically new features in web2py

Re: [web2py] Re: storing hierarchical data in web2py database

2010-07-14 Thread Thadeus Burgess
I have this code implemented in plugin_category.py let me just find it =/ Ah yes, here it is http://code.google.com/p/blogitizor/source/browse/src/modules/plugin_category.py You can see example usage in blogitizor. -- Thadeus On Tue, Jul 13, 2010 at 4:19 PM, sociotech

Re: [web2py] Re: Commenting system - Disqus/IntenseDebate

2010-07-13 Thread Thadeus Burgess
Pros: * Disqus is really easy to use and setup and include on your site. * Automatically emails you with comments, that you can respond to from your email client * You don't have to do anything but include the javascript on your page and include a page ID. Cons: * Reliant on disqus, their

Re: [web2py] Re: T2, T3, Cube2py ...

2010-07-13 Thread Thadeus Burgess
easier programming without coding. LOL =) Best un-intentional oxy-moron I have read in a while -- Thadeus On Tue, Jul 13, 2010 at 4:53 PM, mdipierro mdipie...@cs.depaul.edu wrote: This video is already obsolete:     http://www.vimeo.com/13154869 The goal is to build an additional

Re: [web2py] State of the DAL rewrite

2010-07-12 Thread Thadeus Burgess
The DAL is an sql abstraction layer. NoSQL is just that, no sql needed, since its a document store... I think its silly to try and put relational mindsets into something that is designed to not be relational or ACID/ATOMIC. -- Thadeus On Sun, Jul 11, 2010 at 5:12 AM, Pystar

Re: [web2py] new welcome (scaffolding) app

2010-07-09 Thread Thadeus Burgess
[x] new layout [x] less on the views/layout is more, unless you just want to ship a tutorial with web2py instead, good for newbies, not so good for those who have done a few apps [x] id rather a tutorial series written instead of being shipped with web2py [ ] no plugin_wiki, let me install it if I

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-08 Thread Thadeus Burgess
Setup: Two applications that perform a simple db insert, db select, render a template and return it. All in all this is a very small application. The application has two views, one insert/select view and one select view. Each of these views are tested separately using apache ab test. The insert

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-08 Thread Thadeus Burgess
I get similar results with httperf. Web2py has over 15% 500 internal server errors, flask has none. -- Thadeus On Thu, Jul 8, 2010 at 10:17 AM, Kuba Kucharski kuba.kuchar...@gmail.com wrote: The web server was restarted and the database reset in between each ab test but AFAIK ab tends to

Re: [web2py] Re: markmin, t2, t3, cube9 etc. (important update)

2010-07-07 Thread Thadeus Burgess
This looks really awesome! Name suggestion: Cube^2 -- Thadeus On Wed, Jul 7, 2010 at 10:18 AM, Jonathan Lundell jlund...@pobox.com wrote: On Jul 7, 2010, at 5:42 AM, mdipierro wrote: The philosophy is the same as T3. Every URL is a wiki. Would you elaborate a little on that statement,

Re: [web2py] Re: markmin

2010-07-07 Thread Thadeus Burgess
I wish web2py was modular, so that this could be a separate project, and you can ``easy_install markmin`` and then web2py will pick up the existance or non-existance of the package and use or not use it automatically. This way we don't have to install markmin if we don't want to, but it is only

Re: [web2py] web2py performance issue or rather my fault?

2010-07-07 Thread Thadeus Burgess
I have experienced this under high capacity on my web2py sites. I have not found a solution to the issue as of yet. All I can say is I have done AB testing comparing different python web frameworks with a basic database IO, web2py just doesn't perform under high load. Perhaps it is a coding issue

Re: [web2py] Anybody having trouble accessing web2py google group on mozilla firefox 3.6.6?

2010-06-28 Thread Thadeus Burgess
try logging completely out of your google account, clearing firefox cookies, closing firefox, then start again. -- Thadeus On Mon, Jun 28, 2010 at 10:32 AM, weheh richard_gor...@verizon.net wrote: I'm able to access the web2py group no problem on IE (ugh). But starting just recently, on

Re: [web2py] Is there a more efficient way to do this?

2010-06-28 Thread Thadeus Burgess
ids = [] names = [] for r in rows: ids.append(r.id) names.append(r.name) db.table.multilist_field.requires=IS_IN_SET(ids, names) -- Thadeus On Mon, Jun 28, 2010 at 10:49 AM, weheh richard_gor...@verizon.net wrote: I have a multilist that I want to populate from db.table:    

Re: [web2py] Is there a more efficient way to do this?

2010-06-28 Thread Thadeus Burgess
IS_IN_DB(rows, '%(id)s', '%(name)s') -- Thadeus On Mon, Jun 28, 2010 at 11:35 AM, Thadeus Burgess thade...@thadeusb.com wrote: ids = [] names = [] for r in rows:   ids.append(r.id)   names.append(r.name) db.table.multilist_field.requires=IS_IN_SET(ids, names) -- Thadeus

Re: [web2py] Re: web2py suggestions

2010-06-20 Thread Thadeus Burgess
I agree with most of these points. http://packages.python.org/web2py_utils/test_runner.html That is about as far as you will get with testing on web2py. You need very hacky code just to run your tests properly. Web2py was just not designed with testing in mind, and due to backwards compatibility

Re: [web2py] Best practise to render tables

2010-06-19 Thread Thadeus Burgess
Isn't this what SQLTABLE and crud.select is for? -- Thadeus On Sat, Jun 19, 2010 at 8:06 AM, baloan balo...@googlemail.com wrote: Since my web application needs to render more than two tables I was too lazy to write/copy/paste table html code over and over again. Instead I implemented

Re: [web2py] Re: my app instead of welcome app???

2010-06-15 Thread Thadeus Burgess
bah, whats the use. -- Thadeus On Tue, Jun 15, 2010 at 10:14 AM, Jean-Guy jean...@gmail.com wrote: On 2010-06-15 02:45, mdipierro wrote: se you do not have too, you can use ruotes already for this purpose. Here : http://www.web2py.com/AlterEgo/default/show/42

Re: [web2py] Re: my app instead of welcome app???

2010-06-15 Thread Thadeus Burgess
should just stop arguing the topic. -- Thadeus On Tue, Jun 15, 2010 at 12:05 PM, Jean-Guy jean...@gmail.com wrote: On 2010-06-15 11:47, Thadeus Burgess wrote: bah, whats the use. -- Thadeus On Tue, Jun 15, 2010 at 10:14 AM, Jean-Guyjean...@gmail.com  wrote: On 2010-06-15 02:45

Re: [web2py] Re: Documentation on moving common code into modules?

2010-06-15 Thread Thadeus Burgess
web2py does NOT follow normal python conventions. You are writing web2py code not python code =) -- Thadeus On Tue, Jun 15, 2010 at 4:41 PM, David Mitchell monch1...@gmail.com wrote: Thanks everyone, Didn't work for me for a while, then I rewired my brain from Ruby-mode to Python-mode and

Re: [web2py] upload bug in filename

2010-06-14 Thread Thadeus Burgess
how long is the filename? Isn't there like a 255 char limit to filenames? -- Thadeus On Mon, Jun 14, 2010 at 4:58 PM, Swell swel...@googlemail.com wrote: Hi ,  I tried to send a file with a form containing a upload field( actually it is a SQLFORM). When i try to add a new record with the

Re: [web2py] Re: my app instead of welcome app???

2010-06-14 Thread Thadeus Burgess
Why can't we configure the default name of 'init' ? -- Thadeus On Mon, Jun 14, 2010 at 7:33 AM, mdipierro mdipie...@cs.depaul.edu wrote: or simply call your app init On Jun 14, 7:19 am, Vasile Ermicioi elff...@gmail.com wrote: create routes.py (or rename routes.example.py) from web2py

Re: [web2py] Re: simplejson -- wasn't this resolved?

2010-06-11 Thread Thadeus Burgess
, 2010 at 12:55 AM, mdipierro mdipie...@cs.depaul.edu wrote: it is not the same problem. Can you help debug? On Jun 11, 12:38 am, Thadeus Burgess thade...@thadeusb.com wrote: Traceback (most recent call last):   File /home/thadeusb/sites/thadeusb.com/subdomains/odyssey/wsgihandler.py, line 27

Re: [web2py] Re: upload file -- lot of file in one directory

2010-06-11 Thread Thadeus Burgess
@auth.requires_login() def download(): problem solved. -- Thadeus On Fri, Jun 11, 2010 at 2:11 PM, weheh richard_gor...@verizon.net wrote: Once assigned, the user_id that my app creates is never changed. I would use the auth.user.id field, but I don't like the fact that it's sequential

Re: [web2py] Re: Separating models into their own files

2010-06-10 Thread Thadeus Burgess
for a specific purpose. The different files are independent and therefore the order of execution is not important. On Jun 9, 9:20 pm, Thadeus Burgess thade...@thadeusb.com wrote: There are some things you can do to alleviate the situation. First, you can name you models so that they execute

Re: [web2py] Re: web2pyslices update

2010-06-10 Thread Thadeus Burgess
I will have to point out. You can resize slices at anytime you want with no downtime to your server. You can clone any slice as many times as you want to any size of disk you want without taking down the original slice You get automated backups from daily, weekly, to monthly that are exact

Re: [web2py] Re: Separating models into their own files

2010-06-10 Thread Thadeus Burgess
to []. there would be a special model (execmodels.py? 0.py?) that would always be executed before every other model and it may override the value of request.models. all required code should go in a single place run_models_in() in gluon/ compileapp.py Massimo On Jun 10, 10:56 am, Thadeus Burgess thade

Re: [web2py] Re: best list of jquery plugins I found so far

2010-06-10 Thread Thadeus Burgess
I think just... http://www.jqueryplugins.com/ -- Thadeus On Thu, Jun 10, 2010 at 12:02 PM, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: that comes up as a bad link for me... www.jquery.com/plugins redirects to http://plugins.jquery.com -- is this the one you meant? On Jun 10,

Re: [web2py] Re: Separating models into their own files

2010-06-10 Thread Thadeus Burgess
be executed before every other model and it may override the value of request.models. all required code should go in a single place run_models_in() in gluon/ compileapp.py Massimo On Jun 10, 10:56 am, Thadeus Burgess thade...@thadeusb.com wrote: I like the idea of an execmodels.py file

Re: [web2py] Re: Hardening web2py on Linux and Windows servers

2010-06-10 Thread Thadeus Burgess
www-data needs write access to databases/cache/sessions etc. IF a hacker were able to gain access *somehow* and alter the databases files, they can kill your entire system by forcing fake migrations or other issues. Just make sure you have migrate=False and fake_migrate=False and everything

Re: [web2py] Re: Separating models into their own files

2010-06-10 Thread Thadeus Burgess
This is what I desire from this Web2py applications to be importable python modules Along with [A] your models immediately become python modules that you can import. This solves my need to share models between web2py apps.' Web2py has a Top down approach, where other frameworks use a down-up

Re: [web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-10 Thread Thadeus Burgess
, Thadeus Burgess thade...@thadeusb.com wrote: Postgres CREATE TABLE foo ( id integer PRIMARY KEY SERIAL, bar varchar, did integer DEFAULT SERIAL); Or... CREATE SEQUENCE seq_foo_did START 2; CREATE TABLE foo ( id integer PRIMARY KEY SERIAL, bar varchar, did integer DEFAULT

Re: [web2py] Re: Separating models into their own files

2010-06-10 Thread Thadeus Burgess
10, 3:44 pm, Thadeus Burgess thade...@thadeusb.com wrote: This is what I desire from this Web2py applications to be importable python modules Along with [A] your models immediately become python modules that you can import. This solves my need to share models between web2py apps.' Web2py has

Re: [web2py] Re: web2pyslices update

2010-06-10 Thread Thadeus Burgess
!). http://fivebean.com/account/aff.php?aff=161 Now get to slicin'! On Jun 10, 11:26 am, Thadeus Burgess thade...@thadeusb.com wrote: I will have to point out. You can resize slices at anytime you want with no downtime to your server. You can clone any slice as many times as you want to any

Re: [web2py] Re: Support for conversation?

2010-06-10 Thread Thadeus Burgess
That is where the hidden input field with a custom hash comes into play I think? -- Thadeus On Fri, Jun 11, 2010 at 12:00 AM, mdipierro mdipie...@cs.depaul.edu wrote: The only issue is that if you have two browser windows open I do not know of a mechanism to identify from which of the

[web2py] simplejson -- wasn't this resolved?

2010-06-10 Thread Thadeus Burgess
Traceback (most recent call last): File /home/thadeusb/sites/thadeusb.com/subdomains/odyssey/wsgihandler.py, line 27, in module import gluon.main File gluon/main.py, line 34, in module from globals import Request, Response, Session File gluon/globals.py, line 18, in module from

Re: [web2py] Re: Support for conversation?

2010-06-10 Thread Thadeus Burgess
it there in all links. Still the conversation is fragile and ends if the user types in a url without the token. On Jun 11, 12:04 am, Thadeus Burgess thade...@thadeusb.com wrote: That is where the hidden input field with a custom hash comes into play I think? -- Thadeus On Fri, Jun 11, 2010

Re: [web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-09 Thread Thadeus Burgess
a table without any field but the id, but I do not do not how to do an insert without any field value. On Jun 8, 8:12 pm, Thadeus Burgess thade...@thadeusb.com wrote: This *might* work. You are right, it is still horrible... It might be *effectively* accomplishing the same thing

Re: [web2py] Re: PluginManager?

2010-06-09 Thread Thadeus Burgess
We have not fully agreed on the spec of PluginManager, it has been added as a proof of concept, however no plugins to date have been implemented with it. There are hundreds of posts debated what it should do. Currently the spec for plugins is you can do anything you want as long as it has the

Re: [web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-09 Thread Thadeus Burgess
as creating a sequence. web2py can create a table without any field but the id, but I do not do not how to do an insert without any field value. On Jun 8, 8:12 pm, Thadeus Burgess thade...@thadeusb.com wrote: This *might* work. You are right, it is still horrible... It might

Re: [web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-09 Thread Thadeus Burgess
and i tell you how to do in web2pyese. On Jun 9, 9:01 am, Thadeus Burgess thade...@thadeusb.com wrote: Great. What about sqlite? -- Thadeus On Wed, Jun 9, 2010 at 8:41 AM, mdipierro mdipie...@cs.depaul.edu wrote: In postgresql you get it native: Field('yourtfield',SQLCustomType('integer

Re: [web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-09 Thread Thadeus Burgess
 am, mdipierro mdipie...@cs.depaul.edu wrote: well, I am posting in trunk a modifiled sql.py that allows Field('name','autoincrement') and generates the following code for postgresql (only postgresql). Give it a try. Massimo On Jun 9, 10:38 am, Thadeus Burgess thade...@thadeusb.com wrote

Re: [web2py] web2pyslices update

2010-06-09 Thread Thadeus Burgess
slicehost! =) -- Thadeus On Wed, Jun 9, 2010 at 6:01 PM, mr.freeze nat...@freezable.com wrote: VPS provider fail. I'm on the hunt for a new provider. I hope to have it back up tomorrow.

Re: [web2py] Re: Separating models into their own files

2010-06-09 Thread Thadeus Burgess
There are some things you can do to alleviate the situation. First, you can name you models so that they execute in the correct order. A_db.py B_user.py C_post.py E_tag.py That said, I usually try to keep all related models in the same file. In your case you might have B_user.py C_weblog.py

Re: [web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-08 Thread Thadeus Burgess
, 2010 at 11:39 PM, Thadeus Burgess thade...@thadeusb.com wrote: Legacy systems =) The database was already in place as this, unfortunately when I migrated from access to postgres I kept the same schema as I was under a time crunch to get *something* running And now it bites me in the butt

Re: [web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-08 Thread Thadeus Burgess
solve some of the problems... db.define_table('whopper_seq',Field('dummy')) db.define_table('yourtable',... Field(whopper_id, integer,compute=lambda r: db.whopper_seq.insert(dummy=None)) ...) On Jun 7, 8:29 pm, Thadeus Burgess thade...@thadeusb.com wrote: I have a problem. I have

Re: [web2py] Re: Last Saved On field displays communication error using HTTPS on Apache2, OpenSSL 0.98k, mod_wsgi, python 2.6.5

2010-06-07 Thread Thadeus Burgess
*leaves gedit / netbeans world to test said bug* It does not work for me either. No tickets are generated however a 500 internal server error is caused when looking at firebug. Ubuntu 10.4, firefox 3.6.3 or Epiphany Quite strange, I can't figure out what is causing the error =/ *goes back to

Re: [web2py] DAL crossdatabase reference

2010-06-07 Thread Thadeus Burgess
Technically speaking, you cannot do it, and *should* not do it. However you can hack around this by using a integer type instead of a FK relationship. Basically store your integer without FK status, and then you manually handle all of the relationships. -- Thadeus On Mon, Jun 7, 2010 at

[web2py] Advice, convert from string storing numbers to autoincrement integer

2010-06-07 Thread Thadeus Burgess
I have a problem. I have this in the database Field(whopper_id, string, default=None, unique=True), The thing with whopper_id is it always stores numbers. Said numbers are anywhere from 2 to 6. Also upon entering a new entry, I do the following last_whopper_id = db(db.table.id

Re: [web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-07 Thread Thadeus Burgess
) Copy all records from the table in question to whopper_temp, casting whopper_id to an integer as you go. 3) Rename your source table 4) Rename whopper_temp to the source tables original name 5) Change Field type for whopper_id to your new autoincrement type On Jun 7, 8:29 pm, Thadeus Burgess

Re: [web2py] Web2py naming bug

2010-06-07 Thread Thadeus Burgess
Yes, starting with a number is NOT valid python... This is why I use A_py B_py C_py instead of 0_...py 1_...py 2_...py -- Thadeus On Mon, Jun 7, 2010 at 11:08 PM, Doug Warren doug.war...@gmail.com wrote: I think I was just bitten by a naming bug...  I named my application

Re: [web2py] Is there a default file upload when filling forms?

2010-06-06 Thread Thadeus Burgess
thats why you have a VirtualField called get_image_url() that does that and everywhere you need it you go record.get_image_url() More on virtualfields here: http://thadeusb.com/weblog/archive/2009/12/31/web2py_virtualfields_as_an_orm_an_sqlalchemy_approach/27 -- Thadeus On Sun, Jun 6, 2010

Re: [web2py] Keep the instance of a class during the session

2010-06-06 Thread Thadeus Burgess
cache the object. -- Thadeus On Sun, Jun 6, 2010 at 7:23 PM, Jose jjac...@gmail.com wrote: I have a module (in my_app / modules) that defines a class MyClass. This class operates with model data. In the __init__ there is a heavy workload, and data are available for other minor

Re: [web2py] stumped on a regex

2010-06-05 Thread Thadeus Burgess
http://hg.thadeusb.com/Web/web2py_utils/file/697470f78d16/web2py_utils/output.py Line 20 - 48 could possibly be adapted. Basicly use a DOTALL regex to find \n (what about \r too, if your on windows), you might want to use os.newline, and then a dotall regex for the pre code blockqoute etc. Then

Re: [web2py] Is there a default file upload when filling forms?

2010-06-05 Thread Thadeus Burgess
Sounds like you got it. if not record.image: if record.sex == male: return male.jpg else: return female.jpg else: return record.image -- Thadeus On Sat, Jun 5, 2010 at 12:22 PM, Jason Brower encomp...@gmail.com wrote: I need the avatar (IS_IMAGE) in my authentication table to

Re: [web2py] Re: html text editor selection shift position

2010-06-05 Thread Thadeus Burgess
I don't use the web based editor, but it h as to do with the syntax highlighting, turn that off and it should be fine. -- Thadeus On Sat, Jun 5, 2010 at 6:43 PM, mdipierro mdipie...@cs.depaul.edu wrote: hmm. I use a Firefox and never seen this. Massimo On Jun 5, 6:17 pm, MikeEllis

Re: [web2py] Mustache.js and web2py

2010-06-04 Thread Thadeus Burgess
Unfortunately not at the moment. This is something we have been discussing for the last week however it does not seem web2py templates will ever get this. Just as a note, you would have this problem whether you were using jinja, or django templates as well. -- Thadeus On Fri, Jun 4, 2010 at

Re: [web2py] Re: Layout of functions with the MVC environment

2010-06-04 Thread Thadeus Burgess
All functions defined in models are available to controllers and views as anything you put in the models becomes part of the global namespace that the controllers/views are executed in. This leads to potential problems of namespace collision. Make sure you do not overwrite the function

Re: [web2py] [proposition] Need date calculations in a query

2010-06-04 Thread Thadeus Burgess
http://thadeusb.com/weblog/archive/2010/1/5/query_between_dates/30 http://thadeusb.com/weblog/archive/2010/3/19/increase_productivity_by_using_parameterized_queries_with_web2py/33 If you have any questions please feel free to ask. -- Thadeus On Fri, Jun 4, 2010 at 5:42 AM, Sverre

Re: [web2py] Re: Multiple instances of same application

2010-06-04 Thread Thadeus Burgess
/delete setting file. We can choose. On Jun4, 3:26am, Thadeus Burgess thade...@thadeusb.com wrote: Or... we can copy flask and integrate a configuration module.. God I pray we never use something like `0_local_config_pls_dont_pack_dont_commit.py` INTO web2py. web2py and its naming

Re: [web2py] Re: Multiple instances of same application

2010-06-03 Thread Thadeus Burgess
Or... we can copy flask and integrate a configuration module.. God I pray we never use something like `0_local_config_pls_dont_pack_dont_commit.py` INTO web2py. web2py and its naming conventions . -- Thadeus On Thu, Jun 3, 2010 at 10:22 AM, Iceberg iceb...@21cn.com wrote: I think Doug's

Re: [web2py] Re: Multiple instances of same application

2010-06-03 Thread Thadeus Burgess
could then invoke it like convars = ConVars(request) if convars.debug:    # Handle debug case On Thu, Jun 3, 2010 at 12:26 PM, Thadeus Burgess thade...@thadeusb.com wrote: Or... we can copy flask and integrate a configuration module.. God I pray we never use something like

Re: [web2py] Re: Multiple instances of same application

2010-06-03 Thread Thadeus Burgess
For context, please see http://flask.pocoo.org/docs/config/ http://flask.pocoo.org/docs/api/#configuration -- Thadeus On Thu, Jun 3, 2010 at 4:55 PM, Thadeus Burgess thade...@thadeusb.com wrote: Exactly, We can copy flask and add the same configuration module which implements everything

Re: [web2py] How to get the filename from an upload field?

2010-06-02 Thread Thadeus Burgess
Taken from http://web2py.com/book/default/section/7/2?search=original+filename Occasionally you may want to store the original filename in a database field. In this case, you need to modify the model and add a field to store it in: db.define_table('person', Field('name',

Re: [web2py] Clearing Database Tables

2010-06-02 Thread Thadeus Burgess
db.table.truncate() -- Thadeus On Wed, Jun 2, 2010 at 1:05 PM, Vasile Ermicioi elff...@gmail.com wrote: db(db.table.id 0).delete() no sure what you mean by entries in a given field

Re: [web2py] Clearing Database Tables

2010-06-02 Thread Thadeus Burgess
And for a given field... db(db.table.id 0).update(field = None) -- Thadeus On Wed, Jun 2, 2010 at 2:04 PM, Thadeus Burgess thade...@thadeusb.com wrote: db.table.truncate() -- Thadeus On Wed, Jun 2, 2010 at 1:05 PM, Vasile Ermicioi elff...@gmail.com wrote: db(db.table.id 0

Re: [web2py] calling a fuction from javascript (jquery)

2010-06-01 Thread Thadeus Burgess
Add the variable to the data declaration of the jquery.ajax method. This will be passed along as a POST or GET and then your function just looks at request.vars.naotext. -- Thadeus On Tue, Jun 1, 2010 at 10:30 AM, pk peter.kirch...@youngdesigners.de wrote: hi i need help, how can i call a

Re: [web2py] Problem with document uploading (not with common processing)

2010-06-01 Thread Thadeus Burgess
Add a third table named something like doc_links. So you have activity -- id name docpool --- id name data doc_links - id activity_id docpool_id Now in your form, you insert both (you will need a custom SQLFORM.factory for this). Submit each record, then create a

Re: [web2py] Re: how to generate barcode label ?

2010-06-01 Thread Thadeus Burgess
jquery one froze my firefox too =( -- Thadeus On Tue, Jun 1, 2010 at 12:34 PM, Richard Shebora sheb...@gmail.com wrote: This works fine for me offline... http://zbar.sourceforge.net/ Thanks, Richard Shebora On Tue, Jun 1, 2010 at 1:18 PM, ceriox cer...@gmail.com wrote: i generate

Re: [web2py] Re: 1.79.0rc1 please check it out

2010-05-30 Thread Thadeus Burgess
I think that the .hgtags need to be updated. the 1.79.0rc1 tag refers to an earlier commit than the commit with the message 1.79.0rc1 The tag refers to c29660517c When I think it needs to refer to 075c967337 -- Thadeus On Sun, May 30, 2010 at 3:52 AM, mdipierro

Re: [web2py] Re: Non-Breaking Space Helper

2010-05-30 Thread Thadeus Burgess
Also, you can use the css rules to accomplish the same. text-align: center; width: 150px; height: 100px; padding-top: 40px; -- Thadeus On May 30, 11:32 am, NetAdmin mr.netad...@gmail.com wrote: It would be nice to have a non-breaking space html-helper that uses the following

Re: [web2py] Corrupted db?

2010-05-30 Thread Thadeus Burgess
Try wiping both databases and sessions and cache. Somehow it seems a record got inserted without an id ?? -- Thadeus On Sun, May 30, 2010 at 4:44 PM, weheh richard_gor...@verizon.net wrote: Things were going great with my new app, but then I seem to have corrupted something and now I

<    1   2   3   4   5   6   7   8   9   10   >