[web2py] Plat_Forms web framework contest

2010-11-16 Thread Dmitri Zagidulin
Hi all, I recently came across Plat_Forms (http://www.plat-forms.org/ ), which is a 2-day live programming contest (taking place on Jan 18th, 2011, in Nurnberg, Germany) where web frameworks and platforms fight it out on real programming challenges. Who wants to form some web2py teams and compete

[web2py] Re: Sessions table warning for column 'locked'

2010-02-15 Thread Dmitri Zagidulin
Thanks! I'll investigate why it's throwing the warning; the link helps. On Feb 15, 3:35 pm, mdipierro wrote: > That is a mysql error, not a web2py error. Does this help? > > http://forums.kayako.com/f56/steps-fix-sql-error-out-range-value-adju... > > On Feb 15, 2:12 pm

[web2py] Re: Sessions table warning for column 'locked'

2010-02-15 Thread Dmitri Zagidulin
is currently not used so in any case should not be > of concern. The idea was to lock the db record when the session is > accessed by a client. This function is currently disabled. > > On Feb 15, 12:45 pm, Dmitri Zagidulin wrote: > > > I've started seeing the followi

[web2py] Re: Duplicate session keys / uuids

2010-02-15 Thread Dmitri Zagidulin
simo > > On Feb 10, 2:51 pm, Dmitri Zagidulin wrote: > > > More details. > > > The session bleed issue is happening because of a code change (not a > > random environment leak). We've replicated it twice -- applied the 2 > > code changes (described below), im

[web2py] Sessions table warning for column 'locked'

2010-02-15 Thread Dmitri Zagidulin
I've started seeing the following warning on the logging console: /gluon/sql.py:739: Warning: Out of range value adjusted for column 'locked' at row 1 self._execute = lambda *a, **b: self._cursor.execute(*a, **b) I'm assuming it's related to the sessions table (since I'm keeping my sessions in

[web2py] Re: Duplicate session keys / uuids

2010-02-10 Thread Dmitri Zagidulin
ow could this be? Why would changing the browser cache-control headers, or redirecting to an http url instead of https, cause one user to get another user's session (and see the other user's account, etc)? On Feb 10, 10:50 am, Dmitri Zagidulin wrote: > Sure. > So, this is th

[web2py] Re: Duplicate session keys / uuids

