[web2py:19439] Re: WARNING:root:unable to import dbhash (only from external cron)

2009-04-08 Thread AchipA
Massimo, can you comment on this ? The cron module cannot commit the database (as it knows nothing about it and lives in a different process), so if this really is the case for all database engines that's a bit of snag. On Apr 7, 8:04 pm, seth wrote: > Just a couple more data points in case they

[web2py:19440] Re: how to do autoindex for directories & serve static html files

2009-04-08 Thread Timmie
Sorry for insisting on this. But I didn't find an answer on the docs. I have a set of static html files generated through rst2html and which will never need a model. * How can I serve these with web2py without the need to put them in an apache htdocs directory? * Do I have to create a function in

[web2py:19441] running the development version and versioning

2009-04-08 Thread Timmie
Hello, I need some advice on using the development version that I checked out from Launchpad. My own applications would be developed in a subdirectory web2py/ applications. Off cource, I do not want them to be pushed / commited to the main web2py repository. How do you work with the latest devel

[web2py:19442] Re: web2py team & Geo/GIS project created at Launchpad

2009-04-08 Thread dbb
Tim: I have applied for membership. On Apr 7, 11:52 am, Timmie wrote: > Hello, > yesterday I created a web2py team at launchpad.https://launchpad.net/~web2py > > Please feel free to add yourself to the team. > It doesn't mean something special so far. But maybe this can > facilitate common devel

[web2py:19444] Re: running the development version and versioning

2009-04-08 Thread desfrenes
maybe you should just export the version. Or use externals. On Apr 8, 10:21 am, Timmie wrote: > Hello, > I need some advice on using the development version that I checked out > from Launchpad. > > My own applications would be developed in a subdirectory web2py/ > applications. > Off cource, I d

[web2py:19445] Re: running the development version and versioning

2009-04-08 Thread AchipA
That's almost default behaviour: bzr branch http://bazaar.launchpad.net/%7Emdipierro/web2py/devel now, work your things, commit, update, etc, and when you want to sync to newest web2py, just bzr pull if it fails (diverged branches), do bzr merge http://bazaar.launchpad.net/%7Emdipierro/web2py

[web2py:19443] Re: unable to parse csv file

2009-04-08 Thread fredg
On 7 avr, 21:34, mdipierro wrote: > Because if appadmin were to give a ticket people would interpret this > as a web2py (appamdin) bug. Yes, I understand. >    db.youtable.import_from_csv_file(open(,'rb')) fredg [ ~/Desktop/web2py ]$ python web2py.py -S nutyx WARNING:root:unable to import d

[web2py:19446] Re: unable to parse csv file

