[web2py] Best way to use mongoDB inside web2py?

2010-07-12 Thread Dan
Hi, first of all I have to say that web2py is the most easy to learn and understand python framework. Its all very intuitive and logical. Thanks a lot for that great piece of software! I'm trying to use web2py with my existing mongoDB setup. I have read that the DAL rewrite for noSQL databases st

[web2py:24221] query using IN list on GAE?

2009-06-15 Thread Dan
py docs, I tried two different approaches, and neither of them worked. Please let me know what I can do to fix it. Thanks! Dan FIRST ATTEMPT: personlist = ['Ralph','Henry','Sue'] personresultsqry = db.person.name.belongs(personlist) personresults = db(

[web2py:24225] Re: query using IN list on GAE?

2009-06-15 Thread Dan
ssimo > > On Jun 15, 11:45 am, Dan wrote: > > > What is the proper way to run a query on Google App Engine that uses > > an IN clause? > > > I want to do something like this (in traditional SQL) > > SELECT person.name, person.age > > FROM person > &

[web2py:24237] Re: query using IN list on GAE?

2009-06-15 Thread Dan
is it possible to create a GQL format query and send it to the GAE datastore that web2py connects to? what would the code for that be? On Jun 15, 10:25 am, Dan wrote: > the IN operator is supported according > tohttp://code.google.com/appengine/docs/python/datastore/queriesandinde... &

[web2py:24260] Re: query using IN list on GAE?

2009-06-15 Thread Dan
that works great! note that I didn't try to send more than 30 items - so I don't know what would happen if that limit were exceeded. thanks Massimo! Dan On Jun 15, 1:38 pm, mdipierro wrote: > I have not tested/debugged it yet but you can try the latest trunk > > db(db.tabl

[web2py:24266] Re: query using IN list on GAE?

2009-06-15 Thread Dan
e must be integer' SyntaxError: id value must be integer On Jun 15, 3:20 pm, Dan wrote: > that works great! note that I didn't try to send more than 30 items - > so I don't know what would happen if that limit were exceeded. > > thanks Massimo! > > Dan > > O

[web2py:24268] Re: query using IN list on GAE?

2009-06-15 Thread Dan
t; query for each of the elements that I want to include in an "IN" condition. Not efficient, but it should work. Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group.

[web2py:24295] Re: query using IN list on GAE?

2009-06-16 Thread Dan
> > > You cannot do 'id IN' because GAE treats ID in a spacial way. Please > > > try a different field. > > I can run a separate "=" query for each of the elements that I want to > > include in an "IN" condition. Not efficient, but it should work. > Can you show me an example of how you do it?

[web2py:24503] new GAE task queue API

2009-06-19 Thread Dan
imple matter of importing the task queue module into the web2py controller code? http://code.google.com/appengine/docs/python/taskqueue/ Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework&

[web2py:24511] Re: new GAE task queue API

2009-06-19 Thread Dan
On Jun 19, 11:21 am, Fran wrote: > On 19 June, 17:29, Dan wrote: > > > Yesterday the GAE team released a new version of their SDK with > > support for a task queue API. I'd like to use this in my web2py app. > > Can you recommend how I should proceed? Is it approp

[web2py:24724] Re: How to simulate a JOIN in Google App Engine ?

2009-06-22 Thread Dan
Here's a suggestion - there might be better ways to get where you want to go, of course. This tries to minimize the changes to your existing code. Since you can't work with more than one table at a time with GAE, you could change your GAE 'cats' query to work with only one table, then perform a l

[web2py:24726] Re: How to simulate a JOIN in Google App Engine ?

2009-06-22 Thread Dan
ations and increased storage requirements. On Jun 22, 11:26 am, Dan wrote: > Here's a suggestion - there might be better ways to get where you want > to go, of course. This tries to minimize the changes to your existing > code. > > Since you can't work with more than one table at

[web2py:24931] verify updated email address?

2009-06-24 Thread Dan
already gone through the registration process, the act of changing an email address doesn't seem to trigger the verification. thanks Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework&

[web2py:25254] how to test a controller's sub-functions?

2009-06-29 Thread Dan
I'd like to create some tests for functions that exist within a controller using web2py's (very convenient) doctest integration. Is this possible? For example, here is a controller with a subfunction and one test defined for the controller and another defined for the function within the controlle

[web2py:25276] Re: how to test a controller's sub-functions?

2009-06-29 Thread Dan
unction(3,4) 99 """ return a + b return 5 * inner_function(3,4) On Jun 29, 11:58 am, Hans Donner wrote: > place the doctest for inner function in the docstring for > innerfunction. now its called before the functions is defined... > >

[web2py:25284] Re: how to test a controller's sub-functions?

2009-06-29 Thread Dan
> called. It cannot be tested this way. It may depend for example on > variables that are defined at runtime in the outer function. > > Massimo > > On Jun 29, 3:01 pm, Dan wrote: > > > That's a good suggestion, Hans. Unfortunately, when I tried it I get > >

[web2py:25298] datetime's sub-second information lost in SQLite/GAE

2009-06-29 Thread Dan
I'm using a datetime field with SQLite and GAE (different systems for development and deployment), and I can only get time resolution of 1 second when reading from the database. I know that I am working with information down to the 0.01 second resolution, and this is what I'm inserting into the da

[web2py:25302] Re: datetime's sub-second information lost in SQLite/GAE

2009-06-29 Thread Dan
Here is some sample code to produce the behavior I'm trying to describe. Note that in the controller, there are 2 lines commented out because they return an error ("TypeError: unsupported operand type(s) for -: 'str' and 'str'") db.define_table('timetest', db.Field('starttime','datetime',defa

[web2py:25303] Re: datetime's sub-second information lost in SQLite/GAE

2009-06-29 Thread Dan
appears in the files /gluon/tools.py and / gluon/contrib/simplejson/encoder.py) Dan On Jun 29, 6:36 pm, Dan wrote: > Here is some sample code to produce the behavior I'm trying to > describe. Note that in the controller, there are 2 lines commented out > because they return an err

[web2py:25312] Re: datetime's sub-second information lost in SQLite/GAE

2009-06-30 Thread Dan
objects support a %f format code which expands to the number of microseconds in the object, zero- padded on the left to six places." (http://docs.python.org/library/ datetime.html) For python2.5, it's possible to use the datetime's microsecond attribute to get the information. Dan For

[web2py:25326] Re: datetime's sub-second information lost in SQLite/GAE

2009-06-30 Thread Dan
OK, to avoid altering the gluon code, I'll change the model to use a long int to represent epoch-milliseconds On Jun 30, 7:03 am, mdipierro wrote: > I am afraid including microsecods will break the datepicker calendar. > > On Jun 30, 2:13 am, Dan wrote: > > > Thanks for

[web2py:25340] Re: datetime's sub-second information lost in SQLite/GAE

2009-06-30 Thread Dan
QLite db.define_table('timetest', db.Field('starttime','datetime',default=request.now), db.Field('endtime','datetime',default=request.now), db.Field ('starttime_micro',datetime_microseconds,default=request.now), #

[web2py:25451] Re: web2py 1.65.0 is out

2009-07-01 Thread Dan
> new auth.settings.create_user_groups good! > tickets stored on datastore on GAE and also logged, (Hans and Alexey) great! This is something that will help me a lot. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

[web2py:26300] using web2py in custom modules

2009-07-11 Thread Dan
cache.ram=cache.disk=MemcacheClient(request) error: name 'request' is not defined Another way to put it is that I'm building an abstraction layer on top of web2py's DAL so that I can reuse my code. Is this possible? Or maybe a bad idea? Dan --~--~-~--~~~

[web2py:26345] Re: using web2py in custom modules

2009-07-12 Thread Dan
gt; All the other web2py keywords can be imported from your modules as > needed. > > Massimo > > On Jul 11, 5:48 pm, Dan wrote: > > > Hello- > > I want to re-use some data access routines in a few different > > controller files, so I would like to put them in a separ

[web2py:26377] Re: using web2py in custom modules

2009-07-12 Thread Dan
ect -- because it is not contained in a function, so I don't know how to pass the request object to the module - is that possible? Or is there another way to determine if it's running on GAE? Dan On Jul 12, 8:42 am, mdipierro wrote: > You can one one import statement at the top of

[web2py:26389] Re: using web2py in custom modules

2009-07-12 Thread Dan
py (running on SQLite) and GAE environments? If so, how would I import the necessary libraries to get this to work? Dan On Jul 12, 7:24 pm, mdipierro wrote: > You can determine if it running on gae from > > request.env.web2py_runtime_gae > > You do not need any conditional import, perhaps I

[web2py:26429] Re: using web2py in custom modules

2009-07-13 Thread Dan
Thanks Massimo, now I understand! Your suggestion worked for me. Dan On Jul 12, 11:48 pm, mdipierro wrote: > Yes and no. > > the mechanism of importing modules (in python and in any other > language) allows to get stuff out of the module (functions, variables) > but not in the

[web2py:26666] clear select() cache on GAE?

2009-07-16 Thread Dan
Hello- I saw this thread which discusses ways to clear a cached select () result on non-GAE platforms. Is there a way to use the cache.clear (regex=??) command to remove the results of a known datastore query that works on GAE too? Dan --~--~-~--~~~---~--~~ You

[web2py:26678] Re: clear select() cache on GAE?

2009-07-16 Thread Dan
mdipierro wrote: > yes > > cache.ram.clear(regex="") > > On 16 Lug, 13:16, Dan wrote: > > > Hello- I saw this thread which discusses ways to clear a cached select > > () result on non-GAE platforms. Is there a way to use the cache.clear > > (rege

[web2py:26682] Re: clear select() cache on GAE?

2009-07-16 Thread Dan
lear(regex="....") > > > On 16 Lug, 13:16, Dan wrote: > > > > Hello- I saw this thread which discusses ways to clear a cached select > > > () result on non-GAE platforms. Is there a way to use the cache.clear > > > (regex=??) command to remove t

[web2py:26705] Re: clear select() cache on GAE?

2009-07-16 Thread Dan
uot;).select(cache=(self.cache.ram, > 3600)).as_list(),5000) > > and clear it with > > cache.memcache.delete('myrecords') ### memcache only syntax > > Anyway, I am skeptical you get any speed up out of all this. > > Massimo > > On Jul 16, 6:28 pm, Dan wr

[web2py:26711] how to simplify web2py URLs in GAE?

2009-07-16 Thread Dan
sier to remember and to be friendlier to search engine classification methods. thanks Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email t

[web2py:26717] Re: how to simplify web2py URLs in GAE?

2009-07-16 Thread Dan
eate a file web2py/routes.py and write in it: > > routes_in=('/(?P.*)',('/myapplicationname/mycontrollername/$a'),) > routes_out=('/myapplicationname/mycontrollername/(?P.*)',('/$a'),) > > On Jul 16, 10:16 pm, Dan wrote: > > > Is

[web2py:26720] Re: how to simplify web2py URLs in GAE?

2009-07-16 Thread Dan
ame/$a'),) > routes_out=(('/myapplicationname/mycontrollername/(?P.*)',('/ > $a'),) > > On Jul 16, 10:35 pm, Dan wrote: > > > When restarting web2py with those 2 lines in routes.py, I'm getting > > this error: > > > File ".../web2py-v

[web2py:26767] problem when using an SQLFORM to approve user registration

2009-07-17 Thread Dan
I want to be able to approve user registrations using the web (because I'm running on GAE), and would like to build a set of forms for administrators to set up group memberships. As a first step, I've got a list of users that are pending approval, and I will need to clear the value of the registra

[web2py:26808] Re: problem when using an SQLFORM to approve user registration

2009-07-18 Thread Dan
cepts? Does it change anything? > > Massimo > > On Jul 17, 5:45 pm, Dan wrote: > > > I want to be able to approve user registrations using the web (because > > I'm running on GAE), and would like to build a set of forms for > > administrators to set up group memb

[web2py:26880] why would response.write() insert "None" into output?

2009-07-18 Thread Dan
shed some light on this behavior? I'm stumped. And I'm not sure how to trace the code execution through the generation of the view code, either... btw, I'm running 1.65.0 thanks! Dan --~--~-~--~~~---~--~~ You received this message because you are subscr

[web2py:26884] Re: why would response.write() insert "None" into output?

2009-07-19 Thread Dan
wonderful! thanks, Massimo On Jul 18, 11:53 pm, mdipierro wrote: > On Jul 19, 1:32 am, Dan wrote: > > > I'm putting together a quick routine to assemble a horizontal menu bar > > in my layout.html file (does one already exist? I only saw the one > > called ME

[web2py:27087] How to avoid updating one of the record's fields?

2009-07-21 Thread Dan
") if original_is_not_empty_object: form.table['password'].requires.append (original_is_not_empty_object) request.vars.clear() elif form.errors: response.flash=T("Oops, form is invalid.") I'm running on GAE, btw - would that handle record

[web2py:27095] Re: How to avoid updating one of the record's fields?

2009-07-21 Thread Dan
form. I'd be interested to know if there is an easier/better way to do this. On Jul 21, 1:22 pm, Dan wrote: > I'm working on a form to let the site administrator edit everything > that's part of a user's record in the auth.user table. I want to be > able to edi

[web2py:27127] revision 994 broke authentication for wget clients

2009-07-22 Thread Dan
ings on my end to work with the changes. Hopefully there is not a conflicting objective that requires it to act this way. Thanks Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To

[web2py:27129] Re: revision 994 broke authentication for wget clients

2009-07-22 Thread Dan
Thanks very much! That fixes it. (I'll try to think harder about this stuff next time...) On Jul 22, 12:26 am, Fran wrote: > On Jul 22, 8:24 am, Dan wrote: > > > I just upgraded from v1.65.0 to v1.65.5 today and noticed that I could > > no longer log in to one of my c

[web2py:27130] Re: How to avoid updating one of the record's fields?

2009-07-22 Thread Dan
Yes indeed! Thanks! On Jul 21, 3:24 pm, mdipierro wrote: > This was fixed in 1.65.5 > > On Jul 21, 5:02 pm, Dan wrote: > > > Followup: I got it to work by using the onvalidation parameter in the > > form.accepts() function. > > When there is a blank passwor

[web2py:27170] text fields not working up in GAE production env

2009-07-22 Thread Dan
ction environment, the text fields do not exist - it's as if they aren't in my model at all. Has anyone seen this before? Any suggestions for how to troubleshoot it? I'm running web2py v1.65.5 Dan --~--~-~--~~~---~--~~ You received this message because y

[web2py:27171] Re: text fields not working up in GAE production env

2009-07-22 Thread Dan
why? http://appengine.google.com/datastore/explorer On Jul 22, 12:20 pm, Dan wrote: > I'm using web2py to develop an application for deployment on GAE. My > data model has some text fields in it, eg in the auth_group table. > These fields show up fine when the app is running

[web2py:27192] small nit with auth function name: retrieve_password()

2009-07-22 Thread Dan
It looks like this function performs a password reset, not a retrieval. Should it be renamed? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegro

[web2py:27463] Re: Web2py development at a standstill

2009-07-27 Thread Dan
Hi - I don't have the answer to your problem, but I can tell you that I'm running web2py's server with a non-root user (just my own regular user login) on ubuntu 9.04. I also run winpdb as the same user, and can attach and step through the web2py code with that. So it should be possible for you, t

[web2py:27464] Help importing module (google chart wrapper)

2009-07-27 Thread Dan
ot;, line 1, in from GChartWrapper.GChart import * ImportError: No module named GChartWrapper.GChart Is there a proper way to import this kind of library? Or do I need to make changes to the library's __init__.py file and other files? thanks, Dan --~--~-~--~~~

[web2py:27466] Re: components in views

2009-07-27 Thread Dan
sounds like you could use the response.vars dictionary to pass the information you need. For instance, your controller could have this line: response.vars.piechartcomponentdata = [2,3,4,7,8,9] and then your view could have this: {{if piechartcomponentdata in response.vars:}} {{... draw your co

[web2py:27467] Re: Help importing module (google chart wrapper)

2009-07-27 Thread Dan
Is the appropriate solution to put the library code in web2py/ and use this import statement? from GChartWrapper import * that seems to work, but I'd prefer to have the library in web2py/ applications/myapp/modules/ On Jul 27, 12:24 pm, Dan wrote: > Hello- > I'd like to use so

[web2py:27470] Re: Help importing module (google chart wrapper)

2009-07-27 Thread Dan
Thanks Yarko, but that gives me the same error as before. On Jul 27, 2:14 pm, Yarko Tymciurak wrote: > On Mon, Jul 27, 2009 at 3:40 PM, Dan wrote: > > > Is the appropriate solution to put the library code in web2py/ and use > > this import statement? > > from GChartWra

[web2py:27473] Re: Help importing module (google chart wrapper)

2009-07-27 Thread Dan
h, or > > - install it in the python path as a normal python module. > > > Even if you are on a hosting service, you should be able to do local > > installs of modules. > > > On Mon, Jul 27, 2009 at 4:56 PM, Dan wrote: > > >> Thanks Yarko, but that gives me

[web2py:27921] Re: problem with web2py, gae, and taskqueue

2009-08-03 Thread Dan
Hi David- Yes, I'm using GAE's taskqueue with web2py, and it works in both the dev and production environments. Note that in the dev environment, the tasks do not run automatically - you will need to manually trigger them using the http://localhost:8080/_ah/admin web console. I wasn't able to get

[web2py:28041] Re: problem with web2py, gae, and taskqueue

2009-08-05 Thread Dan
done. http://www.web2py.com/AlterEgo/default/show/247 On Aug 3, 10:19 pm, mdipierro wrote: > Dan, > > can you post an AlterEgo entry about this? It would be useful to other > users. Email me if you need the edit code. > > Massimo > > On Aug 4, 12:03 am, Dan wrote: >

[web2py:37184] how to use GAE remote api?

2009-12-14 Thread Dan
both result in this message: ImportError: No module named models.db What is the proper command? Do I need to create any __init__.py files to make it work? Do I need to import some web2py modules first (or instead)? thanks Dan -- You received this message because you are subscribed to the Google Grou

[web2py:37427] Re: how to use GAE remote api?

2009-12-16 Thread Dan
the __init__.py files > > On Dec 15, 8:45 am, Richard wrote: > > > > > try adding your application directory to sys.path > > > On Dec 15, 5:35 am, Dan wrote: > > > > I need to do some bulk operations (eg delete) on data in the GAE > > >

[web2py:22513] Using GAE's ReferenceProperty in web2py

2009-05-23 Thread Dan
xamples to review would be very helpful. Thanks Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe f

[web2py:22777] minor tweaks to get CSV and JSON output working

2009-05-27 Thread Dan
now? Also I didn't find an example "generic.csv" template in the welcome app. But there is a function that looks like it's just a place holder in /gluon/serializers.py called csv() - is that something that's already being worked on? T

[web2py:22789] Re: minor tweaks to get CSV and JSON output working

2009-05-27 Thread Dan
> > Then I copied these template files from /applications/welcome/views/ > > but they do not show up in the admin/default/design/app web page for > > my app: > > generic.json > > generic.rss > > generic.xml > > And in fact when I tried to use the web interface to create a new > > view, it insisted

[web2py:22841] sending info to form using URL

2009-05-28 Thread Dan
behavior where the information is put into the request.var dict, but then I can't seem to get a call to form.accepts(request.vars) to validate it so that I can then act on the data. Am I missing something? thanks Dan --~--~-~--~~~---~--~~ You received this mess

[web2py:22860] Re: sending info to form using URL

2009-05-28 Thread Dan
On May 28, 6:41 pm, mdipierro wrote: > Hi Dan, > The information is passed from request.vars to form.vars only if the > form processing it has INPUT fields receiving it. How does your form > look like? This is my code defining the form: form=FORM(TABLE( TR("Type

[web2py:22898] Re: sending info to form using URL

2009-05-29 Thread Dan
t; else: response.flash="please fill the form" return dict (form=form,form_vars=form.vars,request_vars=request.vars) So the issues that I'm trying to understand and fix: 1) when trying to receive info using form when URL params present, what does the error involvin

[web2py:22914] Re: sending info to form using URL

2009-05-29 Thread Dan
PUT > (_type="text",_name="email",_value=request.vars.email or > '',requires=IS_EMAIL())), >                     TR("Admin",INPUT(_type="checkbox",_name="admin")), >                     TR("Sure?",SELECT > (&#

[web2py:22927] Re: Authentication for services

2009-05-29 Thread Dan
(form.vars) Is there a place where I can find out more about what already exists, or how to go about getting something like what the original message in this thread described? Dan On May 17, 8:22 pm, mdipierro wrote: > I need to look into this. I do not think there can be a generic > appr

[web2py:22942] Re: Can I create an 'assotiated' input field?

2009-05-30 Thread Dan
st of this text encoding method) and precision are inferior to those of a double. Maybe there are better storage formats and the precision is a adjustable? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web

[web2py:22945] Re: Can I create an 'assotiated' input field?

2009-05-30 Thread Dan
and the representation in the SQLite database is: datetime.datetime(2009, 5, 30, 15, 2, 9, 123456) Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send

[web2py:23006] Re: Authentication for services

2009-05-31 Thread Dan
: I don't fully understand what the purpose of the "formname" parameter is, or why it was necessary to None-ify it. If someone can explain this to me, I'd appreciate it. Dan On May 29, 6:15 pm, Dan wrote: > Reviving this thread from before... I would like to have a shell > scrip

[web2py:23030] Re: Authentication for services

2009-06-01 Thread Dan
> In the latter case username and password have to be encoded by > urllib.quote() > > works for services too. > > Massimo > > On May 31, 10:43 pm, Dan wrote: > > > Since my last message on this thread, I came up with a patch to the > > Auth.login() code that le

[web2py:23047] Re: Authentication for services

2009-06-01 Thread Dan
t; and the curl equivalent of this didn't work for me either. curl http://username=passw...@127.0.0.1:8000/app/default/index it responds with only one line: You are being redirected here On Jun 1, 8:15 am, mdipierro wrote: > Try > > wget http://username:passw...@127.0.0.1:8000/app

[web2py:23050] Re: Authentication for services

2009-06-01 Thread Dan
Success! Adding the "--auth-no-challenge" parameter to the wget command is necessary wget --auth-no-challenge --user=[username] --password=[password] http://127.0.0.1:8000/app/default thanks for your patience, and for making the change to the code. Dan On Jun 1, 10:23 am, Dan wro

[web2py:23072] requiring auth memberships to be unique

2009-06-01 Thread Dan
membership.group_id==request.vars.group_id)), '%s.id'%auth.settings.table_membership) I am still able to add duplicate rows to the auth_membership table without any errors. Dan --~--~-~--~~~---~--~~ You received this message because you a

[web2py:23134] why does crud update interface hide the readable/writable=False fields?

2009-06-02 Thread Dan
7.0.0.1:8080/init/default/data/read/auth_user/37 http://127.0.0.1:8080/init/default/data/update/auth_user/37 How can I get access to view and edit these fields? Do I need to make my own crud form? Dan --~--~-~--~~~---~--~~ You received this message because you

[web2py:23137] Re: why does crud update interface hide the readable/writable=False fields?

2009-06-02 Thread Dan
On Jun 2, 10:55 am, annet.verm...@gmail.com wrote: > Dan, > > Removing the readable=False and writable=False from your model to a > custom controller from which you call update on the crud object should > solve the problem. For example: > > @auth.requires_member

[web2py:23138] strange behavior with boolean default

2009-06-02 Thread Dan
Is there a way to set the default value of a boolean field? Running this quick test suggests to me that there is not, or at least I can't figure out how to do it. Here's the example model: db.define_table('snacks', db.Field('name','string', requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'sn

[web2py:23150] Re: why does crud update interface hide the readable/writable=False fields?

2009-06-02 Thread Dan
Massimo- Thanks! That fixed it. Dan On Jun 2, 1:21 pm, mdipierro wrote: > You can use > > form=SQLFORM(db.table,record_id,ignore_rw=True) > if form.accepts(request.vars, session): >     # do something > return dict(form=form) > > On Jun 2, 12:28 pm, Dan wrote: > >

[web2py] How to setup plugin_wiki?

2010-11-17 Thread Dan
Hi, I just downloaded web2py and added the plugin_wiki plugin. But I don't find any documentation on how to use this plugin. I saw the video on vimeo but the plugin does not add a new node to the main menu. If I'm calling the plugin in the url I'm getting an error: Not authorized ACCESS DENIED. Th

[web2py] plugin_wiki won't set active flag in response.menu?

2010-11-17 Thread Dan
Just tried to build my onw menu based on the pages from plugin_wiki but every active flag in response.menu is set to false. Is there any onther way to determine if a wiki page is active?

[web2py] Re: How to setup plugin_wiki?

2010-11-17 Thread Dan
wrote: > http://www.web2py.com/book/default/chapter/13 > > On Nov 17, 2:03 pm, Dan wrote: > > > Hi, I just downloaded web2py and added the plugin_wiki plugin. But I > > don't find any documentation on how to use this plugin. I saw the > > video on vimeo but the pl

[web2py] Wizard generated 100 random users after each registrtion?

2010-11-21 Thread Dan
Hi, why is the new wizard generating 100 random users after someone registers a new user account? How can I disable the "feature"? Some sample data: 1 PatacoceSomadadumacet...@exam... 2010-11-21 12:21:08 2010-11-21 12:21:08197 diagram. ...

[web2py] Re: Wizard generated 100 random users after each registrtion?

2010-11-21 Thread Dan
I found out that the random users come from: db_wizard_populate.py -- from gluon.contrib.populate import populate if not db(db.auth_user).count(): populate(db.auth_user,100) Why is that needed? On 21 Nov., 13:11, Dan wrote: > Hi, > > why is the new wizard g

[web2py] How to render LaTeX templates?

2010-11-25 Thread Dan
Hi, is there any way to render a template that is a LaTeX document? I have tryed but getting a parse error if the parser finds something like: \setkomavar{fromname}{{{=data.get('from_name')}}} So I guess, web2py can't handle three curly brackets in a template. Is there any way to avoid this? T

[web2py] How to call a function in an other controller?

2010-11-30 Thread Dan
Hi, is there any way to execute a function in an other controller? controller1.py func(): do something controller2.py func(): do something else call func() of controller1.py do some more things return I don't want to redirect the user.

[web2py] SSLError: The read operation timed out on file upload?

2010-12-19 Thread Dan
Hi, I'm using web2py with the Rocket webserver over SSL. Every now and than I'm getting this error message when I'm uploading a file. If I'm trying to upload the same file some seconds later everything is working. Any hints on that strange error? Should I migrate to lighttp? Error traceback Tra

[web2py] Re: SSLError: The read operation timed out on file upload?

2010-12-20 Thread Dan
n Dec 20, 9:12 am, mdipierro wrote: > Is this with the most recent version or also with the previous > version. > > What os? > > massimo > > On Dec 20, 12:46 am, Dan wrote: > > > > > Hi, > > > I'm using web2py with the Rocket webserver over SSL.

[web2py] Re: SSLError: The read operation timed out on file upload?

2010-12-20 Thread Dan
...this file is empty? On Dec 20, 3:30 pm, mdipierro wrote: > it is in the file web2py/VERSION > > On Dec 20, 7:35 am, Dan wrote: > > > > > Hi Massimo, > > > thanks a lot for your reply. > > > I can't find the current installed version nummer. M

[web2py] Re: SSLError: The read operation timed out on file upload?

2010-12-20 Thread Dan
out On Dec 20, 6:31 pm, mdipierro wrote: > Something very bad happened. That file comes with web2py and is never > overwritten. It should contain the version. > > My advice is backup everything, upgrade to 1.90.6 (posted now), check > if you can reproduce the error. > > Mas

[web2py] Re: SSLError: The read operation timed out on file upload?

2010-12-20 Thread Dan
Yes. On Dec 21, 12:59 am, mdipierro wrote: > are you going over ssl and using the python ssl? > > On Dec 20, 5:35 pm, Dan wrote: > > > > > I have updated to the latest version but I'm still getting the error. > > I think the error has nothing to do with web2p

[web2py] Re: Conditional deletes (ondelete etc) in sqlform.grid

2013-04-14 Thread Dan
Mark Kirkwood writes: > > > I've worked around this by tackling the issue a different way: > - disable the delete button on the grid altogether with > deletable=False > - selectively enable it in edit mode for records that are > safe/appropriate to delete How did you do tha

[web2py] How to achieve more info from AD/LDAP auth and add those info into DB?

2011-12-21 Thread Dan
Hi all, I'm a newbie on web2py. I'm using web2py 1.99.4 and successfully used auth_ldap to pass the authentication, and after that I want to create AD user's info (DisplayName, Email, etc)into the database in db.py. But It seems that I only got the db.auth_user.name, others like "db.auth_user.ema

[web2py] Re: How to achieve more info from AD/LDAP auth and add those info into DB?

2011-12-21 Thread Dan
x27;dan.x...@mycompany.com'], 'displayName': ['.Dan'], 'sAMAccountName': ['MyADName']} But still can not pass those above info into DB.py or default.py. On Dec 22, 12:15 pm, Massimo Di Pierro wrote: > Not yet. If you are available to help testing w

[web2py] How to use SELECT Tag (HTML HELP) to print out a list

2011-12-28 Thread Dan
Hi everyone, Happy holidays first. How do I use the the Web2Python HTML Helper "=SELECT" Tag to print out a select with all contents in a list. like following one {{for i in ['a','b','c']:}} {{=i}} {{pass}} Many thanks.

[web2py] Re: How to use SELECT Tag (HTML HELP) to print out a list

2011-12-28 Thread Dan
Gotcha, thanks a lot. On Dec 29, 2:55 pm, Bruno Rocha wrote: > *SELECT(*[OPTION(i) for i in ['a', 'b', 'c']])* > > On Thu, Dec 29, 2011 at 4:52 AM, Dan wrote: > > > > {{for i in ['a','b','c']:}} > > {{=i}} > > {{pass}} > > > > -- > > Bruno Rocha > [http://rochacbruno.com.br]

[web2py] MSSQL How to access tables which not created by web2py

2012-01-17 Thread Dan
Hi all, In db.py, I successful create a connect to MSSQL and create a new table in "mydb" database like below. db.py msdb = DAL('mssql://user:passwd@sqlserver/mydb') msdb.define_table('test1',Field('firstname'),Field('surname')) Now in mydb, I got two tables "test" which already exists and "tes

[web2py] Re: MSSQL How to access tables which not created by web2py

2012-01-18 Thread Dan
Thanks a lot, Bruno. That really helps, but since my legacy DBs are too much and too complex (MSSQL Server are only readable to me), I decide to create my own connections and queries to my MSSQL Server. Thanks again. On Jan 18, 3:57 pm, Bruno Rocha wrote: > You need to map the existent table and

[web2py] Re: MSSQL How to access tables which not created by web2py

2012-01-18 Thread Dan
Cool, How can i forgot the executesql! thank you very much!!! On Jan 18, 4:19 pm, Bruno Rocha wrote: > So you can use: > > results = msdb.execute_sql("SELECT * FROM table.") > > -- > > Bruno Rocha > [http://rochacbruno.com.br]

[web2py] using radio widget can't receive the empty submit

2012-02-01 Thread Dan
Hello, I'm testing empty submit with the following two forms, one is dropdown list and the other one is the checkradio box with v1.99.4. The dropdown list with empty select can successfully submit and got the expected responses. But using checkradio widget, empty submit doesn't work and no resp

[web2py] Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Dan
Hi, I'm using the lates Version of Web2py and getting a invalid request if I'm using any special chars like %21 (!) or umlauts. Web2py is running with the fcgihandler and Lighttpd. All special chars are encoded by using urllib.quote(). Please help! Thanks a lot.

[web2py] Re: Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Dan
ss args-checking and use request.raw_args > # > #routes_apps_raw=['myapp'] > #routes_apps_raw=['myapp', 'myotherapp'] > > On Wed, Feb 1, 2012 at 3:52 PM, Dan wrote: > > Hi, > > > I'm using the lates Version of Web2py and gettin

[web2py] Re: Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Dan
path (args) On Feb 1, 7:00 pm, Jonathan Lundell wrote: > On Feb 1, 2012, at 9:52 AM, Dan wrote: > > > I'm using the lates Version of Web2py and getting a invalid request if > > I'm using any special chars like %21 (!) or umlauts. Web2py is running > > with the fcg

  1   2   3   >