2010-02-10 Thread Dmitri Zagidulin
tails about the setup? The amount of traffic and > the problem you encountered? > > In web2py all sessions are uuid and the probablility that two uuid are > the same is null (unless these machine are one clone of the others in > which case I am not sure how the python uuid depends

[web2py] Re: Multi user development on web2py

2010-02-09 Thread Dmitri Zagidulin
%s'%svnrev) > except: >     response.subtitle = T('Interface Prototype') > > Updating the app into a running web2py instance seems to be no > problem.  The only time we have to stop a server is to update the > web2py version.  So far the 'unzip on top of the

[web2py] RESOLVED Re: Blank page with 'Done' error

2010-02-09 Thread Dmitri Zagidulin
ers was not web page text, but the IE/Firefox status bar on the bottom, the usual 'Done' message when a page is done loading. On Feb 5, 4:16 pm, Dmitri Zagidulin wrote: > Ah, just got reports of 2 users who have encountered this on Firefox. > > Will investigate for more det

[web2py] Re: Login mutliple times?

2010-02-09 Thread Dmitri Zagidulin
Sorry for the confusion. Web2py stores session data, by default, on disk, and that sounds like what you're doing. There is a way to make it store session data in a separate database, by calling session.connect(...). On Feb 9, 2:31 pm, Johann Spies wrote: > On 9 February 2010 21:14

[web2py] Re: Multi user development on web2py

2010-02-09 Thread Dmitri Zagidulin
FWIW, I do multi user development on web2py, and take the route that you describe -- not version the .table files, and do a migrate=False on all the tables in the model. This is partly because of multi developer collisions, and partly because the migrate functionality does not work for the web2py v

[web2py] Re: soaplib

2010-02-09 Thread Dmitri Zagidulin
I'm not sure about other libraries, but I'm currently using, and have had good experience with, the suds (https://fedorahosted.org/suds/ ) soap client. On Feb 9, 4:00 am, max wrote: > I am trying to generate a soap web client for a wsdl service. > With java, i can generate all the soap operations

[web2py] Re: Login mutliple times?

2010-02-09 Thread Dmitri Zagidulin
Several questions. Are you storing sessions on disk, or in a database? What's the decorator you're using, to require login? (is it @auth.requires_login()?) Is the 'user' function exposed, for those controllers? Do you have any custom routes.py or apache mod_rewrite routing that might be interferi

[web2py] Duplicate session keys / uuids

2010-02-09 Thread Dmitri Zagidulin
I've been experiencing some session bleed across accounts (several instances of users crossing over into other users' sessions, and being able to see other users' accounts). And while investigating that (by the way, has anybody else run into this?), I've noticed that the database in which I keep my

[web2py] Re: Blank page with 'Done' error

2010-02-05 Thread Dmitri Zagidulin
oad-link-fails-in-ie > > Can you try add this line to the controller? > >         del response.headers['Cache-Control'] > > Is this going over HTTPS? > > On Feb 4, 4:17 pm, Dmitri Zagidulin wrote: > > > Hi all, > > > I'm having trouble trac

[web2py] Re: Blank page with 'Done' error

2010-02-04 Thread Dmitri Zagidulin
ntroller? > >         del response.headers['Cache-Control'] > > Is this going over HTTPS? > > On Feb 4, 4:17 pm, Dmitri Zagidulin wrote: > > > Hi all, > > > I'm having trouble tracking down a particularly mysterious bug, and I > > was

[web2py] Blank page with 'Done' error

2010-02-04 Thread Dmitri Zagidulin
Hi all, I'm having trouble tracking down a particularly mysterious bug, and I was wondering if any of you have encountered something like this before. The situation is this. I have a fairly simple controller, about 125 lines of code, that displays the detail view of a record (it's linked to from

[web2py:36499] Re: Sphinx

2009-12-04 Thread Dmitri Zagidulin
Just to clarify - is the conversation here about moving the main manual (http://www.web2py.com/examples/default/docs ) to Sphinx? Or a different set of docs, auto-generated from the code comments or something like? In any case, I'd be willing to help work on it. On Nov 23, 10:28 am, mdipierro wr

[web2py:35924] Re: Using web2py with jython

2009-11-24 Thread Dmitri Zagidulin
I don't know if this'll help you, but I've recently wrestled with SOAP/ WSDL stuff on python with SOAPpy, and also ran into problems. I ended up using SUDS, and the problems went away -- it's an excellent SOAP library for python. Hopefully you can fix the jython issue in time for your demo, but if

[web2py:35696] SQLFORM.factory and date field defaults

2009-11-20 Thread Dmitri Zagidulin
I'm using a form created with SQLFORM.factory as an edit form (it saves from and loads to session). If I have a field of type 'date', the value that it saves is in the usual ISO format, a string like '2009-01-01'. But if I then try to use that saved value as the default for the field in the facto

[web2py:35645] Re: SELECT helpers and id-label tuples from the db

2009-11-19 Thread Dmitri Zagidulin
Got it, thanks! On Nov 19, 12:57 pm, mdipierro wrote: > two ways > > SELECT(OPTION('one',_value=1),OPTION('two',_value=2),value=1) > > or > > SELECT(OPTION('one',_value=1,_selected=True),OPTION('two',_value=2)) > > On Nov 19, 11

[web2py:35640] Re: SELECT helpers and id-label tuples from the db

2009-11-19 Thread Dmitri Zagidulin
> > and variations > > On Nov 19, 10:51 am, Dmitri Zagidulin wrote: > > > Ok, that makes sense, that's how I ended up doing it. I was just > > wondering if there was a short form, like with the list of strings (as > > opposed to a list of OPTION objects), but

[web2py:35634] Re: SELECT helpers and id-label tuples from the db

2009-11-19 Thread Dmitri Zagidulin
ro wrote: > yes, > > SELECT(OPTION('one',_value=1),OPTION('two',_value=2)) > > On Nov 19, 9:54 am, Dmitri Zagidulin wrote: > > > When you pass a list of strings to the SELECT helper, it creates an > > html select control, with options populated fr

[web2py:35623] SELECT helpers and id-label tuples from the db

2009-11-19 Thread Dmitri Zagidulin
When you pass a list of strings to the SELECT helper, it creates an html select control, with options populated from the list of strings, and each string is both the option's value and label. so, SELECT(['one, 'two']) yields one etc. Does SELECT provide for the other common usage scenario, wher

[web2py:35456] Re: SQLFORM.factory and edit forms

2009-11-16 Thread Dmitri Zagidulin
t and DIV.elements. > > Building on the example above, you can grab and modify all text inputs > > like this: > > > inputs = form.elements("input",type="_text") > > for inp in inputs: > >     inp['_whatever'] = session.whatever > &g

[web2py:35453] Re: SQLFORM.factory and edit forms

2009-11-16 Thread Dmitri Zagidulin
       submit_button="Next") >     if form.accepts(request.vars,session): >         session.test1 = request.vars.test1 >         session.test2 = request.vars.test2 >         redirect(URL(r=request,f='index2')) >     return dict(form=form) > > On Nov 16, 2:55 pm, Dmitri Zagidul