2009-04-08 Thread fredg
Is that CSV import impossible because web2py can't set a primary key that is not id ? Not even possible with your sqldesigner : http://mdp.cti.depaul.edu/sqldesigner/default/sqldesigner I don't have any trouble importing my CSV into an sqlite database made with the firefox extension (SQLite Manag

[web2py:19447] Re: not unicode

2009-04-08 Thread mdipierro
IS_MATCH('\d{4}\s?\w{2}') On Apr 8, 1:52 am, jmverm...@xs4all.nl wrote: > Denes, > > > same here, IS_LENGTH is invalid with integers (numbers don't have a > > length property in Python). > > I didn't know that, however, removing the IS_LENGTH() validator solved > the problem )after finishing the

[web2py:19448] Re: WARNING:root:unable to import dbhash (only from external cron)

2009-04-08 Thread mdipierro
That is OK. For now you have to commit manually. It may be possible to change this behaviour in the future but it requires more thought. For example, what happens if a cron fails? Should a ticket be issue? Massimo On Apr 8, 3:12 am, AchipA wrote: > Massimo, can you comment on this ? The cron mo

[web2py:19449] Re: how to do autoindex for directories & serve static html files

2009-04-08 Thread mdipierro
You can put your files in static and they will all be exposed. You can also create an action like def static_content(): import os files=os.listdir(os.path.join(request.folder,'static')) return HTML(BODY(*[TR(TD(A(f),_href=URL (r=request,c='static',f=f for f in files])) to lis

[web2py:19450] Re: WARNING:root:unable to import dbhash (only from external cron)

2009-04-08 Thread AchipA
Good question. Ideally, I'd like (to be able to tell) web2py to issue the ticket itself. The alternative, reading back a trace from cron's stderr and inserting that as a ticket is ugly as hell. Any particular reason you're not creating tickets when called from the command line ? On Apr 8, 3:16 pm

[web2py:19452] Re: BETWEEN functionality

2009-04-08 Thread jmvermeer
Given this model: db.define_table('zipcoderegions', SQLField('region', type=integer, default='',notnull=True), SQLField('codemin', type=integer, default='', notnull=True), SQLField('codemax', type=integer,, default='', notnull=True), migrate=False) and the values in the zipcoder

[web2py:19453] web2py_path setting in gluon/main.py causing problems for scripts

2009-04-08 Thread Guido Kollerie
In gluon/main.py somewhere around line 77 the variable web2py_path is being set as follows: web2py_path = os.environ.get('web2py_path', os.getcwd()) This variable is later used to read in the file VERSION. For simply running web2py this works beautifully. However I'm writing a small script

[web2py:19451] Re: BETWEEN functionality

2009-04-08 Thread jmvermeer
Given this model: db.define_table('zipcoderegions', SQLField('region', type=integer, default='',notnull=True), SQLField('codemin', type=integer, default='', notnull=True), SQLField('codemax', type=integer,, default='', notnull=True), migrate=False) and the values in the zipcoder

[web2py:19454] auto_complete

2009-04-08 Thread annet
I am trying to get an auto_complete field to work based on the following table: db.define_table('zipcoderegions', SQLField('region', type=integer, default='',notnull=True), SQLField('codemin', type=integer, default='', notnull=True), SQLField('codemax', type=integer,, default='', not

[web2py:19455] Re: BETWEEN functionality

2009-04-08 Thread jmvermeer
Given this model: db.define_table('zipcoderegions', SQLField('region', type=integer, default='',notnull=True), SQLField('codemin', type=integer, default='', notnull=True), SQLField('codemax', type=integer,, default='', notnull=True), migrate=False) and the values in the zipcoder

[web2py:19456] Re: auto_complete

2009-04-08 Thread DenesL
On Apr 8, 10:10 am, annet wrote: > I am trying to get an auto_complete field to work based on the > following table: > > db.define_table('zipcoderegions', > SQLField('region', type=integer, default='',notnull=True), > SQLField('codemin', type=integer, default='', notnull=True), > SQLF

[web2py:19457] Re: BETWEEN functionality

2009-04-08 Thread DenesL
On Apr 8, 10:13 am, jmverm...@xs4all.nl wrote: > Given this model: > > db.define_table('zipcoderegions', > SQLField('region', type=integer, default='',notnull=True), > SQLField('codemin', type=integer, default='', notnull=True), > SQLField('codemax', type=integer,, default='', notnull=

[web2py:19458] Re: running the development version and versioning

2009-04-08 Thread Timmie
Thanks for this clarification. I have been working with Bazaar for almost a year. But I used only the chentralised (SVN-like) workflow with update/ commit, so far --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web

[web2py:19459] Re: how to do autoindex for directories & serve static html files

2009-04-08 Thread Timmie
> You can put your files in static and they will all be exposed. > > You can also create an action like > > def static_content(): >      import os >      files=os.listdir(os.path.join(request.folder,'static')) >      return HTML(BODY(*[TR(TD(A(f),_href=URL > (r=request,c='static',f=f for f in

[web2py:19460] Re: not unicode

2009-04-08 Thread DenesL
Or the more specific IS_MATCH('\d{4} [A-Z]{2}') if it has to be digit+digit+digit+digit+space+upperalpha+upperalpha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this grou

[web2py:19461] Re: WARNING:root:unable to import dbhash (only from external cron)

2009-04-08 Thread mdipierro
No. It is just not obvious to me. Moreover I did not create the shell code myself so I am not sure about details. Massimo On Apr 8, 8:42 am, AchipA wrote: > Good question. Ideally, I'd like (to be able to tell) web2py to issue > the ticket itself. The alternative, reading back a trace from cron

[web2py:19462] Re: web2py_path setting in gluon/main.py causing problems for scripts

2009-04-08 Thread mdipierro
OK, uploading to trunk. Thanks. On Apr 8, 8:58 am, Guido Kollerie wrote: > In gluon/main.py somewhere around line 77 the variable web2py_path is > being set as follows: > >      web2py_path = os.environ.get('web2py_path', os.getcwd()) > > This variable is later used to read in the file VERSION.

[web2py:19463] Re: web2py team & Geo/GIS project created at Launchpad

2009-04-08 Thread dbb
Tim: The URL posted by individuals may have other functions which are not related to mapping. What we need is to filter out the Model,controller, and view of the mapping aspect and work on that. Since this area by itself is big and has many usage in data communication world- wired and wireless (

[web2py:19464] web2py 1.60 is out

2009-04-08 Thread mdipierro
web2py 1.60 is out. It contains a lot of small fixes that have been suggested like - ability to have multiple forms in pages - sqlite:///path/file stores .table files in /path not youapp/ databases - etc. The only real new feature is that now you can do routes_in=(('^127.0.0.1:https://localhost

[web2py:19465] Re: web2py team & Geo/GIS project created at Launchpad

2009-04-08 Thread AchipA
The big question is how web2py will evolve with regard to plugin/ appliance architecture, because that would determine how to go about adding geo stuff in a systematic manner. I'mnot sure I'd like it as a t2-style addon, but then again adding it to the core would mean way too many dependen

[web2py:19466] Re: web2py 1.60 is out

2009-04-08 Thread DenesL
On Apr 8, 2:09 pm, mdipierro wrote: > web2py 1.60 is out. > > It contains a lot of small fixes that have been suggested like > - ability to have multiple forms in pages Wasn't this already possible? It is in the book. Is 1.60 different somehow?. > - sqlite:///path/file stores .table files in /

[web2py:19467] Re: web2py 1.60 is out

2009-04-08 Thread mdipierro
Yes but not Auth forms auth.login and auth.register because the former would change the validation requirements of the latter. Sorry I did not explain this well. As I said, very minor issues. Massimo On Apr 8, 2:33 pm, DenesL wrote: > On Apr 8, 2:09 pm, mdipierro wrote: > > > web2py 1.60 is ou

[web2py:19468] Best deployment via apache to hide controller and app name?

2009-04-08 Thread bsnipes
What would be the best way to deploy web2py and 'hide' the default controller and the application name? For example: application name: mysitename controller used for functions: default If a user visits http://www.mysitename.com/ it should pull from web2py /mysitename/default/index. If the d

[web2py:19469] Re: Best deployment via apache to hide controller and app name?

2009-04-08 Thread Boris Manojlovic
Hi Brian, I do not know if you are aware that if you call your application init you will get exactly that what you want. Boris On Wed, Apr 8, 2009 at 9:42 PM, bsnipes wrote: > > What would be the best way to deploy web2py and 'hide' the default > controller and the application name? For exampl

[web2py:19470] Re: Best deployment via apache to hide controller and app name?

2009-04-08 Thread bsnipes
On Apr 8, 3:10 pm, Boris Manojlovic wrote: > I do not know if you are aware that if you call your application init > you will get exactly that what you want. Hmm.. just tried it and while it does make that app come up when just the base url is used in the browser ( testing with the standard web2

[web2py:19471] between "vars" and "args"

2009-04-08 Thread Pystar
in the URL() helper, there are 2 arguments it accepts, "args" and "vars" which is a way of storing data and passing it along with a http request. I somtimes use both interchangeably, is this right? or when is it right to use "args" or "vars"? Thanks --~--~-~--~~~---~--~

[web2py:19472] Re: Best deployment via apache to hide controller and app name?

2009-04-08 Thread mdipierro
in order to the remapping you must know which apps you have. Say you have admin, welcome, yourapp. You can do routes_in= ( ('/admin/(?P.*)','/admin/\g'), ('/welcome/(?P.*)','/welcome/\g'), ('/(?P.*)','/yourapp/\g'), ) routes_out=(('/yourapp/(?P.*)','/\g'),) On Apr 8, 3:47 pm, bsnipes wrote: >

[web2py:19473] Re: between "vars" and "args"

2009-04-08 Thread mdipierro
I do not have a good rule. You must user vars if the values can have arbitrary values (for example spaces). If the values correspond to table names, field names or record ids I tend to user args. Massimo On Apr 8, 5:49 pm, Pystar wrote: > in the URL() helper, there are 2 arguments it accepts, "

[web2py:19474] Stability

2009-04-08 Thread Michal Jursa
Hi, i finished my very first application done with web2py and i have a little problem. I use it on Debian 64bit, python 2.5 with psycopg2 and sometimes the application crashes without a word. As I publish this via reverse proxy, then crash of the application means web service is down. I will h

[web2py:19475] Re: Stability

2009-04-08 Thread mdipierro
This is the first time I hear about it. A bug in your app should not cause web2py to crash. is this related to traffic? What if you just run welcome? What if you just run welcome and establish connections to DB via psycopg2? I think it is necessary to isolate the cause of these crashes. Make

[web2py:19477] Re: Best deployment via apache to hide controller and app name?

2009-04-08 Thread suiato
The syntax suggested looks a bit different from the examples given in 2 and 3 below. When the IP address is omitted, does it default to any IPs (i.e., catch all)? E.g., Is ('/admin/(?P.*)','/admin/\g') the same as ('^.*:/admin/(?P.*)','/admin/\g') ? By the way, could someone teach me what the key

[web2py:19476] common controller function

2009-04-08 Thread alex.k.un...@gmail.com
How can I call common private (not exposed) functions from many different controllers. I thought that in MVC this was something that could be placed in the model if the functions dealt with data. Is it possible to have functions that in essence protect the DB from changes and are a gate keep to th

[web2py:19478] Re: common controller function

2009-04-08 Thread mdipierro
You can put funcitons in a module (say yourapp/modules/yourmodule.py) and import it from applicaiton/yourapp/modules/yourmodule import * mind that they will not global variables (db, request, etc.) and you have to pass the explicitly to the functions in the module. Massimo On Apr 8, 8:30 pm, "

[web2py:19479] Re: Best deployment via apache to hide controller and app name?

2009-04-08 Thread mdipierro
On Apr 8, 7:32 pm, suiato wrote: > The syntax suggested looks a bit different from the examples given in > 2 and 3 below. > When the IP address is omitted, does it default to any IPs (i.e., > catch all)? > E.g., > Is > ('/admin/(?P.*)','/admin/\g') > the same as > ('^.*:/admin/(?P.*)','/admin/\g'

[web2py:19480] Re: web2py 1.60 is out

2009-04-08 Thread Jose
On 8 abr, 15:09, mdipierro wrote: > web2py 1.60 is out. > > It contains a lot of small fixes that have been suggested like > - ability to have multiple forms in pages Massimo You might put some example using SQLFORM. Regards Jose --~--~-~--~~~---~--~~ You recei

[web2py:19481] Re: web2py on GoDaddy?

2009-04-08 Thread Michael
bump! :P any ideas? On Apr 7, 12:03 am, Michael wrote: > I have a few godaddy hosting accounts, and I noticed recently they say > they support Python now, any one have any luck getting web2py running > on GoDaddy? > > thanks! --~--~-~--~~~---~--~~ You received thi

[web2py:19482] Re: common controller function

2009-04-08 Thread g-man
This is similar to my recent post: http://groups.google.com/group/web2py/browse_thread/thread/b406cafc55fde168# It seems people like the Rails-type 'application' global controller, but after thinking a little, I am working out how to get what I want 'the Python way'! Right now, I am storing fun

[web2py:19483] Can't get IS_EXPR to work properly with !=

2009-04-08 Thread waTR
Code: requires=[IS_NOT_EMPTY(), IS_EXPR('value!=%s' % repr(db (db.db_users.dbu_name==request.vars.nick).select()), "Username already exists")] I keep getting the following error: File "", line 1 __ret__=value!= ^ SyntaxError: invalid syntax Why can't I use python's != con

[web2py:19484] Form problem (passing arguments to another controller?)

2009-04-08 Thread waTR
I have a form, and I would like to validate the form in one controller, and then once the form is validated, pass its request.vars to another controller for it to enter the info into the DB. Is this possible? How? form=FORM(TABLE(TR("Your nickname:",INPUT (_type="text",_name="nick",requires=IS_N

[web2py:19485] Re: Form problem (passing arguments to another controller?)

2009-04-08 Thread waTR
I ended up making it work via using a session variable I created called c__register and passing the request.vars via that. However, it would be nice to avoid temporary session storage and simply forward post_vars directly to another controller... On Apr 8, 9:57 pm, waTR wrote: > I have a form

[web2py:19486] Manual Question (possible feature request)

2009-04-08 Thread waTR
I noticed in the manual that SQLForm lets you set variables for the Form html filed like _class, and _method, and _action. However, it would be also nice to have a dictionary of TABLE, TR, and TD _class, _rel, etc... That way SQLForm would be fully customizable. Is there any other way to customiz

[web2py:19487] Re: Manual Question (possible feature request)

2009-04-08 Thread waTR
Found something that talks about this in the Manual on pg. 170. However, it is very limited with regard to examples of its use. On Apr 8, 10:11 pm, waTR wrote: > I noticed in the manual that SQLForm lets you set variables for the > Form html filed like _class, and _method, and _action. However,

[web2py:19488] Re: not unicode

2009-04-08 Thread jmvermeer
Massimo and Denes, Thanks for your help. IS_MATCH() solved my problem. IS_INT_IN_RANGE (1000,) wouldn't have performed the right validation, it excludes . Annet --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group