[web2py] Re: Auth only shows a few feilds on the profile page...

2010-05-04 Thread encompass
I suppose it was lost in the duscussions going on. I will bump it again. :) On May 4, 4:56 pm, Jason Brower wrote: > I am not using any special view for the profile page... > This is the relevent stuff in my model... > db.define_table('users', >         SQLField('nickname', 'string', length=20),

[web2py] blocks in template

2010-05-04 Thread Massimo Di Pierro
Less that two days ago Thadeus made a request: http://web2py.uservoice.com/forums/42577-general/suggestions/702804-block-tags-for-templates?ref=comments for this to be supported in web2py: http://docs.djangoproject.com/en/dev/topics/templates/#template-inheritance Today Thadeus sent me pa

[web2py] Re: First web2py app

2010-05-04 Thread Yarko Tymciurak
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 mdipierro. ;) > > The app is about storing personal dvds, music cds, books and keep > track of any

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

2010-05-04 Thread mdipierro
can you also print os.getcwd() and request.env.web2py_path On May 4, 10:26 pm, Matthew wrote: > From console: > > >>> db._folder > > 'applications/myapp/databases'>>> request.folder > > 'applications/myapp' > > Print statements from search_test.py, the unit test: > > applications/myapp/databas

[web2py] Re: agregate new method to login_methods

2010-05-04 Thread mdipierro
Mind that you can call them all at once auth.settings.login_methods.append(method1) auth.settings.login_methods.append(method2) auth.settings.login_methods.append(method3) On May 4, 10:53 pm, kike wrote: > I have wrote a diferent class to validate the credential of the user > in LDAP because th

[web2py] Re: agregate new method to login_methods

2010-05-04 Thread kike
I have wrote a diferent class to validate the credential of the user in LDAP because the provides by web2py don't work with the LDAP I use, but all the user for my aplication are not in that LDAP, because of this I use the autentication provided by web2py in auth an I need agregate my other auten

[web2py] Re: Caching downloads

