[web2py] menu and drop down menu

2012-05-30 Thread Annet
In a view site/menu.html I have the following code to generate a menu with drop down menus. {{for _name,_active,_link in session.site_menu:}} {{if session['%sDropdown' % _name]:}} {{=_name}} {{for _name,_active,_link in session['%sD

Re: [web2py] Help requested with jquery, bootstrap.modal and grid

2012-05-30 Thread Johann Spies
On Wednesday, 30 May 2012 19:07:06 UTC+2, pbreit wrote: > > I think opening a Bootstrap modal should be much easier: > http://twitter.github.com/bootstrap/javascript.html#modals > > > In a simple situation, yes it is easy. I know that link and have used it in a case where there is one clickable D

Re: [web2py] Re: recognizing web2py restart

2012-05-30 Thread David McKeone
Warning: I'm still new to python and web2py so this may be wacky, but... Could you make a cached method with side-effects and an infinite expiry? Since RAM would always be cleared on a restart it would theoretically only ever be run on cold start. first_time = False def first_start_check():

Re: [web2py] Re: How to does post in RESTful

2012-05-30 Thread Sanjeet Roy
Can you help me with the example of this code with user authentication by which i can get the user email which are given in web2py book :- @request.restful() def api(): response.view = 'generic.json' def GET(tablename,id): if not tablename=='person': raise HTTP(400) return

[web2py] Re: Pointing labels to input elements

2012-05-30 Thread Cédric Mayer
http://www.web2py.com/books/default/chapter/29/7#CSS-conventions should answer your request. Le mercredi 30 mai 2012 03:32:16 UTC+2, James O'Neill a écrit : > > How do I get the generated ID for an input element when using > form.custom.widget.fieldname? I need to populate the FOR attribute on t

[web2py] deploy into GAE with python27

2012-05-30 Thread Ramkrishan Bhatt
How to deploy since GAE supported 27. i am getting error too many tables, what is that ?

[web2py] Re: tutorial code: recipes modifying it without success

2012-05-30 Thread Cédric Mayer
In the above controller, you refers to the variable request.vars.category, which refers to a POST or GET variable named "category" So in your link you should have the same variable: {{=A("recipes",_href=URL('recipes',vars=dict(*category*= )))}} You then replace with a known ca

Re: [web2py] Re: How to does post in RESTful

2012-05-30 Thread Sanjeet Roy
Anthony i tried the following code it is showing method not allowed when i want to access :- @auth.requires_login() @request.restful() def get_project(): proj=[] projid=[] for row in db(db.assign.employee==auth.user.email).select(db.assign.ALL): for row1 in db(db.project.id==ro

[web2py] Re: Validator for self reference field not referring to itself

2012-05-30 Thread Cédric Mayer
1) You may have problems if you open your application in another language: Field('gender', requires= IS_IN_SET([T('Male'), T('Female')], zero=T('choose one'))), should be Field('gender', requires= IS_IN_SET([('Male',T('Male')), ('Female',T('Female'))], zero=T('choose one'))), 2) The requirement

Re: [web2py] Re: How to does post in RESTful

2012-05-30 Thread Anthony
Are you saying you want to be able to login via a curl request? For that, you'll probably have to enable basic authentication: http://web2py.com/books/default/chapter/29/9#Access-Control-and-Basic-Authentication. Once logged in, the user record should be available in auth.user. Anthony On Thu

[web2py] Re: mydomain.com/#!/ detect and redirect

2012-05-30 Thread Annet
Thank you all for your replies. Problem solved! Kind regards, Annet

Re: [web2py] Re: How to does post in RESTful

2012-05-30 Thread Sanjeet Roy
Hii Anthony I am able to POST and insert the data in to the database can you help me to get the user email who will be authenticated and i will get the data from the database which are associated with the particular user. example:- curl -u a...@gmail.com "http:127.0.0.1:8080/myapp/api/getdata/proj/

Re: [web2py] Re: recognizing web2py restart

2012-05-30 Thread Jonathan Lundell
On May 30, 2012, at 7:13 PM, Massimo Di Pierro wrote: > you can make a cron job in admin @reboot It'd have to be soft cron, yes? And it wouldn't run until after my app services its first request after restart, if I remember my soft cron logic aright. > > On Wednesday, 30 May 2012 21:10:13 UTC-5

Re: [web2py] cool new wysiwyg editor

2012-05-30 Thread Anthony
On Wednesday, May 30, 2012 5:16:56 PM UTC-4, Vasile Ermicioi wrote: > > about redactorjs > > http://redactorjs.com/download/ > > You are *free* to use Redactor for your personal or non-profit website > projects. > You can get the author's permission to use Redactor for commercial > websites by

[web2py] Re: Filter select options

2012-05-30 Thread Anthony
Note, the default IS_IN_DB validator for a reference field also sets the label argument of the validator to be the _format attribute of the referenced table (so the select will show a more descriptive field or set of fields from the referenced table rather than just the record number). If you'r

[web2py] simple pulldown list behaving like a multi-list

2012-05-30 Thread weheh
I have a field named category: db.define_table('mytab', Field('categ', db.categ, label=T('Category'), default=12, requires=IS_IN_DB(db, 'categ.id', '%(name)s', zero=None), ), I create a dynamic form for this field, whose value is submitted by ajax: form = SQLFORM.fa

Re: [web2py] replacing router.example.py or routes.example.py

2012-05-30 Thread Anthony
> > From what you are saying *router.py* shouldn't be there or is obsolete > I am using the system for the first time I was assume it was there for a > reason. > web2py does not come with a router.py file. If you have one, you (or someone else) must have put it there. Anthony

Re: [web2py] replacing router.example.py or routes.example.py

2012-05-30 Thread Anthony
> > You want to pick which router to use, and copy its example file to > routes.py. The name router.example.py is misleading in that respect, and > there's been some discussion of changing the names, but it's embedded in a > lot of documentation, so it has some inertia. > I've been lobbying to

[web2py] Re: GrooverWiki seems to be broken

2012-05-30 Thread Adi
thanks Massimo for this tip... I used the blob field to store AES encrypted Credit Card, and everything worked fine to store it but when I was reading records from the table I was getting this error: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/base64.py", li

Re: [web2py] replacing router.example.py or routes.example.py

2012-05-30 Thread Horus
understood! On Wednesday, May 30, 2012 10:13:43 PM UTC-4, Jonathan Lundell wrote: > > On May 30, 2012, at 7:08 PM, Horus wrote: > > I have attached a screenshot to show you what i am seeing. > > I started python 4 weeks ago and web2py for the last 2 so this > is completely new to me. > I downlo

Re: [web2py] Re: recognizing web2py restart

2012-05-30 Thread Jonathan Lundell
On May 30, 2012, at 7:13 PM, Massimo Di Pierro wrote: > you can make a cron job in admin @reboot I'll look at that, thanks. > > On Wednesday, 30 May 2012 21:10:13 UTC-5, Jonathan Lundell wrote: > I've got an application that uses memcached. I'd like to recognize when > web2py gets restarted (m

Re: [web2py] replacing router.example.py or routes.example.py

2012-05-30 Thread Jonathan Lundell
On May 30, 2012, at 7:08 PM, Horus wrote: > I have attached a screenshot to show you what i am seeing. > > I started python 4 weeks ago and web2py for the last 2 so this is completely > new to me. > I downloaded a windows copy in this copy there are the two files I mentioned > > I got it to wo

[web2py] Re: recognizing web2py restart

2012-05-30 Thread Massimo Di Pierro
you can make a cron job in admin @reboot On Wednesday, 30 May 2012 21:10:13 UTC-5, Jonathan Lundell wrote: > > I've got an application that uses memcached. I'd like to recognize when > web2py gets restarted (mod_wsgi, fwiw) so I can flush my cache. No doubt I > can figure something out, but I'm

[web2py] Re: Web2Py + library.zip

2012-05-30 Thread Massimo Di Pierro
You must be using the binary distribution. If you use the source distribution there is a web2py/gluon/ folder. On Wednesday, 30 May 2012 20:00:32 UTC-5, Horus wrote: > > I have been going through the book and I have been seeing gluon imports. > Don't say this is crazy but is Web2Py Pulling from t

[web2py] recognizing web2py restart

2012-05-30 Thread Jonathan Lundell
I've got an application that uses memcached. I'd like to recognize when web2py gets restarted (mod_wsgi, fwiw) so I can flush my cache. No doubt I can figure something out, but I'm sure I must be missing something obvious. (My motivation: in my development environment, I sometimes blow away my d

Re: [web2py] replacing router.example.py or routes.example.py

2012-05-30 Thread Jonathan Lundell
On May 30, 2012, at 6:20 PM, Horus wrote: > Additionally, if routes.py is the main file what is the purpose of router.py? There is no router.py. router.example.py gets renamed to routes.py. > > On Wednesday, May 30, 2012 9:07:40 PM UTC-4, Jonathan Lundell wrote: > On May 30, 2012, at 5:56 PM, Ho

Re: [web2py] replacing router.example.py or routes.example.py

2012-05-30 Thread Jonathan Lundell
On May 30, 2012, at 6:13 PM, Horus wrote: > I removed the .example from routes.example.py to make it routes.py, changed > the values but noting happened? You need to reload the routing information. The easiest way is to restart web2py, though you can also do it through the admin app. > On Wedne

Re: [web2py] replacing router.example.py or routes.example.py

2012-05-30 Thread Horus
Additionally, if routes.py is the main file what is the purpose of router.py? On Wednesday, May 30, 2012 9:07:40 PM UTC-4, Jonathan Lundell wrote: > > On May 30, 2012, at 5:56 PM, Horus wrote: > > #1 I am assuming that when you replace router.example.py or > routes.example.py with router.py o

Re: [web2py] replacing router.example.py or routes.example.py

2012-05-30 Thread Horus
I removed the .example from routes.example.py to make it routes.py, changed the values but noting happened? On Wednesday, May 30, 2012 9:07:40 PM UTC-4, Jonathan Lundell wrote: > > On May 30, 2012, at 5:56 PM, Horus wrote: > > #1 I am assuming that when you replace router.example.py or > route

Re: [web2py] replacing router.example.py or routes.example.py

2012-05-30 Thread Jonathan Lundell
On May 30, 2012, at 5:56 PM, Horus wrote: > #1 I am assuming that when you replace router.example.py or > routes.example.py with router.py or routes.py, respectively, in the base > folder they should take over? No, always routes.py. > #2 Can they be added to app folder? if they are added will

[web2py] Web2Py + library.zip

2012-05-30 Thread Horus
I have been going through the book and I have been seeing gluon imports. Don't say this is crazy but is Web2Py Pulling from this library.zip, this is where the gluon import are coming from?

[web2py] replacing router.example.py or routes.example.py

2012-05-30 Thread Horus
#1 I am assuming that when you replace router.example.py or routes.example.py with router.py or routes.py, respectively, in the base folder they should take over? #2 Can they be added to app folder? if they are added will they take precedence ? I am not finding a lot about this online

[web2py] Re: Welcome app / AddToAny integration question

2012-05-30 Thread Massimo Di Pierro
Good point. I found it useful. We can remove it. On Wednesday, 30 May 2012 19:15:02 UTC-5, pbreit wrote: > > Agree. I constantly mouse-over it accidentally and can't imagine ever > actually using it. > > On Wednesday, May 30, 2012 3:03:09 PM UTC-7, Omi Chiba wrote: >> >> I was thinking the same.

[web2py] Re: Welcome app / AddToAny integration question

2012-05-30 Thread pbreit
Agree. I constantly mouse-over it accidentally and can't imagine ever actually using it. On Wednesday, May 30, 2012 3:03:09 PM UTC-7, Omi Chiba wrote: > > I was thinking the same. It's a little bit annoying. > > On Wednesday, May 30, 2012 4:22:02 PM UTC-5, Chris May wrote: >> >> More of a curiosi

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-05-30 Thread Paolo Caruccio
Andrew, we aren't changing bootstrap.css, but only bootswatch.css. This last file is necessary to override some css rules from web2py.css incompatible with bootstrap.css Please, try a bootswatch theme and let me know if you see any error. Il giorno giovedì 31 maggio 2012 00:36:51 UTC+2, An

[web2py] Re: Web2py and XMPP

2012-05-30 Thread Román Torres
We are doing something similar to a social network with multiple plataforms (encyclopedia, dictionary, forums, rol system and so much more, all this multilanguage). And now we need to create a chat. A chat similar to Facebooks chat or Google Talk and mixed with IRC... Chatrooms, private (person

[web2py] Re: Filter select options

2012-05-30 Thread Rod Watkins
RTM, eh. I didn't think to look at the IS_IN_DB validator for this. In fact, I didn't even have one as I was relying on the default. Thanks!! On Wednesday, 30 May 2012 13:55:35 UTC-7, Niphlod wrote: > > IS_IN_DB takes also a queryset . > Directly from http://web2py.com/books/default/chapter/2

[web2py] Re: Deploy issue - Apache on Windows - Unable to import driver

2012-05-30 Thread Andrew
No, 32 bit. XP (would you believe, It's a work computer !). On Thursday, May 31, 2012 2:09:40 AM UTC+12, Omi Chiba wrote: > > Are you using 64bit environment ? > I remember I got the error when I tried with python 64bit or something. If > you are using 64bit, try 32bit and it should work. >

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-05-30 Thread Andrew
Thanks LightDot, I thought it may have been a feature, so just my opinion, I think the non button look was better. It looks more consistent with the other links in the navbar, and other Bootstrap menus. So, do we keep the buttons, or change it back ? With regards to Paolo's reply below, I d

Re: [web2py] Suggestions for multiple files upload in form

2012-05-30 Thread Paolo Caruccio
Richard, I saw your email in the discussion regarding bootswatch, but I want to answer here for competence. Multiupload is a my old project. The object of the toy app was demonstrate the usage of multiupload control. It wasn't a complete application. Your intentions, however, are interesting.

[web2py] Re: Welcome app / AddToAny integration question

2012-05-30 Thread Omi Chiba
I was thinking the same. It's a little bit annoying. On Wednesday, May 30, 2012 4:22:02 PM UTC-5, Chris May wrote: > > More of a curiosity on my part, but why does web2py promote AddToAny (by > automatically including it with every new application)? > > Sure, it's easy enough to remove, but why i

Re: [web2py] cool new wysiwyg editor

2012-05-30 Thread Vasile Ermicioi
about this http://xing.github.com/wysihtml5/ bad UI look on ie 8, even it says that is supported, a lot of functionality missing compared to redactorjs (no tables, no background color, no file upload, very simple link and image inserting, and so on ) do they have a roadmap of what will be suppor

[web2py] Wildcard in domain mapping route?

2012-05-30 Thread pbreit
Is it possible to wildcard the sub-domain of a domain mapping route? Ex: domains = {"*.myserver.com": "myapp"}

[web2py] Welcome app / AddToAny integration question

2012-05-30 Thread Chris May
More of a curiosity on my part, but why does web2py promote AddToAny (by automatically including it with every new application)? Sure, it's easy enough to remove, but why is it in there in the first place?

Re: [web2py] cool new wysiwyg editor

2012-05-30 Thread Vasile Ermicioi
about redactorjs http://redactorjs.com/download/ You are *free* to use Redactor for your personal or non-profit website projects. You can get the author's permission to use Redactor for commercial websites by paying a fee.

Re: [web2py] minimalist file based workflow engine

2012-05-30 Thread Bruno Rocha
Excelent! I will try that to solve the session and errors cleaning and the notification system for Movuca. On Wed, May 30, 2012 at 1:00 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > https://github.com/mdipierro/workflow > > I could use some feedback about this. Should it be include

[web2py] Re: Filter select options

2012-05-30 Thread Niphlod
IS_IN_DB takes also a queryset . Directly from http://web2py.com/books/default/chapter/29/7 query = (db.table.field == 'xyz') #in practice 'xyz' would be a variable db.table.field.requires=IS_IN_DB(db(query),) put that before calling SQLFORM and voilà. Il giorno mercoledì 30 maggio 201

[web2py] Re: minimalist file based workflow engine

2012-05-30 Thread Niphlod
uhm, maybe only for python and ruby And let me add that this level of "conciseness" isn't for everybody: I noticed that the no of lines of my programs get smaller every month, but I still can't write down such minimal (yet understandable) code ... This is one of the reason I like to hang on

Re: [web2py] cool new wysiwyg editor

2012-05-30 Thread Marco Tulio Cicero de M. Porto
http://xing.github.com/wysihtml5/ Another one... 2012/5/29 Marco Tulio Cicero de M. Porto > That or they mean that they'll never do it. > > > 2012/5/28 Massimo Di Pierro > >> >> >> On Monday, 28 May 2012 17:51:02 UTC-5, Vasile Ermicioi wrote: >>> >>> and no font name, font size >> >> >> That's

[web2py] Filter select options

2012-05-30 Thread Rod Watkins
Hello everyone, I have a quick question. I am using the SQLFORM tool and creating a form using the generated custom widgets. One part of the form allows a one to choose a user from a select list (the table has a reference to auth_user). I'd like to limit the options shown in the select list to

Re: [web2py] Re: Anyone using BootSwatch with new web2py layout

2012-05-30 Thread Richard Vézina
Hey Paolo! Funny I was on this thread because a search in gmail and I am just workin to improve your multiupload app. I am creating the update form actually I have been able to insert the values of the record for the f_trip table, but I struggle for the data from the f_photo table that need to be

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-05-30 Thread Paolo Caruccio
Andrew, it's simple go back to old auth_navbar. In views/layout.html comment this jquery code: jQuery('.auth_navbar').each(function(){ jQuery(this) .addClass('btn-group') .children('a').addClass('btn') }); and change the in this way (note separ

Re: [web2py] Re: minimalist file based workflow engine

2012-05-30 Thread Michele Comitini
+1 This is perfect for managing repeated task A file observer, task dispatcher/scheduler with a cool syntax! mic 2012/5/30 Niphlod : > I'm amazed that the docs explaining features is perhaps longer than the > actual code executing it > IMHO it deserves inclusion in scripts/... 5 KB against 6

[web2py] Re: minimalist file based workflow engine

2012-05-30 Thread Massimo Di Pierro
Isn't that the case for every code? In my experience if the source is longer then the docs, the code is not worth using. Massimo On Wednesday, 30 May 2012 14:03:46 UTC-5, Niphlod wrote: > > I'm amazed that the docs explaining features is perhaps longer than the > actual code executing it >

[web2py] Re: minimalist file based workflow engine

2012-05-30 Thread Niphlod
I'm amazed that the docs explaining features is perhaps longer than the actual code executing it IMHO it deserves inclusion in scripts/... 5 KB against 6,5 to trash sessions, 9,6 to install on fedora.. Il giorno mercoledì 30 maggio 2012 18:00:26 UTC+2, Massimo Di Pierro ha scritto: > >

Re: [web2py] Re: try: for-loop

2012-05-30 Thread Niphlod
I am astonished... I missed this in almost 3 years of python development :D I genuinely repent and knee before you, Anthony Niphlod Il giorno mercoledì 30 maggio 2012 18:11:32 UTC+2, Anthony ha scritto: > > On Wednesday, May 30, 2012 11:59:13 AM UTC-4, Niphlod wrote: >> >> uhm, depends

[web2py] Re: alternates to pyjamas/pyjs?

2012-05-30 Thread Stefaan Himpe
solved some of the issues...time to get crackin'! Glad to hear it :) I have found the "inspect element" tool in chromium to be very valuable in diagnosing trouble with my application.

Re: [web2py] Re: Integrate PHP project with web2py

2012-05-30 Thread José Ricardo Borba
First: What database you are looking for? PHPmyadmin is only for MySQL. For PostgreSQL exist the PHPpgadmin at sourceforge. Second: If your database exists, you can access through the right admin interface (above), with your user and pass. Now you can create your database dictionary. So, the DAL c

[web2py] Re: Integrate PHP project with web2py

2012-05-30 Thread LightDot
On Wednesday, May 30, 2012 6:16:21 PM UTC+2, Bill Thayer wrote: > > You could also have web2py and php >> share a database system like PostgreSQL. >> > > Hello Allen, > > This remark is interesting. I've been working hard for 2 days trying to > get phpMyAdmin to run with web2py but I am having

Re: [web2py] mydomain.com/#!/ detect and redirect

2012-05-30 Thread Jonathan Lundell
On May 30, 2012, at 10:16 AM, Jonathan Lundell wrote: > On May 30, 2012, at 9:37 AM, Annet wrote: >> ... in router.example.py? In my case default_application = 'init', >> default_controller = 'default' and default_function = 'index' What do you >> mean by 'and specify the list of available funct

Re: [web2py] mydomain.com/#!/ detect and redirect

2012-05-30 Thread Jonathan Lundell
On May 30, 2012, at 9:57 AM, pbreit wrote: > If you have your routes set up with a default app and default controller, you > could do something simple like: > > def u(): > row = db(db.auth_user.shortname==request.args(0)).select().first() > return dict(row=row) > > Which should support U

Re: [web2py] mydomain.com/#!/ detect and redirect

2012-05-30 Thread Jonathan Lundell
On May 30, 2012, at 9:37 AM, Annet wrote: > ... in router.example.py? In my case default_application = 'init', > default_controller = 'default' and default_function = 'index' What do you > mean by 'and specify the list of available functions in the default router' . > My application contains 15

[web2py] Validator for self reference field not referring to itself

2012-05-30 Thread lcamara
Hey, I'm trying to validate some things on a self reference field, among them that a reference field on a table does not refer to the record where it is. For instance, db.define_table('person', Field('name', length=256, unique=True, requires=IS_NOT_EMPTY()), Field('gender', requires= IS

Re: [web2py] Help requested with jquery, bootstrap.modal and grid

2012-05-30 Thread pbreit
I think opening a Bootstrap modal should be much easier: http://twitter.github.com/bootstrap/javascript.html#modals On Wednesday, May 30, 2012 6:16:11 AM UTC-7, Johann Spies wrote: > > On 30 May 2012 12:59, R. Osinga wrote: > >> beats me... >> >> I have determined that it is unrelated to this co

[web2py] Re: anonymous login / temporary user login / non-user authentication

2012-05-30 Thread pbreit
I suspect there's a reason you're not just using regular accounts but that would definitely be my suggestion.' On Wednesday, May 30, 2012 8:59:03 AM UTC-7, Liam wrote: > > Just some clarification. In the solution I'm trying to implement, I need > to make sure that only the person who entered th

[web2py] Re: mydomain.com/#!/ detect and redirect

2012-05-30 Thread pbreit
The "hashbang" ("#!") is for a very specific purpose where your whole page is coded in JavaScript. It was sort of popularized by Twitter who is actually now abandoning it. I'm not sure why you would want to use it. If you have your routes set up with a default app and default controller, you co

[web2py] Re: mydomain.com/#!/ detect and redirect

2012-05-30 Thread Anthony
> > ... in router.example.py? In my case default_application = 'init', > default_controller = 'default' and default_function = 'index' What do you > mean by 'and specify the list of available functions in the default router' > . My application contains 15 controllers and almost 100 functions,

Re: [web2py] Re: alternates to pyjamas/pyjs?

2012-05-30 Thread Larry G. Wapnitsky
solved some of the issues...time to get crackin'! On 5/30/2012 12:01 PM, stefaan wrote: I cannot help much with the hulahop (that's needed for pyjd only, which i haven't used myself). I normally compile on the command line, using the pyjsbuild tool found inside the pyjamas/bin folder, and tes

[web2py] Re: mydomain.com/#!/ detect and redirect

2012-05-30 Thread Annet
Hi Anthony, I read the relevant part of the book: http://www.web2py.com/books/default/chapter/29/4?search=url+rewrite#Parameter-based-system and had a look at router.example.py file, I am not sure I completely understand the solution you provided me with. If you use the parameter-based rewrit

[web2py] Re: Integrate PHP project with web2py

2012-05-30 Thread Bill Thayer
> > You could also have web2py and php > share a database system like PostgreSQL. > Hello Allen, This remark is interesting. I've been working hard for 2 days trying to get phpMyAdmin to run with web2py but I am having difficulties. Do I need two different servers to run PHP and web2py? My n

Re: [web2py] Re: try: for-loop

2012-05-30 Thread Anthony
On Wednesday, May 30, 2012 11:59:13 AM UTC-4, Niphlod wrote: > > uhm, depends if he uses lists and articles is = [], there will be a > problem. What problem? An empty list evaluates to False. Anthony

Re: [web2py] Re: alternates to pyjamas/pyjs?

2012-05-30 Thread stefaan
I cannot help much with the hulahop (that's needed for pyjd only, which i haven't used myself). I normally compile on the command line, using the pyjsbuild tool found inside the pyjamas/bin folder, and test inside the browser.

[web2py] minimalist file based workflow engine

2012-05-30 Thread Massimo Di Pierro
https://github.com/mdipierro/workflow I could use some feedback about this. Should it be included in scripts/? It can be used to deleted old errors, expired sessions, setup automatic emails. etc. It is intentionally very minimalist.

Re: [web2py] Re: try: for-loop

2012-05-30 Thread Niphlod
uhm, depends if he uses lists and articles is = [], there will be a problem. Anyway, under some circumstances you're right. Il giorno mercoledì 30 maggio 2012 17:11:33 UTC+2, rochacbruno ha scritto: > > len(articles) is not necessary > > {{if articles:}} > display whatever you want in a f

[web2py] Re: anonymous login / temporary user login / non-user authentication

2012-05-30 Thread Liam
Just some clarification. In the solution I'm trying to implement, I need to make sure that only the person who entered the reviewer code can view the data; much like user login but anonymous. Because it is anonymous and there is no entry in db.auth_user, I think the decorator @auth.requires_logi

[web2py] Re: anonymous login / temporary user login / non-user authentication

2012-05-30 Thread Liam
Hi LightDot, Thanks for the quick reply. The user is able to perform analyses on data that they've uploaded to the site. When they wish to publish an article in a journal based on the analyses, they need to allow reviewers to see the data generated by the analyses along with the initial data

[web2py] Re: alternates to pyjamas/pyjs?

2012-05-30 Thread stefaan
Or maybe I misread your question, and you were really asking about pyjd ? I haven't used it, so I don't know... so far debugging the application was easy enough by dumping debug information onto the bottom of my page.

Re: [web2py] Re: alternates to pyjamas/pyjs?

2012-05-30 Thread Larry G. Wapnitsky
stefaan- As I just posted on the pyjs group (with a stupid typo :)): pyjs was installed from git. 1) hulahop doesn't work. 2) error message when running the following: ['/home/lwapnitsky/workspace/pyjamas/eclipse_build.py', '-d', '-I /home/lwapnitsky/workspace/pyjamas', 'test.py'] Tracebac

[web2py] Re: alternates to pyjamas/pyjs?

2012-05-30 Thread stefaan
> Are there any good alternatives to using pyjamas/pyjs or learning JavaScript from scratch? What problems are you having? I've been using a recent version of pyjamas without problem. (Of course with the recent "hijack" of the project by some disgruntled people there may be other reasons to

[web2py] Re: try: for-loop

2012-05-30 Thread BlueShadow
thats even more elegant^^ Am Mittwoch, 30. Mai 2012 17:04:16 UTC+2 schrieb Niphlod: > > you're overcomplicating a small issue > > {{if articles and len(articles)>0:}} > display whatever you want in a for loop > {{else:}} > display your static message > {{pass}} > > Il giorno mercoledì 30 magg

Re: [web2py] Re: try: for-loop

2012-05-30 Thread Bruno Rocha
len(articles) is not necessary {{if articles:}} display whatever you want in a for loop {{else:}} display your static message {{pass}} On Wed, May 30, 2012 at 12:04 PM, Niphlod wrote: > {{if articles and len(articles)>0:}} > display whatever you want in a for loop > {{else:}} > display your sta

[web2py] Re: try: for-loop

2012-05-30 Thread BlueShadow
OK it obviously has nothing to do with the for loop in try except because the for loop finishes when there are no entries in articles. But some basic understanding of python should have told me the solution^^ thats what works if anyone is interested: {{try:}} {{print article[0].title}} {{empty=0}

[web2py] Re: try: for-loop

2012-05-30 Thread Niphlod
you're overcomplicating a small issue {{if articles and len(articles)>0:}} display whatever you want in a for loop {{else:}} display your static message {{pass}} Il giorno mercoledì 30 maggio 2012 16:44:22 UTC+2, BlueShadow ha scritto: > > I tried it too and for some weird reason it works. >

[web2py] alternates to pyjamas/pyjs?

2012-05-30 Thread Larry Wapnitsky
Are there any good alternatives to using pyjamas/pyjs or learning JavaScript from scratch? I've tried installing pyjamas/pyjs on a few of my Debian systems (thank G-d for virtual machines), but can't seem to get it to run in development. I've tried from source and followed a ton of informatio

[web2py] Re: try: for-loop

2012-05-30 Thread BlueShadow
OK I did some further testing and I'm pretty stupid some basic understanding of python would tell me that the for loop finishes without a problem if there are no elements in it. {{try:}} {{print articlesformovie[0]}} {{noarticles=0}} {{except:}} {{noarticles=1}} Es sind bisher ke

[web2py] Re: try: for-loop

2012-05-30 Thread BlueShadow
I tried it too and for some weird reason it works. The missing doublepoint you spotted is in my complete code on my server^^ what I really want to do is: diyplaying a database entry in a table. this entry varies from no entries to about 10. I didn't account for the no entries part but I got a bunch

[web2py] tutorial code: recipes modifying it without success

2012-05-30 Thread BlueShadow
Hi I think I took this code from one of massimos tutorial videos: def recipes(): try: failtrial=int(request.vars.category) rows=db(db.recipes.category==request.vars.category).select(orderby=~ db.recipes.submitted) except: rows=db().select(db.recipes.ALL, orderby=~db

[web2py] Re: try: for-loop

2012-05-30 Thread Niphlod
btw, this works perfectly as intended trying to do 1/0 {{try:}} {{for a in range(15):}} {{=1/0}} {{pass}} {{except:}} can't divide by 0 {{pass}} Il giorno mercoledì 30 maggio 2012 16:15:10 UTC+2, Niphlod ha scritto: > > > didn't test it, but I spot a missing : after "for x in db.test"

Re: [web2py] Suggestions for multiple files upload in form

2012-05-30 Thread Richard Vézina
Hello Paolo, Pretty nice! Did you implement the update of the records also? Is it a straight and easy task or it becomes trickier to implement than the rest of the app?? Richard On Sat, Oct 29, 2011 at 6:21 PM, Paolo Caruccio wrote: > Bruno, > > thanks. > > What do you think about the upload

[web2py] Re: try: for-loop

2012-05-30 Thread Niphlod
didn't test it, but I spot a missing : after "for x in db.test" Il giorno mercoledì 30 maggio 2012 16:08:10 UTC+2, BlueShadow ha scritto: > > Hi I like to put a for-loop in a try except clause in an html file. > My problem is that the pass from the for loop terminates the try block. > {{try:}} >

Re: [web2py] try: for-loop

2012-05-30 Thread Bruno Rocha
I think you should not do this, do this kinf of logic on controller, model or module. On Wed, May 30, 2012 at 11:08 AM, BlueShadow wrote: > Hi I like to put a for-loop in a try except clause in an html file. > My problem is that the pass from the for loop terminates the try block. > {{try:}} > {

[web2py] Re: Deploy issue - Apache on Windows - Unable to import driver

2012-05-30 Thread Omi Chiba
Are you using 64bit environment ? I remember I got the error when I tried with python 64bit or something. If you are using 64bit, try 32bit and it should work. On Wednesday, May 30, 2012 12:57:03 AM UTC-5, Andrew wrote: > > The Uniform Server option looks very interesting, as does the newer apa

[web2py] try: for-loop

2012-05-30 Thread BlueShadow
Hi I like to put a for-loop in a try except clause in an html file. My problem is that the pass from the for loop terminates the try block. {{try:}} {{for x in db.test}} {{=x.title}} {{pass}} {{except:}} no database entries {{pass}}

[web2py] Re: mydomain.com/#!/ detect and redirect

2012-05-30 Thread Anthony
If you use the parameter-based rewrite system to set a default app, controller, and function and specify the list of available functions in the default router, then in http://yourdomain.com/code/shortname, code and shortname will be interpreted as request.args[1:2], with the request being route

[web2py] Re: form.insert slow when inserting many elements

2012-05-30 Thread Anthony
I think form.insert just does a regular Python list insertion (plus two other trivial function calls). Can you show the form.insert code as well as your alternative list code? Anthony On Wednesday, May 30, 2012 8:12:39 AM UTC-4, DanielB wrote: > > Hi, > > I have a custom form that has a dynamic

Re: [web2py] combine Autocomplete widget and SELECT_OR_ADD_OPTION widget

2012-05-30 Thread Johann Spies
On 30 May 2012 14:44, Richard Vézina wrote: > Maybe it related to this : > https://groups.google.com/forum/?fromgroups#!topic/web2py/MzAUt73M_4w > In my own apps I have stoped using the autocomplete widget since I discovered it gave problems on IE-browsers (something confirmed by some other user

Re: [web2py] Help requested with jquery, bootstrap.modal and grid

2012-05-30 Thread Johann Spies
On 30 May 2012 12:59, R. Osinga wrote: > beats me... > > I have determined that it is unrelated to this code. I see it elsewhere in the app also. > but for some other improvement, > > $(document).ready(function() { > $('a[href*="Alternative"]').a**ttr('data-toggle','modal').a**ttr( > 'dat

[web2py] Re: anonymous login / temporary user login / non-user authentication

2012-05-30 Thread LightDot
So, this would be a one time password that expires? And this data that the user views is generated on the fly and also discarded later? On Wednesday, May 30, 2012 9:09:31 AM UTC+2, Liam wrote: > > Dear all, > > I'm looking for a way to allow non-users of my application to login given > a passwor

Re: [web2py] combine Autocomplete widget and SELECT_OR_ADD_OPTION widget

2012-05-30 Thread Richard Vézina
Maybe it related to this : https://groups.google.com/forum/?fromgroups#!topic/web2py/MzAUt73M_4w Richard On Wed, May 30, 2012 at 8:41 AM, Richard Vézina wrote: > Ok, about the issue with update, it looks that it comes from > AutocompleteWidget itself because replacing the widget with the defaul

Re: [web2py] combine Autocomplete widget and SELECT_OR_ADD_OPTION widget

2012-05-30 Thread Richard Vézina
Ok, about the issue with update, it looks that it comes from AutocompleteWidget itself because replacing the widget with the default web2py 1.99.4 autocomplete widget and I still get the issue : #widget = AutocompleteWidgetSelectOrAddOption(request, db.table2.table2field1, #id_fiel

  1   2   >