[web2py:35450] SQLFORM.factory and edit forms

2009-11-16 Thread Dmitri Zagidulin
The setup: I'm working on a 3-step editing wizard, so, 3 pages with a form on each page. The navigation between the pages is done via Next and Previous submit buttons. When you go from page 1 to page 2, the contents of the form on page 1 are stored in the session. All 3 pages are written to the da

[web2py:35185] Re: Connection to mysql problem

2009-11-12 Thread Dmitri Zagidulin
Ah, you were able to connect. Ignore that, then :) On Nov 12, 11:59 am, Dmitri Zagidulin wrote: > Did you set the root mysql password? Try setting it, and including the > password in the connect string. > > Did it give you any error messages? > > On Nov 11, 5:53 pm, ShoqulKutl

[web2py:35184] Re: Connection to mysql problem

2009-11-12 Thread Dmitri Zagidulin
Did you set the root mysql password? Try setting it, and including the password in the connect string. Did it give you any error messages? On Nov 11, 5:53 pm, ShoqulKutlu wrote: > Hi, > > I installed web2py Version 1.72.3 on Windows. When I started the > web2py server it found the MySql driver.

[web2py:35175] Re: Twill + Web2Py

2009-11-12 Thread Dmitri Zagidulin
? > > > > > > > > In my search for answers I happened across this link. > > > >http://blog.ianbicking.org/2008/03/30/python-html-parser-performance/ > > > > - David > > > > On Nov 11, 4:52 pm, Wes James wrote: > > > > > On Wed,

[web2py:35128] Re: Twill + Web2Py