2010-05-04 Thread mdipierro
+1 On May 4, 10:39 pm, Mariano Reingart wrote: > I'm using Apache & mod_wsgi > > I'm looking at the other thread that massimo suggests changes to > apache.conf, but after using fast_download (changing headers and using > stream) it runs really quickly! > > (I know, serving through apache would be

Re: [web2py] Re: Caching downloads

2010-05-04 Thread Mariano Reingart
I'm using Apache & mod_wsgi I'm looking at the other thread that massimo suggests changes to apache.conf, but after using fast_download (changing headers and using stream) it runs really quickly! (I know, serving through apache would be even faster, but in this case I prefer portability and a eas

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

2010-05-04 Thread Matthew
>From console: >>> db._folder 'applications/myapp/databases' >>> request.folder 'applications/myapp' Print statements from search_test.py, the unit test: applications/myapp/databases applications/myapp On May 4, 10:27 pm, mdipierro wrote: > and what is in db._folder? > > On May 4, 9:27 pm, md

[web2py] Re: Caching Advise !

2010-05-04 Thread mdipierro
With apache you can do AliasMatch ^/appname/default/customDownload/(.*) \ /home/www-data/web2py/applications/appname/uploads/ $1 Order Allow,Deny Allow from all On May 4, 10:17 pm, Yannick wrote: > Hehe Thanks for the note... > > Thanks for the clarification... The Htm

[web2py] Re: Caching Advise !

2010-05-04 Thread mdipierro
Which web server? On May 4, 10:17 pm, Yannick wrote: > Hehe Thanks for the note... > > Thanks for the clarification... The Html loading is not slow it's fine > BUT loading the pictures are still kind of slow even when I only > stream them...  here is a code I have in my custom download method: >

[web2py] Re: Caching Advise !

2010-05-04 Thread Yannick
Hehe Thanks for the note... Thanks for the clarification... The Html loading is not slow it's fine BUT loading the pictures are still kind of slow even when I only stream them... here is a code I have in my custom download method: def customDownload(): response.stream(open(os.path.join(request.

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

[web2py] Re: Error in validator in GAE

2010-05-04 Thread Leandro - ProfessionalIT
Now I know the problem and the solution Let's go: In db.py I put this: Field('data_hora','datetime', default=now, requires=[IS_DATETIME(format='%d-%m-%Y %H:%M'), IS_NOT_IN_DB(db, 'agenda.data_hora')], unique=True, label=T('Data/Hora')), and in web2py_ajax.html I customize the default date

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

2010-05-04 Thread mdipierro
and what is in db._folder? On May 4, 9:27 pm, mdipierro wrote: > Perhpas something is causing the test script to pick up the wrong > database. What is in request.folder from console? > > On May 4, 8:44 pm, Matthew wrote: > > > Thanks for the quick reply! > > > They are in the db. That's why runn

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

2010-05-04 Thread mdipierro
Perhpas something is causing the test script to pick up the wrong database. What is in request.folder from console? On May 4, 8:44 pm, Matthew wrote: > Thanks for the quick reply! > > They are in the db. That's why running the code from the console works > and why it's puzzling that the script do

[web2py] Re: Caching downloads

2010-05-04 Thread mdipierro
response.stream (which you use) handles if-modified-since and range requests automatically. On May 4, 9:04 pm, Mariano Reingart wrote: > I thought so, > > I had to modify mydownload so browsers do client-side caching, > speeding up the web-page load: > > def fast_download(): >     # very basic se

[web2py] Re: Building compiled version of web2py app

2010-05-04 Thread mdipierro
Just take the web2py binary distribution. Unzip, start it, upload your app via admin (as "init"), stop web2py. Copy web2py.app on the USB drive and you are done. On May 4, 9:01 pm, Yarko Tymciurak wrote: > I'm trying to build a distributable version of an app for mac (and > it's my first time tr

Re: [web2py] Re: Caching downloads

2010-05-04 Thread Mariano Reingart
I thought so, I had to modify mydownload so browsers do client-side caching, speeding up the web-page load: def fast_download(): # very basic security: if not request.args(0).startswith("sponsor.logo"): return download() # remove/add headers that prevent/favors caching del

[web2py] Building compiled version of web2py app

2010-05-04 Thread Yarko Tymciurak
I'm trying to build a distributable version of an app for mac (and it's my first time trying to do this for a mac). I've tried "make app" from the web2py install directory; I've tried "python setup_app.py py2app" (which I think should work); I am missing some step - has anyone built a web2py ma

[web2py] Re: Error in validator in GAE

2010-05-04 Thread Leandro - ProfessionalIT
Master Massimo, just a detail: This form still not saved a data because this error in submit and looking in GAE dataviewer I see that the kind/table agenda not was created / not exist. I think in disable the requires and insert a record and after re- enable this requires, because IMHO this r

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

2010-05-04 Thread Matthew
Thanks for the quick reply! They are in the db. That's why running the code from the console works and why it's puzzling that the script doesn't since the same environment is set up. On May 4, 9:28 pm, mdipierro wrote: > I do not think that line is the problem. Are the records in the db > alrea

[web2py] Re: Caching Advise !

2010-05-04 Thread mdipierro
show -> slow. Note to self: do not type in the dark. On May 4, 8:16 pm, Massimo Di Pierro wrote: > You need to understand why it is show. It is show to load the age or   > to load the pictures (because there are lots of the m in the page)?   > caching the select only affect the time to download

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

2010-05-04 Thread mdipierro
I do not think that line is the problem. Are the records in the db already or are they stored by the unit_test? On May 4, 8:12 pm, Matthew wrote: > I'm attempting to unit test a method by > followinghttp://web2py.com/AlterEgo/default/show/260. If I run the query > inside > the console, it works

[web2py] Re: agregate new method to login_methods

2010-05-04 Thread mdipierro
Can you explain more? On May 4, 8:11 pm, kike wrote: > I have defined a method to logins in  a logins.py, file external to > web2py, and I want agregate to login_methods, for example if my metod > names MyMethod and is in a file called logins.py how I agregated to > auth.settings.login_methods.ap

[web2py] Re: Error in validator in GAE

2010-05-04 Thread mdipierro
you have corrputed data in the db. You stored something in a field that was a "string" and now is a "date". web2py cannot get the record out because it is not what it should be. On May 4, 7:11 pm, Leandro - ProfessionalIT wrote: > Hi Friends, > >    I'm developing a 'calendar' (agenda in portugu

[web2py] Re: Caching downloads

2010-05-04 Thread mdipierro
caching downloads does not make sense. This is because the role of download is to check permissions to download a file (if they are set). if you cache it then you do not check. If you do not need to check do not use download. Use def mydownload(): return response.stream(open(os.path.join(requ

[web2py] Re: Caching Advise !

2010-05-04 Thread Massimo Di Pierro
You need to understand why it is show. It is show to load the age or to load the pictures (because there are lots of the m in the page)? caching the select only affect the time to download the html page but does not affect the pictures since you are caching the list of function names not no

[web2py] Different results in console vs. script

2010-05-04 Thread Matthew
I'm attempting to unit test a method by following http://web2py.com/AlterEgo/default/show/260. If I run the query inside the console, it works fine. If I run it in my unit tests, it returns no results (NOTE that there are no errors in the unit test). Here is the query: rows = db(db.flavor.id>

[web2py] agregate new method to login_methods

2010-05-04 Thread kike
I have defined a method to logins in a logins.py, file external to web2py, and I want agregate to login_methods, for example if my metod names MyMethod and is in a file called logins.py how I agregated to auth.settings.login_methods.append(MyMethod). Thank for your help

[web2py] Re: Registration Problem

2010-05-04 Thread Sheldon
Thank you. That is exactly what i needed! On May 4, 3:15 pm, mdipierro wrote: > def set_company_name(form): >         # use form.vars.id > > On May 4, 4:26 pm, Sheldon <8cylin...@gmail.com> wrote: > > > I have an app that has users for multiple companies registering > > and then are later approv

[web2py] Error in validator in GAE

2010-05-04 Thread Leandro - ProfessionalIT
Hi Friends, I'm developing a 'calendar' (agenda in portuguese) app and this app is deployed in GAE. My db.py # the data_hora field have a brazilian format and I cannot have two records in the same data/time (only a event in a date/time) db.define_table('agenda', Field('data_hora','datetime

[web2py] KeyError using T()

2010-05-04 Thread Mariano Reingart
Seems translated texts cannot be used as keys for dictionaries or values to be iterated for lists/tuples: SPONSOR_LEVELS=(T("Organizer"),T("Sponsor")) ... random.shuffle(response.sponsors[SPONSOR_LEVELS[1]]) Traceback (most recent call last): File "gluon/restricted.py", line 178, in restricted

[web2py] Caching Advise !

2010-05-04 Thread Yannick
Hello mate, I used a lot of pictures in my application. Currently what I'm doing is I cache the DAL Select like this: "db().select(db.photo.fileupload, db.photo.id, cache=(cache.ram, 3600))" And when the users upload new pictures, in the "onaccept" function I clear the cache like this: - ca

[web2py] Caching downloads

2010-05-04 Thread Mariano Reingart
To cache images, I'm trying to do: @cache(request.env.path_info,60,cache.ram) def download(): return response.download(request,db) But seems that is not working: http://www.web2py.com.ar/raf10dev/default/index (see images at sidebar, if you quickly reload pages, they fail) The book says somethin

[web2py] Re: GAE delete no longer works

2010-05-04 Thread Christophe Plat
Hi Massimo, the issue is that delete can't work directly on the google.appengine.ext.db.Query object. In the delete function, items is an instance of that Query object, and has to be transformed into a list of google.appengine.ext.db.Models - which is what the fetch function does. In fact, it does

[web2py] Re: cache.disk.clear

2010-05-04 Thread mdipierro
ok, keep us posted. On May 4, 11:51 am, Avik Basu wrote: > It seems to work fine from the interactive shell.  And after I ran > that command from the interactive shell, I think that I no longer have > the "invalid function" when calling the action.  So, perhaps it was a > problem with items that

[web2py] Re: Sendgrid Support?

2010-05-04 Thread mdipierro
I do not understand. What is sendgrid? How is different from any other smpt server? On May 4, 12:48 pm, Oscar wrote: > Does Web2Py have sendgrid.com API support? it uses an smtp mail server > and API for create emails under their rules. You can see the API for > python athttp://cl.ly/r29and examp

[web2py] Re: cant find rel path data from js library

2010-05-04 Thread mdipierro
I had lots of problems with slickgrid and use jqgrid instead. Slickgrid is sleek but the documentation is lacking and contains code like this var BoolCellFormatter = function(row, cell, value, columnDef, dataContext) { return value ? "" : ""; }; Which seams to assume a folder structure like s

[web2py] Re: Registration Problem

2010-05-04 Thread mdipierro
def set_company_name(form): # use form.vars.id On May 4, 4:26 pm, Sheldon <8cylin...@gmail.com> wrote: > I have an app that has users for multiple companies registering > and then are later approved by an administrator for that > particular company.  The problem is that I need to insert a

[web2py] Re: Kill DAL

2010-05-04 Thread mdipierro
on a second thought. This could conflict with close_all_instances and needs some more thought. On May 4, 5:13 pm, mdipierro wrote: > we should and it should call > > self._connection.close() > > On May 4, 5:00 pm, Thadeus Burgess wrote: > > > We do not have a db.close(). > > > However I figured

[web2py] Re: Kill DAL

2010-05-04 Thread mdipierro
we should and it should call self._connection.close() On May 4, 5:00 pm, Thadeus Burgess wrote: > We do not have a db.close(). > > However I figured the problem. In most other db systems (sqlalchemy, > django, etc) use the ``sqlite://:memory:`` syntax, whereas web2py dal > uses ``sqlite:memory:`

[web2py] Re: GAE delete no longer works

2010-05-04 Thread mdipierro
Thank you for reporting this. Please check my fix in trunk. Massimo On May 4, 4:16 pm, Christophe Plat wrote: > This issue on web2py is related to GAE issue 3119 (http:// > code.google.com/p/googleappengine/issues/detail?id=3119). > I'm using web2py 1.77.3. > > In gql.py, line 702 to 709: > > de

Re: [web2py] Re: Kill DAL

2010-05-04 Thread Thadeus Burgess
We do not have a db.close(). However I figured the problem. In most other db systems (sqlalchemy, django, etc) use the ``sqlite://:memory:`` syntax, whereas web2py dal uses ``sqlite:memory:``. However, db.close() would be helpful for external scripts like cron ? -- Thadeus On Tue, May 4, 2

[web2py] Re: Kill DAL

2010-05-04 Thread mdipierro
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 completely remove the database on my def tearDown() function. > > Something like > > db._cursor.close() > > How

[web2py] Registration Problem

2010-05-04 Thread Sheldon
I have an app that has users for multiple companies registering and then are later approved by an administrator for that particular company. The problem is that I need to insert a value into the users record (in this case a company name) so that the admin for that company can then approve that use

[web2py] Re: Kill DAL

2010-05-04 Thread Thadeus Burgess
More info: I have an "sqlite://:memory:" dal connection. I am reusing this memory database for unit testing. I need to completely remove the database on my def tearDown() function. Something like db._cursor.close() However the database still seems to be in memory when I load it up again. -- T

[web2py] Re: Debuging web2py & form.custom problems with AUTH

2010-05-04 Thread howesc
Not 100% sure of your problembut do you output session.flash, response.flash, and register.errors anywhere in your view? what you describe sounds like a validation problem, but if you don't output the register.errors you don't see the what the problem is. (at least i had this difficulty when

[web2py] Re: First web2py app

2010-05-04 Thread ScOut3R
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 mdipierro. ;) The app is about storing personal dvds, music cds, books and keep track of any lent items and a wishlist. That's pretty basic,

[web2py] Re: auth_ tables problem

2010-05-04 Thread howesc
Annet, have you tried: # defines all needed tables without migration/table files auth.define_tables(migrate=False) where you configure auth for your app? cfh On May 4, 9:44 am, annet wrote: > I have one application (called base) in which I define all the tables > for th

[web2py] GAE delete no longer works

2010-05-04 Thread Christophe Plat
This issue on web2py is related to GAE issue 3119 (http:// code.google.com/p/googleappengine/issues/detail?id=3119). I'm using web2py 1.77.3. In gql.py, line 702 to 709: def delete(self): self._db['_lastsql'] = 'DELETE WHERE %s' % self.where (items, tablename, fields) = self._sele

[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

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] Re: fcgihandler.py and logging

2010-05-04 Thread howesc
thank you! On May 4, 9:13 am, mdipierro wrote: > In trunk! > > On May 4, 10:56 am, howesc wrote: > > > Hello, > > > it seems that the "if LOGGING:" block of fcgihandler.py is out of > > date.  can we update it to: > > > if LOGGING: > >     application = gluon.main.appfactory(wsgiapp=gluon.main.w

[web2py] Re: web2py cheat sheet for a pyday

2010-05-04 Thread mdipierro
That pointer is my fault. Mariano just reproduced the original slide design. My original idea was to point request, response, and session to the index() example but, since reponse did not fit, I just pointed the arrow up. On May 4, 2:52 pm, Jonathan Lundell wrote: > On May 4, 2010, at 12:47 PM, M

[web2py] Re: First web2py app

2010-05-04 Thread mdipierro
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 thought that maybe the > public would be interested in it. Is this the right place to > "adv

[web2py] Re: First web2py app

2010-05-04 Thread Patrick
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 thought that maybe the > public would be interested in it. Is this the right place to > "advertise" a web2py based app which might

[web2py] cant find rel path data from js library

2010-05-04 Thread MaxDoesPython
I am trying to integrate a javascript library (slickgrid) and can't seem to figure out where to place the images folder referred to by components of the library. in my view .html file: in slick.editors.js there are referances like: '../images/calendar.gif' and

[web2py] First web2py app

2010-05-04 Thread ScOut3R
Hey There! My first web2py application started as a learning course and the application was designed for personal use but I thought that maybe the public would be interested in it. Is this the right place to "advertise" a web2py based app which might interest the community? If yes, then I'll writ

Re: [web2py] Re: web2py cheat sheet for a pyday

2010-05-04 Thread Jonathan Lundell
On May 4, 2010, at 12:47 PM, Mariano Reingart wrote: > On Tue, May 4, 2010 at 3:49 PM, Jonathan Lundell wrote: >> >> What does it mean that response has a pointer to request? >> > > Maybe because that is more clear than a pointer to db.py, default.py > and/or index.html What I'm asking, thoug

Re: [web2py] Re: web2py cheat sheet for a pyday

2010-05-04 Thread Mariano Reingart
On Tue, May 4, 2010 at 3:49 PM, Jonathan Lundell wrote: > > What does it mean that response has a pointer to request? > Maybe because that is more clear than a pointer to db.py, default.py and/or index.html Best regards, Mariano Reingart http://www.web2py.com.ar http://www.sistemasagiles.com.ar

Re: [web2py] Re: web2py cheat sheet for a pyday

2010-05-04 Thread Jonathan Lundell
On May 4, 2010, at 11:01 AM, Mariano Reingart wrote: > Fixed. > > I've also > * added: db(query).update(field=val) > * added: @cache('key', 3600, cache.ram) -removed ('domain') from amfrpc- > * modified: T('message') => ‘translation’ > * added: “ajax(url,[id1,id2,...],target)” > > Mariano Reing

[web2py] Re: LDAP authentication

2010-05-04 Thread Yarko Tymciurak
On May 4, 9:22 am, mdipierro wrote: > Try replace > > from gluon.contrib.login_methods.ldap_auth import ldap_auth >         auth.settings.login_methods.append(ldap_auth( >             mode='ad', server='dc01', >             base_dn='ou=Users,dc=domain,dc=com')) > > with > > from gluon.contrib.logi

[web2py] Re: web2py cheat sheet for a pyday

2010-05-04 Thread waTR
Had this from a while ago. Not sure if this is what you are looking for. http://rapidshare.com/files/383518290/web2py_cheatsheet.pdf.html On May 4, 10:33 am, mdipierro wrote: > Almost perfect. You lost a 'r' in r-espose and there is ] that takes > unnecessarily an entire line. I will replace mi

Re: [web2py] Re: SASS experience

2010-05-04 Thread Thadeus Burgess
Ah, perhaps :) You can always stick it in a w2p.css. If you need to upgrade the w2p.css (which does not happen that often) it will be placed in the welcome app if you update from the repository. For appadmin, I usually have to copy new versions over manually. -- Thadeus On Tue, May 4, 2010

Re: [web2py] Re: web2py cheat sheet for a pyday

2010-05-04 Thread Mariano Reingart
Fixed. I've also * added: db(query).update(field=val) * added: @cache('key', 3600, cache.ram) -removed ('domain') from amfrpc- * modified: T('message') => ‘translation’ * added: “ajax(url,[id1,id2,...],target)” Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On

[web2py] Re: SASS experience

2010-05-04 Thread Carl
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 > > > > On Tue, May 4, 2010 at 11:58 AM, Carl wrote: > > thanks for responding. > > > how do you deal with Web2py

[web2py] Sendgrid Support?

2010-05-04 Thread Oscar
Does Web2Py have sendgrid.com API support? it uses an smtp mail server and API for create emails under their rules. You can see the API for python at http://cl.ly/r29 and example at http://cl.ly/o1B. Regards, Oscar.

[web2py] Re: web2py cheat sheet for a pyday

2010-05-04 Thread mdipierro
Almost perfect. You lost a 'r' in r-espose and there is ] that takes unnecessarily an entire line. I will replace mine with yours. On May 4, 11:56 am, Mariano Reingart wrote: > Like this? > > Mariano Reingarthttp://www.sistemasagiles.com.arhttp://reingart.blogspot.com > > On Tue, May 4, 2010 at

[web2py] Debuging web2py & form.custom problems with AUTH

2010-05-04 Thread waTR
I am wondering if there is a way to debut web2py apps. I would like to see what functions are being called and what data is being passed to them. I am trying to get auth to work with form.custom.widget, but everytime I submit, the widget doesn't insert the record into the database, it simply refre

Re: [web2py] Re: SASS experience

2010-05-04 Thread Thadeus Burgess
I do not understand. I do not have any web2py css files. -- Thadeus On Tue, May 4, 2010 at 11:58 AM, Carl wrote: > thanks for responding. > > how do you deal with Web2py upgrades: an upgrade that modifies its > css. Have you split from Web2py's css files, do you handle them > outside of Clev

[web2py] Re: SASS experience

2010-05-04 Thread Carl
thanks for responding. how do you deal with Web2py upgrades: an upgrade that modifies its css. Have you split from Web2py's css files, do you handle 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 SAS

Re: [web2py] Re: web2py cheat sheet for a pyday

2010-05-04 Thread Mariano Reingart
Like this? Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On Tue, May 4, 2010 at 1:28 PM, mdipierro wrote: > Excellent! A few suggestions to keep up with recent changes: > > SQLDB(...,pools=...) should be DAL(...,pool_size=...) > > add response.files.append('htt

[web2py] Re: cache.disk.clear

2010-05-04 Thread Avik Basu
It seems to work fine from the interactive shell. And after I ran that command from the interactive shell, I think that I no longer have the "invalid function" when calling the action. So, perhaps it was a problem with items that were accumulating in the cache. I'll report back if it breaks agai

[web2py] auth_ tables problem

2010-05-04 Thread annet
I have one application (called base) in which I define all the tables for three other applications. In the three applications I use the same db.py file. In these db.py files I set migrate=False on all tables. One of these applications is a CMS, in which I enabled Authorization and Authentication.

[web2py] Re: web2py cheat sheet for a pyday

2010-05-04 Thread mdipierro
Excellent! A few suggestions to keep up with recent changes: SQLDB(...,pools=...) should be DAL(...,pool_size=...) add response.files.append('http://somewhere/file.css') replace response.author, response.description and response.keywords with response.meta.author, response.meta.description

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

[web2py] Re: Dynamic update

2010-05-04 Thread mdipierro
db(db.user.id==1).update( **dict(first_name='Jack', title='CEO' ) ) or db.user[1] = dict(first_name='Jack', title='CEO') On May 4, 10:56 am, PanosJee wrote: > Hello everyone I hope you are doing fine. > > I want to update a record but I do not know in advance the fields i > want to update. I

[web2py] Re: fcgihandler.py and logging

2010-05-04 Thread mdipierro
In trunk! On May 4, 10:56 am, howesc wrote: > Hello, > > it seems that the "if LOGGING:" block of fcgihandler.py is out of > date.  can we update it to: > > if LOGGING: >     application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase, >                logfilename='httpserver.log', >        

Re: [web2py] Dynamic update

2010-05-04 Thread Vasile Ermicioi
db.user[5].update_record(last_name='Vlachoyannis', title='CTO', salary=180)

Re: [web2py] Re: web2py cheat sheet for a pyday

2010-05-04 Thread Mariano Reingart
Ok, remade. This one is B/W only and fits in half legal, to be easily printable What do you think? Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On Mon, May 3, 2010 at 4:20 PM, mdipierro wrote: > The source (which I cannot find) was a Comic Life file. Unless y

[web2py] Dynamic update

2010-05-04 Thread PanosJee
Hello everyone I hope you are doing fine. I want to update a record but I do not know in advance the fields i want to update. I would like to create a dict with the fields and do the following. db(db.user.id==1).update( dict(first_name='Jack', title='CEO' ) ) db(db.user.id==2).update( dict(last_n

[web2py] fcgihandler.py and logging

2010-05-04 Thread howesc
Hello, it seems that the "if LOGGING:" block of fcgihandler.py is out of date. can we update it to: if LOGGING: application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase, logfilename='httpserver.log', profilerfilename=None) i'd also like to figure out the

Re: [web2py] Re: global name 'db' is not recognize in a module

2010-05-04 Thread Jonathan Lundell
On May 4, 2010, at 4:26 AM, canna wrote: > Thank you for the answer > so how would you share functions between controllers easily? without > passing global objects to the functions all the time? > is the only way is to bundle it all in one class that will be > initialized with the 'db' variable? >

[web2py] Re: LDAP authentication

2010-05-04 Thread mdipierro
Try replace from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods.append(ldap_auth( mode='ad', server='dc01', base_dn='ou=Users,dc=domain,dc=com')) with from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.sett

[web2py] SASS experience

2010-05-04 Thread Carl
hi, Is anyone using SASS to manage their CSS definitions? http://sass-lang.com/ And if so, how have you managed web2py's css files? thanks

[web2py] LDAP authentication

2010-05-04 Thread Sverre
I tried -- from gluon.tools import * auth=Auth(globals(),db) # authentication/authorization from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods.append(ldap_auth( mode='ad',

[web2py] Re: Using form.custom and auth

2010-05-04 Thread waTR
I tried testing to see if using {{=form}} and just using the venilla form produced by auth would work. It seems that auth is just not inserting new users into the db no matter what I do...whether I just use {{=form}} or I customize my own... How do I check where auth is getting stuck? On May 4,

[web2py] Auth only shows a few feilds on the profile page...

2010-05-04 Thread Jason Brower
I am not using any special view for the profile page... This is the relevent stuff in my model... db.define_table('users', SQLField('nickname', 'string', length=20), SQLField('first_name', 'string', length=15), SQLField('last_name', 'string', length=15), SQLField('ph

[web2py] Re: Using form.custom and auth

2010-05-04 Thread waTR
Can someone point me to some examples of usage of form.custom.widget for auth? I am looking for example code. On May 3, 5:59 pm, waTR wrote: > Solved previous problem. However, the form won't actually insert into > the database...am I missing something? > > On May 3, 5:36 pm, waTR wrote: > >

[web2py] Re: global name 'db' is not recognize in a module

2010-05-04 Thread mdipierro
It is your choice. In any language when you use functions in modules you have to pass variables to them. I like the idea of instantiating a class. That is how Auth, Crud and Service work too. On May 4, 6:26 am, canna wrote: > Thank you for the answer > so how would you share functions between con

Re: [web2py] Web2py or Python 2.5 consumes too much RAM

2010-05-04 Thread Kuba Kucharski
> I tried rebooting the server but after some time it starts to consume > a lot of memory again. There's only one user for now do you have some kind of automated actions(like xml-rpc calls, js scripts using json-rpc) and you forgot to disable sessions for this actions with session.forget?

[web2py] Re: global name 'db' is not recognize in a module

2010-05-04 Thread canna
Thank you for the answer so how would you share functions between controllers easily? without passing global objects to the functions all the time? is the only way is to bundle it all in one class that will be initialized with the 'db' variable? or there is other way? On May 4, 1:49 pm, mdipier

[web2py] Re: storing sessions for auth users

2010-05-04 Thread selecta
I tried to store and reload the session the following way in db.py i added import pickle #-- def session_load(form = None): global session auth_session = db(db.auth_session.user == auth.user.id).select().first() session = pickle.loads(auth_session.session) def se

[web2py] Re: global name 'db' is not recognize in a module

2010-05-04 Thread mdipierro
A module is a module. You can import stuff form the module but the module will not see variables defined in the calling environment. In the module you can defined a function that takes db as parameter, import the funciton and call it with the db instance. You will have the problem not just for db,

[web2py] global name 'db' is not recognize in a module

2010-05-04 Thread canna
hi all, I want to share a bunch of functions between controllers, so I moved them to a module called 'utilities' in the modules folder, and in the controller I import the module as suggested here in the forum: import applications.myapp.modules.utilities as util reload(util) the problem is, it's n