2009-11-11 Thread Dmitri Zagidulin
I haven't used Twill for screen scraping or parsing, but I do use it extensively for functional testing (and unit testing, actually) of web2py apps. But for scraping, I could see how you could use Twill's python API to go to a page, login, and call show() to get back the html for a page (which yo

[web2py:32911] Re: Eclipse, json and reaching breaking point

2009-10-14 Thread Dmitri Zagidulin
I likewise find the Eclipse python debugger to be invaluable. Quick question -- are you starting the dev_appserver from within Eclipse? On Tue, Oct 13, 2009 at 5:47 PM, Carl wrote: > > hi, > > I'm using XP, Eclipse, Web2py/json/pyjs and running dev_appserver > > When I place breakpoints on code

[web2py:32889] Re: web2py saves space to mssql during registration process

2009-10-14 Thread Dmitri Zagidulin
This same issue happens to me, too -- when reading in a field in the database that contains an empty string, the Linux/pyodbc/MSSQL stack reads it as a single space. I suspect it's a similar issue to that which is mentioned in http://pymssql.sourceforge.net/limitations.php (Search for SELECT ''"

[web2py:32887] Re: Unit testing Auth functions

2009-10-14 Thread Dmitri Zagidulin
The key you're missing there is instantiating the environment. Instead of self.controller.user('register'), you need to do something like: self.controller = env('myapp', True, c='default', f='myfunction') and then you can do assertions on the various objects bound to the controller (request, res

[web2py:32313] Re: URLs in static files

2009-10-06 Thread Dmitri Zagidulin
Put your css and javascript into the applications/myapp/static folder. And in the view, call them like: (static being the folder, base.css being the name of the file, etc). If you have subfolders in static, such as one for images and one for javascript, you would do: And so on. On Tue, Oct 6

[web2py:32270] Re: Unit Testing Controllers with auth.requires_login

2009-10-05 Thread Dmitri Zagidulin
cannot avoid is listing in controllers the > functions that you want to expose. This is unavoidable because by > forcing you to code this we try prevent you from having two > controllers expose the same functionality and we prevent hidden > controller actions (expose functions by mi

[web2py:32268] Re: Unit Testing Controllers with auth.requires_login

2009-10-05 Thread Dmitri Zagidulin
Actually, my main question is simply - how does one use/instantiate Model code from external files? (Like, if I want to do outsource some business logic to a module, so that several controllers can reuse it?) --~--~-~--~~~---~--~~ You received this message because y

[web2py:32238] Unit Testing Controllers with auth.requires_login

2009-10-05 Thread Dmitri Zagidulin
The article on Unit Test Controllers using unittest (http://www.web2py.com/AlterEgo/default/show/213 ) gives some examples on how to unit-test web2py controllers. However, how do I test controller functions that are decorated with auth.requires_login()? When I tried running a test similar to tha

[web2py:32053] Re: MSSQL connection string port and driver workaround

2009-10-01 Thread Dmitri Zagidulin
Patch is attached. Thanks! > On Wed, Sep 30, 2009 at 5:51 PM, mdipierro wrote: >> >> Yes. If you send me a patch to do this I will take it. >> Thank you for reporting the issue. >> >> On Sep 30, 2:38 pm, Dmitri Zagidulin wrote: >>> I have a web2py

[web2py:32025] Re: Functions decorated with auth.requires_login seem to lose vars

2009-10-01 Thread Dmitri Zagidulin
Ok! Thanks. If I run up against this limitation, I'll send in a patch. On Thu, Oct 1, 2009 at 12:16 PM, mdipierro wrote: > > > > On Oct 1, 11:04 am, Dmitri Zagidulin wrote: >> Ahh, ok! Makes sense now. >> I think I misunderstood the tutorial, and thought that you

[web2py:32020] Re: Functions decorated with auth.requires_login seem to lose vars

2009-10-01 Thread Dmitri Zagidulin
and that is > according to the specs, since request.vars are necessary to handle the > login form after redirection. > > The issue is you should not call auth() inside a function that > requires_login because they conflict. Perhaps if you explain us what > you are trying to ac

[web2py:32010] Re: Functions decorated with auth.requires_login seem to lose vars

2009-10-01 Thread Dmitri Zagidulin
logged in and > visitedhttp:///test1?hello=worldhttp:///test2?hello=world > > They both show > > {'hello': 'world'} > > If this does not work for you then there is a major problem but it is > not in auth.requires_login(). Please tell us more about the O

[web2py:31964] Re: MSSQL connection string port and driver workaround

2009-09-30 Thread Dmitri Zagidulin
Sure, will do! On Wed, Sep 30, 2009 at 5:51 PM, mdipierro wrote: > > Yes. If you send me a patch to do this I will take it. > Thank you for reporting the issue. > > On Sep 30, 2:38 pm, Dmitri Zagidulin wrote: >> I have a web2py app (running on Ubuntu Linux) that has to c

[web2py:31953] Re: Functions decorated with auth.requires_login seem to lose vars

2009-09-30 Thread Dmitri Zagidulin
login (in > this case vars are lost, args are not), but if you are logged in the > function works normally and the vars are in request.vars. > > On Sep 30, 2:28 pm, Dmitri Zagidulin wrote: > > > It looks like functions that are decorated with auth.requires_login() > > ar

[web2py:31949] MSSQL connection string port and driver workaround

2009-09-30 Thread Dmitri Zagidulin
I have a web2py app (running on Ubuntu Linux) that has to connect to a MS SQL Server. I installed pyodbc, and the FreeTDS ODBC driver. I defined a driver in odbcinst.ini, etc, etc. And could now connect from the command line, via isql, to the remote database. In web2py, the following connection s

[web2py:31950] Functions decorated with auth.requires_login seem to lose vars

2009-09-30 Thread Dmitri Zagidulin
It looks like functions that are decorated with auth.requires_login() are not receiving their request.vars dictionary from the url. For example, say I have an auth-protected function in a controller: @auth.requires_login() def index(): """ Login-protected index page """ response.