[web2py] Re: web site down??

2017-06-07 Thread stefaan
It works for me...

http://downforeveryoneorjustme.com/web2py.com


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: new free toys

2016-01-27 Thread stefaan
Interesting!

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: SQLFORM.dictform fields show old values after submit?

2014-09-03 Thread stefaan
Apparently I have to call

if form.process(keepvalues=True).accepted 

instead. It makes sense only after you know about it ;)

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py list of dictionaries

2014-09-03 Thread stefaan
I forgot to mention that you can append a copy of "d" using

l.append(d.copy())

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py list of dictionaries

2014-09-03 Thread stefaan
Try appending a copy of d to l.

I think python secretly doesn't append d, but appends a reference to d.
So currently, in each iteration you overwrite the same "d".



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] SQLFORM.dictform fields show old values after submit?

2014-09-03 Thread stefaan
Hi,

I'm trying to understand what I'm doing wrongly. 
After submission, old values reappear in the fields.
Pressing F5 is required to show the updated values.

I'm using the latest and greatest web2py (
2.9.6-stable+timestamp.2014.09.02.01.57.55)

Controller:
---

def index():
if session.config is None:
session.config = dict(field1="1", field2="2")

message = ""

form = SQLFORM.dictform(session.config)
if form.process().accepted:
session.config.update(form.vars)
message = "updated"

return dict(message = message, form=form)

View:
-

{{extend 'layout.html'}}
{{=form}}
{{=message}}



Best regards,
Stefaan.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Uforum - a forum web2py application

2014-05-08 Thread Stefaan Himpe
 
> I have created a web2py forum software, now currently only in the Dutch
> but wil be ported to english.

Ziet er goed uit!


-- 
http://technogems.blogspot.com
http://a-touch-of-music.blogspot.com
http://youtube.com/stefaanhimpe


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Question about Web2py inner workings

2014-04-04 Thread Stefaan Himpe



# born_to_fail.py
foo ='bar'
defmain():
printfoo
if__name__=='__main__':main()


If I run your code using

python born_to_fail.py

I get as output

bar

Best regards,
Stefaan.


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: cannot import module from application's modules directory on pythonanywhere.com

2014-03-23 Thread Stefaan Himpe

Intersestingly, it works correctly on my PC locally if I put it in my
application's "modules" folder, but not on pythonanywhere.

I found out, however, that I can work normally after I move music21 to 
web2py's site-packages folder (outside the application).


This solution is not entirely satisfactory (music21 is really used in 
only one application, not in all of them) but suffices for now.


If anyone has more insights, they are welcome, but the issue is
no longer blocking me from continuing my application.

Thanks!
Stefaan.


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: cannot import module from application's modules directory on pythonanywhere.com

2014-03-23 Thread Stefaan Himpe





is it running well in your local computer? or maybe try to import module


Oh wait! On my local computer it was importing not from the modules 
folder but from a globally installed version of music21. I need to 
examine more first...




--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: cannot import module from application's modules directory on pythonanywhere.com

2014-03-23 Thread Stefaan Himpe



I just tried and it works without problem on my local computer.
I'll double check what I did on pythonanywhere.



--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] cannot import module from application's modules directory on pythonanywhere.com

2014-03-22 Thread stefaan
I have a copy of the music21 python library in the modules folder of my 
application.

>From the pythonanywhere bash prompt I can import it without problems:

cd ~/web2py/applications/mints/modules
python
>>> from music21 import chord
>>> chord


When I tried to import it from my application, at first I got the following 
stack trace:

*controller:*

def index():
from music21 import chord
return dict(message=T('Hello World'))

*Error: *

 cannot import name correlate

Versie
web2py™ Version 2.9.5-stable+timestamp.2014.03.16.02.35.39
Python Python 2.7.5+: /usr/local/bin/uwsgi (prefix: /usr)

Traceback (most recent call last):
  File "/home/xxx/web2py/gluon/restricted.py", line 220, in restricted
exec ccode in environment
  File "/home/xxx/web2py/applications/mints/controllers/default.py", line 
79, in 
  File "/home/xxx/web2py/gluon/globals.py", line 385, in 
self._caller = lambda f: f()
  File "/home/xxx/web2py/applications/mints/controllers/default.py", line 
21, in index
from music21 import chord
  File "/home/xxx/web2py/gluon/custom_import.py", line 92, in 
custom_importer
return base_importer(pname, globals, locals, fromlist, level)
  File "applications/mints/modules/music21/__init__.py", line 166, in 

from music21 import * # @UnresolvedImport
  File "/home/xxx/web2py/gluon/custom_import.py", line 92, in 
custom_importer
return base_importer(pname, globals, locals, fromlist, level)
  File "applications/mints/modules/music21/analysis/__init__.py", line 5, 
in 
from music21.analysis import correlate
ImportError: cannot import name correlate


After *reloading* the web application, the trace back changed to:

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.

Traceback (most recent call last):
  File "/home/xxx/web2py/gluon/restricted.py", line 220, in restricted
exec ccode in environment
  File "/home/xxx/web2py/applications/mints/controllers/default.py" 
<https://stefaanhimpe.pythonanywhere.com/admin/default/edit/mints/controllers/default.py>,
 line 79, in 
  File "/home/xxx/web2py/gluon/globals.py", line 385, in 
self._caller = lambda f: f()
  File "/home/xxx/web2py/applications/mints/controllers/default.py" 
<https://stefaanhimpe.pythonanywhere.com/admin/default/edit/mints/controllers/default.py>,
 line 21, in index
from music21 import chord
  File "/home/xxx/web2py/gluon/custom_import.py", line 92, in custom_importer
return base_importer(pname, globals, locals, fromlist, level)
  File "applications/mints/modules/music21/__init__.py", line 166, in 
from music21 import * # @UnresolvedImport
  File "/home/xxx/web2py/gluon/custom_import.py", line 92, in custom_importer
return base_importer(pname, globals, locals, fromlist, level)
  File "applications/mints/modules/music21/analysis/__init__.py", line 7, in 

from music21.analysis import metrical
  File "/home/xxx/web2py/gluon/custom_import.py", line 92, in custom_importer
return base_importer(pname, globals, locals, fromlist, level)
  File "applications/mints/modules/music21/analysis/metrical.py", line 18, in 

import music21.stream
  File "/home/xxx/web2py/gluon/custom_import.py", line 86, in custom_importer
raise ImportError, 'Cannot import module %s' % str(e)
ImportError: Cannot import module 'music21'


Do you think this is a problem in web2py? or rather in the library? 
If you have an idea about what causes the problem, can it be worked around 
somehow?

thanks for your insights!

Best regards,
Stefaan.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: New python.org layout

2014-03-22 Thread Stefaan Himpe

Michele Comitini wrote:

Seems that the new layout of python.org is here:  http://python.org


My first impression: it feels too widely spaced for my smaller laptop 
screen. Their "community" menu runs off my screen (unless I go 
full-screen in my browser, which I normally never do).


Although that's probably a personal quirk as I typically dislike 
bootstrap based layouts for that very reason.



I see they keep "forgetting" to mention web2py as a web framework :-)


Consider submitting a bug against the new layout? :-)

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: grid layout problem

2013-11-15 Thread Stefaan Himpe
Hi Mirko,

short answer: I have no idea really, it just came out like that, but here's
what I did that might influence the result:

1. I think these are the relevant options I passed to my grid:

ui='web2py',
...
buttons_placement="left",
links_placement="left",

2. I adjusted the css based on the suggestions in this thread:
https://groups.google.com/d/topic/web2py/cWhQla9a2Sc/discussion
(I'm not sure if that was already the case when I originally posted the
question)

Best regards,
Stefaan.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: One of the best things that happened to web2py

2013-10-29 Thread stefaan

>
>
>
>  It's a manual process to clear down sites from people that decide not to 
> sign up. 
>
> Ouch... so let's hope not too many people decide to try it out then... (oh 
wait...! :D)

  

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: One of the best things that happened to web2py

2013-10-28 Thread Stefaan Himpe

> The instance only lives for

24 hrs unless you sign-up. In that case it will persist.


Hi,

I tried creating something last week as I saw it announced on the dev 
mailing list, and despite not signing up, I now see it still appears to 
be alive. Is this expected?


Best regards,
Stefaan.

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] how to avoid committing sensitive data to github?

2013-10-12 Thread stefaan
Hello all,

When creating web2py applications, are there any "best practices" regarding 
ensuring you don't push sensitive data (e.g. email password)
to github by accident? Do people test using new email addresses that were 
created specifically for testing web apps? 
Or perhaps someone has developed a script that automatically (temporarily?) 
removes sensitive data before committing? 
How about database contents? Should files like 0.py and database folder 
contents simply never be committed, and made part of .gitignore?
(Apart from some initial version where mail settings and stuff like 
settings.security_key are empty...)

I want to avoid having to take manual actions before committing/pushing 
because I expect that sooner or later I would make mistakes.

Ideas on the topic or a link to explanation welcome...

p.s. I already saw this, but I'm sure it's still up to date: What data 
should be private (for security) in a standard web2py 
installation?<https://groups.google.com/forum/#!searchin/web2py/sensitive$20data/web2py/UBhDaekkT8Q/hMJWEycUGYUJ>

Best regards,
Stefaan.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Column ordering in SAQLFORM.grid

2013-10-11 Thread Stefaan Himpe

Hi,


def index():
  form = SQLFORM.grid(db.stazione,
  fields={db.stazione.codice,db.stazione.sito_id,db.stazione.data_prelievo},
...


You could try:

fields = [db.stazione.codice, db.stazione.sito_id, 
db.stazione.data_prelievo]


i.e. [] instead of {}

HTH,
Stefaan.


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: compact grid howto

2013-10-09 Thread stefaan
Very useful! Thanks.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Two loaded components on one page - How can I refresh both on submit of sqlform.grid in one?

2013-10-08 Thread Stefaan Himpe



Anyone know how I can do that?


I did just that yesterday!
Here's what I did:

I passed a parameter

onupdate=ongridupdate

to the grid, where

def ongridupdate(form):
# all kinds of stuff, followed by...
redirect(URL("default", "index", extension="html"),client_side=True)


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] grid layout problem

2013-10-08 Thread stefaan
Hello all,

I noticed the following when using a grid with some "links" (custom 
buttons) put at the left,
using the default layout (and using ui-style "web2py"):

- when the grid is on a large screen, the custom button column takes too 
much space
- on a small screen, the custom buttons overlap with the text in the next 
column of the grid

I have attached 2 screenshots illustrating the problem. 
Is this a problem with web2py's default css ? Or do I need to use different 
grid options?

I create the grid with the following options:

form = SQLFORM.grid(ui='web2py',
formname='formindex',
fields=[db.t_seminar.f_date, 
db.t_seminar.f_start_time, db.t_seminar.f_speaker_string, 
db.t_seminar.f_location_string, 
db.t_seminar.f_title_string,db.t_seminar.created_by],
query=((db.t_seminar.f_date >= 
datetime.datetime.now().date()) & (db.t_seminar.f_tentative != True)),
onupdate=__archive_and_reload,
editable=__userowned,
create=auth.has_membership('admin'),
deletable=__userowned,
details=True,
searchable=True,
sortable=True,
orderby = [db.t_seminar.f_date, 
db.t_seminar.f_start_time, db.t_seminar.f_title_string],
links = [__define_button, __attendants],
buttons_placement="left",
links_placement="left",
paginate=10)

Best regards,
Stefaan.


<https://lh5.googleusercontent.com/-bMVSBL5HjJk/UlPyZYkkLjI/ASs/af-4CTzhe4U/s1600/overlap.png>

<https://lh5.googleusercontent.com/-2hrq-wqeeUA/UlPyebasP2I/AS0/kc9CK-WVlPg/s1600/toomuch.png>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: fpdf: problem with last line of report

2013-10-05 Thread stefaan
The problem is solved if I comment out all calls to "self.output_table_sep" 
in the file html.py of gluon/contrib/fpdf
Not sure if that would break other stuff, but it works for me.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: fpdf: problem with last line of report

2013-10-05 Thread stefaan
I had linked to the wrong online example at first, then corrected it, but 
gmane users won't see the updated link, so 
here it is again: online 
example<http://www.web2py.com.ar/fpdf/default/listing.pdf>. 
The problem is visible at the bottom of page 24.

On Saturday, October 5, 2013 9:47:11 PM UTC+2, stefaan wrote:
>
> Hello all,
>
> I notice that the last line of my pdf report is wrong: the bottom lines of 
> the table horizontally extend too far.
> The online example on the web2py web 
> site<http://www.web2py.com.ar/fpdf/default/listing.pdf>shows the same problem:
>
> Any workarounds?
>
> Best regards,
> Stefaan.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] fpdf: problem with last line of report

2013-10-05 Thread stefaan
Hello all,

I notice that the last line of my pdf report is wrong: the bottom lines of 
the table horizontally extend too far.
The online example on the web2py web 
site<http://www.web2py.com.ar/fpdf/default/report.pdf>shows the same problem:

Any workarounds?

Best regards,
Stefaan.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] application for seminar management?

2013-10-03 Thread Stefaan Himpe

Hello list,

I'm looking for suggestions for something to manage in-house seminars.

Does anything like this exist already? (I can hardly imagine it 
doesn't...) Can Pynuke or Conf2py be used for something like this?


If nothing exists, I might try to make something simple myself.

Some requirements as far as I see them now:

- list upcoming seminars (basic info like title, speaker, date, start 
time) sorted by date


- user friendly way to create/edit seminars

- for each listed seminar link to some extra explanation (abstract, 
perhaps a picture, attached slides, ... This could be on a wiki page)


- allow people to create a profile and to register/unregister for 
upcoming seminars


- for each listed seminar also show a counter for how many people 
registered so far


- have a way to list people that registered for a given seminar

- allow people to suggest new (future) seminar topics (and have a page 
that lists suggested, not yet planned seminars, allow to assign a 
date/speaker/... to turn it into a planned seminar)


- send registered people a reminder mail some time before the seminar 
takes place



Currently, I have *no need* for things like
(things marked with a star are "nice-to-have"):
* search through seminar title/abstract/...
* good looks
- traveling directions
- online payment system
- maps


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: this would be nice for wizard 2.0

2013-04-13 Thread Stefaan Himpe

+1

--

--- 
You received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Not to open a can of worms ... about web2py.com

2013-03-15 Thread Stefaan Himpe

Should it be done?


No.

--

--- 
You received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Embed pygame on web2py page

2012-11-05 Thread stefaan
Unless I misunderstand your intention, I don't think that is possible. 
Pygame is made for desktop applications. Those cannot be magically embedded 
in a webpage (gtk3 has a neat trick in this area, but it's not very 
relevant to this discussion).
If you want to create a game running in your browser, you should probably 
should check out javascript or something on top of it like pyjamas (pyjamas 
comes with a sample asteroid game).



-- 





[web2py] Re: how to find the Manhattan distance of the given question in python

2012-11-05 Thread stefaan
How is this related to web2py? 
This is not a "we solve your homework" news group.
If you really expect help, try a more general-purpose newsgroup like 
comp.lang.python, 
and make sure you post your version of the code, pointing out where you are 
stuck, otherwise you might get very rude replies :)

-- 





[web2py] Re: Generate the nth Pell Number

2012-11-05 Thread stefaan
This looks like a homework assignment. 
Did you intend to post this in the web2py discussion group?
I doubt we would do you a favor solving your homework.


-- 





[web2py] Re: [OFF-TOPIC] Recipe for keeping Google Code & GitHub in sync

2012-10-05 Thread stefaan
I still don't quite understand what is the reason to have two duplicate 
repos ?
Is it purely a matter of reconciling different developer preferences?

-- 





[web2py] Re: Updated cheatsheet

2012-09-04 Thread stefaan
Very useful! Thanks.

(p.s. I noticed a small typo:  "VirutualHost" instead of "VirtualHost" in 
two places)

-- 





Re: [web2py] Re: Google group again

2012-08-29 Thread stefaan

I can see it too, but only when looking at the  
https://groups.google.com/forum/?fromgroups#!forum/web2py  page while 
logged in using my gmail account.


-- 





Re: [web2py] Re: How to use twitter bootstrap style

2012-07-06 Thread stefaan

>
>
> and this change a lot of things but not buttons style, so I think that's 
> not the corrects way ... 
>

Not sure if it would solve your problem, but sometimes you need to clear 
the browser cache to see the effect of changes in css.



Re: [web2py] Form not processed on first submit

2012-06-27 Thread stefaan

>
>
>  I cannot solve your problem, but if all else fails it may help to insert 
print statements in the controller, to see which lines you reach, 
so you can find out if e.g. one of the lines that come before the call to 
form.process() throws an exception.

-- 





[web2py] Re: How capable is the ajax function in web2py.js?

2012-06-26 Thread stefaan

>
>
> Now I realize that in order to interact with the table, which is managed 
> by pyjamas, for example to select a certain row, I need to define a complex 
> JSONRPCs interface (select row, un-select, paginate to next page, previous 
> page, last page, page number, ...), passing back and forth parameters and 
> results between web2py and pyjamas. This looks quite complex.
>
>
One thing that can reduce playing ping-pong with the server (and therefore 
also reduce complexity + enhance performance): 
think about when you really need to contact the server, and accumulate 
other changes in the client until you actually contact it.

In an application I'm currently prototyping, I allow a user to do lots of 
manipulations on a table (selecting rows, filtering visible data, sorting 
columns, ...) purely in the client.
When the user selects a row, I dynamically change its css style so it looks 
differently on screen. No need to contact the server for that. 
Inside the client (pyjamas) I maintain a data structure in response to the 
user interactions that encodes updates to the current state of the 
application 
(think: a list of currently selected rows).

Only when absolutely needed, the new state of the application is sent back 
to the server (i.e. to web2py using JSONRPC) and processed, or new data is 
requested from the server.

As explained by Anthony ("most of the effort will be on the client side"), 
I think using Ajax/JQuery directly won't make things fundamentally easier 
(on the contrary: unless you find a pre-made component that already does 
what you want you will now have to write your client side stuff in 
javascript instead of python, which - depending on your background - may 
sound scary).

-- 





[web2py] Re: Web2py and pyjamas - redirecting controller to pyjamas html file

2012-06-23 Thread Stefaan Himpe



Hi there,


Hi there,

I have used pyjamas with css successfully before.
The secret was to change the view a bit to insert a link to the .css file.










Activity










Best regards,
Stefaan.

--





[web2py] Re: how can I pick a directory from a web2py form (equivalent to WxDirPickerCtrl)

2012-06-19 Thread stefaan
>From what I understand:
If it is a folder on the client pc, it probably isn't possible with just 
javascript.
If it is a folder on the server, it should be possible to write something 
yourself (maybe a lot of work if you want a full-fledged file manager, but 
if you can live with listing possible foldernames in some combobox, you 
should be fine :) )



[web2py] poweredby broken?

2012-06-04 Thread stefaan
Ticket issued: 
poweredby/xxx.xxx.xx.x.2012-06-04.12-35-07.80f9cfdf-c405-4c8e-8229-3dca140cade2



[web2py] Re: What do you think of this service? Pagodabox

2012-06-01 Thread stefaan

>
>
> They pull from your git repository to deploy an application.  Do you see 
> a demand for something like this in Web2py?  Would it be a feature you 
> would want to use? 
>
> Doesn't fluxflex also do this already?
 


[web2py] Re: Thinking of building a bug tracker...

2012-06-01 Thread stefaan



I have noticed one other tracker in web2py, but I couldn't demo it. 
>
> Have you seen these? 

http://code.google.com/p/web2py-issuetracker/
http://www.i-track.org/ 



[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: 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] 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.



[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 look for alternatives :) )

As I found out by trial and error, the explanation in the web2py book 
refers to pyjamas 0.5-something and the view shown there is outdated. 
Here's the summary of how I got it to work:

* Put the YourAppName.py in the static folder of your web2py application
* After compiling the YourAppName.py file to YourAppName.js, in the output 
folder, you will find a YourAppName.html file, which contains 
the boilerplate code required in your web2py view (this is a one-time copy 
paste operation from generated code to your web2py view). 
The boilerplate code no longer exactly matches the code as shown in the 
web2py book. 

One thing that took me a while to figure out was the importance of 
including the exact



tag, with the correct values for the name and content attribute as found in 
the output/YourAppName.html file.
Without this tag, the pyjamas application would refuse to start.



[web2py] Re: Help me prepare a talk on Web2py for the June Meetup of the Atlanta Python User Group (PyATL).

2012-05-22 Thread Stefaan Himpe

Looks pretty impressive!


Perhaps this can be useful.




[web2py] Re: reverse ajax on free hosting like fluxflex / pythonanywhere

2012-05-15 Thread stefaan

Please correct me if I'm wrong, but as far as I understand tornado cannot 
be used with free hosting?
(or can it?)


[web2py] reverse ajax on free hosting like fluxflex / pythonanywhere

2012-05-13 Thread Stefaan Himpe

Hello list,

Would anyone have an idea on how to accomplish reverse ajax ("server 
push") on free hosting like fluxflex/pythonanywhere?


If I'm correct, typical "comet" libraries require special web servers, 
so that is probably out of the question on typical free hosting sites.


For my own education I've implemented a little chat application using a 
"long polling" approach, where the server receives a request, and is 
looping and sleeping until some timeout occurs or until new info is 
available, but it very quickly uses up all my CPU quotum on e.g. 
fluxflex (I suspect that a statement like time.sleep(1) is counted as 
using 1 second of CPU time)


Is the only alternative to use GAE with their channel API ?

Thanks for any insights you may have.



[web2py] Re: global name 'reponse' is not defined

2012-05-08 Thread stefaan
The screenshot in the book was made using firefox, which automatically 
styles rss feeds such as the one you pasted and displays it in a nice way 
to the user.
Other browsers don't have this automatic styling of rss feeds, and for 
those you should probably get some rss reader plugin to display the rss 
feed.



[web2py] Re: CMS question

2012-05-02 Thread stefaan


>
> It still needs some work before I can release it.
>
>
Hmmm.. wondering now if we will see a sudden spike in web2py based phishing 
sites ;)
 


[web2py] Re: ATTENTION before upgrading to trunk....

2012-04-27 Thread stefaan

>
>
> An inner voice is saying:  "Can't the person who has breached that limit 
> be asked to create his own tables instead of giving all the rest of us the 
> inconvenience?". 
>

An inner voice is saying: "640K [rows] ought to be enough for anybody" ? ;)



[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-23 Thread stefaan

>
>
> I'm a little surprised at all the negativity toward the new Google Groups 
> -- I find it a general improvement over the old interface. Now we can do 
> rich text formatting, code highlighting, and attach files. 
>

>
My favourite way to follow the web2py newsgroups currently is by reading 
gmane via the email and news reader in iceape (aka seamonkey):
 * very nice and tidy threaded layout; 
 * immediate overview about what are the new messages in which threads; 
 * jump from new message to new message by pressing the space bar...

so easy and efficient!

The online google groups on the other hand 

 * waste heaps of screen space (even in compact mode; why can't the compact 
mode of google groups be as compact
   as - say - the compact mode of new-style gmail?), 
 * add lots of visual noise (lines and icons and pictures for every topic, 
WHY?!) 
 * and do not manage to present the information in a way that I can easily 
see everything i'm interested in without scanning multiple whole pages 
   (information like in which threads new messages are added, and what 
are the newest messages in a thread). 

Their layout may work on mobile devices, but it's hardly usable on a 21" 
desktop monitor (everything is just spaced too far apart horizontally and 
vertically).

Some of the features you mention are improvements though: code samples, 
file attachments, tags.

Not *sure* *why* rich text editing seems like * a good idea to you ;) *
*
*
*(written in the new google groups interface)*
*
*


[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-21 Thread Stefaan Himpe



This new look that Google Groups has implemented is seriously
debilitating


+200




[web2py] Re: Possible to put controller code and view in same file?

2012-04-17 Thread stefaan
It doesn't seem like a very dumb idea, it would go a bit in the direction 
of literate programming.
(see e.g. http://monday.sourceforge.net/litprog.html  )

Currently switching between controller and view indeed takes a mental and 
physical context switch.
Sometimes views are reused across controllers, so web2py should internally 
still
be based on separate views. 

The main drawbacks, then, as far as I can tell, is that the application 
would need a kind of "tangling" or "compilation" step to separate the 
controller from the view + it would 
be less obvious where to go looking for a view; how to avoid someone else 
changing the generated views 
(which then will be overwritten again during the next tangling step)?



[web2py] Re: nice to introduce new button in grid

2012-04-11 Thread stefaan



I really think these buttons should go away in favor of a dropdown menu.
>
>
>> I'm not convinced. A dropdown menu is less intuitive for the end user.
If you only expose a few operations, I think separate buttons are better.




Re: [web2py] Re: Scaling web2py

2012-04-10 Thread stefaan



Well I know the major bottle neck in the site is the binary tree. I am 
> still trying to figure out how to do this the best and most efficient.
>

Maybe this could be useful: 
http://dirtsimple.org/2010/11/simplest-way-to-do-tree-based-queries.html
 


[web2py] Re: Python Negative Popularity

2012-03-31 Thread Stefaan Himpe



So a button would be:

class BUTTONW(WIDGET):
.
.
.
   def onclick(self, target):
 .
 .
 .
  target.update()



Isn't that exactly what pyjamas ( http://pyjs.org ) offers ?
Should we really reinvent the wheel here?



[web2py] Re: How do we check the number of users in the new google groups?

2012-03-31 Thread Stefaan Himpe



Everything is so complicated compared to the old google groups. :-(



I passionately dislike the look and feel of the new google groups.
The new motto seems to be "Why fit all messages on one screen if you can 
fit it on four". (And no need to point out "compact" mode, the amount of 
white between the lines makes my eyes hurt.)







[web2py] Re: Getting started in Web2py

2012-03-23 Thread stefaan

Your mileage may vary, but for me glancing through the examples got me
started in no time:

http://www.web2py.com/examples/default/examples


[web2py] default app.yaml outdated?

2012-03-16 Thread Stefaan Himpe

Hello,

I downloaded web2py 1.99.7 source code and google app engine sdk 1.6.3.
When I try to start web2py using dev_appserver, it complains (see stack 
trace).


Any ideas?

Best regards,
Stefaan.


WARNING  2012-03-16 21:26:56,734 rdbms_mysqldb.py:74] The rdbms API is 
not available because the MySQLdb library could not be loaded.

Traceback (most recent call last):
  File "dev_appserver.py", line 125, in 
run_file(__file__, globals())
  File "dev_appserver.py", line 121, in run_file
execfile(script_path, globals_)
  File 
"/home//development/python/boardgame/google_appengine/google/appengine/tools/dev_appserver_main.py", 
line 690, in 

sys.exit(main(sys.argv))
  File 
"/home//development/python/boardgame/google_appengine/google/appengine/tools/dev_appserver_main.py", 
line 579, in main

root_path, {}, default_partition=default_partition)
  File 
"/home//development/python/boardgame/google_appengine/google/appengine/tools/dev_appserver.py", 
line 3068, in LoadAppConfig

config = read_app_config(appinfo_path, appinfo_includes.Parse)
  File 
"/home//development/python/boardgame/google_appengine/google/appengine/tools/dev_appserver.py", 
line 2905, in ReadAppConfig

return parse_app_config(appinfo_file)
  File 
"/home//development/python/boardgame/google_appengine/google/appengine/api/appinfo_includes.py", 
line 58, in Parse

appyaml = _MergeBuiltinsIncludes(appinfo_path, appyaml, open_fn)
  File 
"/home//development/python/boardgame/google_appengine/google/appengine/api/appinfo_includes.py", 
line 108, in _MergeBuiltinsIncludes

open_fn=open_fn))
  File 
"/home//development/python/boardgame/google_appengine/google/appengine/api/appinfo_includes.py", 
line 162, in _ResolveIncludes

state, runtime)
  File 
"/home//development/python/boardgame/google_appengine/google/appengine/api/appinfo_includes.py", 
line 222, in _ConvertBuiltinsToIncludes

yaml_path = builtins.get_yaml_path(builtin_name, runtime)
  File 
"/home//development/python/boardgame/google_appengine/google/appengine/ext/builtins/__init__.py", 
line 120, in get_yaml_path

builtin_name, ', '.join(sorted(available_builtins
google.appengine.ext.builtins.InvalidBuiltinName: datastore_admin is not 
the name of a valid builtin.
Available handlers are: admin_redirect, appstats, default, deferred, 
django_wsgi, remote_api






[web2py] Re: Tangle

2012-03-02 Thread stefaan
Impressive!


[web2py] Re: don't understand forms processing

2012-01-12 Thread stefaan
Have you looked here?
http://web2py.com/examples/default/examples#form_examples

FORM (and all the other UPPERCASE helpers) is just a function that
creates an html fragment.

The key to understanding how these forms work is to realize that forms
are "submitted to themselves".

That's why the code in the examples first checks:

"if form.accepts" -> this can only be true if the form was already
submitted, so you can take some actions based on the values in the
form
"else if form.errors" -> this can only be true if the form was
submitted, but validation failed, so you can take actions based on the
failures
"else" -> this can only be true if the form was not submitted yet, so
you can display the form for the first time

Please checkout example 28 from the above link - it should be quite
enlightening.




[web2py] Re: web2py wins an InfoWorld 2012 Technology of the Year Award

2012-01-10 Thread stefaan
Seems like practicality beats purity :p
(although the true relevance of the above line in the context of
web2py can be discussed)


[web2py] Re: How to create pdfs using markmin2pdf with Windows 7

2012-01-05 Thread stefaan

> I am not sure if miktex includes pdflatex. I only used it on linux but
> it should be easy to define it after miktex is installed.

MiKTeX *does* indeed contain pdflatex.



[web2py] Re: Happy new year

2012-01-01 Thread Stefaan Himpe

Gelukkig nieuwjaar :)

Stefaan.




[web2py] Re: Merry christmas

2011-12-25 Thread Stefaan Himpe

Vrolijk kerstfeest en gelukkig nieuwjaar!



[web2py] Re: CMS idea

2011-12-12 Thread stefaan
Very, very nice idea.


[web2py] Re: Say hello to i-Track

2011-12-01 Thread stefaan
An impressive piece of work :)

I did spot a buglet though: the blue links on top of the contact form
at
http://demo.i-track.org/itrack_demo/default/contact_admin

trigger an "invalid function" error if one is not logged in.

Best regards,
Stefaan.


[web2py] Re: web2py logo and layout has changed one year ago...

2011-11-30 Thread stefaan
Web2py default layouts certainly have come a long way since the (IMHO,
quite awful :p )  fluorescent orange and black-green looks.

I do seem to miss some "best-practices" documentation about how to
effectively apply themes to a web2py application. The downloadable
themes do not always properly display the newer widgets (like
sqlform.grid), leaving me (as a css nitwit) not much option but to use
the default layout. Unlike web2py functionality, the css classes do
not seem to be kept backward compatible (your layout won't be
overwritten if you upgrade to a newer web2py, but if you want the
newer features to render properly you may have to manually merge old
layouts with newer layouts)


I'm wondering if there aren't any WYSIWYM web layout solutions (what-
you-see-is-what-you-mean, a web equivalent to LaTeX macros for
printable documents), e.g. providing standardized css classes that all
scaffolding applications/widgets/user views ought to restrict
themselves to. Themes would also have to be implemented in terms of
those standardized css classes, hopefully leading to a smoother
theming experience. Approaches like the "ui" argument in sqlform.grid
do not seem ideal to me.




[web2py] Re: Wrapping text in SQLFORM.grid

2011-11-15 Thread Stefaan Himpe

I have found one solution which works for me:

In static/css/basic.css I commented:

/*.web2py_grid td { white-space:nowrap; }*/


Thanks for posting this!

Best regards,
Stefaan.






[web2py] Re: Please help me understand how 'lambda row, rc' works

2011-11-06 Thread Stefaan Himpe

tomt wrote:

I wanted to implement the 'extracolumns' feature of SQLTABLE
and the example provided in the source code is:

 :param extracolums = [{'label':A('Extra',_href='#'),
 'class': '', #class name of the header
 'width':'', #width in pixels or %
 'content':lambda row, rc: A('Edit',_href='edit/
%s'%row.id),
 'selected': False #agregate class selected to this
column
 }]

I don't understand this because I didn't define 'row' or 'rc' anywhere
in my controller, but the content definition worked anyways.


With lambda you create a function in-place (without giving it a name).
If you write lambda row, rc : ... you say that you define a function 
expecting two parameters: "row" and "rc"


To understand better, you could just as well write the following 
equivalent code with a normal function (untested):


def show_content(row, rc):
return A('Edit', _href='edit/%s'%row.id)

extracolums = [{'label':A('Extra',_href='#'),
  'class': '',
  'width':'',
  'content': show_content,
  'selected': False
  }]




[web2py] Re: we need some good web2py quotes ....

2011-11-05 Thread Stefaan Himpe
I went web2py when I realized that what worked five years ago isn’t 
working today.





[web2py] Re: Complex CRUD Forms Examples with Web2py?

2011-10-24 Thread stefaan
Brilliant plugin!


[web2py] Re: on grid and smartgrid search feature

2011-10-13 Thread stefaan
> 1. Before reading your email again it was not clear to me how to get the
> query to be activated until I tried to see what would happen if I click on
> the   and/or buttons.  Only then I saw that those buttons add the query with
> an 'and' or 'or'  to the existing query.

I had the same trouble initially. From an end-user point of view, I
would prefer the "build query" as it is implemented for http://bitbucket.org
projects (to be found by clicking the "Issues" tab, and selecting
"Open issues")

e.g. at this link:

https://bitbucket.org/rochacbruno/surveycloud/issues?status=new&status=open






[web2py] Re: IMPORTANT

2011-10-12 Thread Stefaan Himpe



Do we need a policy about this?


"live and let live" ?






[web2py] Re: on grid and smartgrid search feature

2011-10-12 Thread stefaan
> I have replaced my all my similar .js and .css files with that of the
> welcome app but I see no popup panel.

It may be that the old .css is cached in your browser and needs to be
reloaded
 - try to refresh the browser page once. That was the case for me.

A new button "query" should appear left of the search edit field.
If you click "query" a popup panel should appear underneath, in which
you can define a simple expression. You can press either AND or OR
button to close the popup panel, and see the expression appear.

To make more complex expressions, you need to click query again,
make a second simple expression, and then concatenate it to the first
one
by pressing either the AND or OR button.



[web2py] Re: on grid and smartgrid search feature

2011-10-11 Thread Stefaan Himpe

Massimo Di Pierro wrote:

The new grid/smartgrid have a much better search feature. A new button
query shows a popup panel that allows you to build the query string.
Can you please check on your existing tables and see if you encounter
any problems?



The capabilities columns seems to be missing in the list that appears 
after pressing query (tried with iceape 2.0.14 and chromium 14.0.835.163 
(Developer Build 101024 Linux) Built on Debian unstable, running on 
Debian wheezy/sid.



*
model
*

db.define_table('servers',
Field('name', 'string', length=63, default='testserver', 
required=True, notnull=True, unique=True, label="Server name"),
Field('ip', 'string', requires=IS_IPV4(), required=True, 
notnull=True, unique=True, label="Server ip address"),
Field('folder', 'string', length=256, 
default=DEFAULT_TESTIMON_FOLDER, required=True, notnull=True, 
label='installation folder'),
Field('capabilities', 'list:string', requires = 
IS_EMPTY_OR(IS_IN_DB(db, db.capabilities.capability, multiple=True)), 
readable=True, writable=True)

)
from plugin_multiselect_widget import hmultiselect_widget
db.servers.capabilities.widget = hmultiselect_widget


# NOTE: (hmultiselect_widget is a widget from 
http://dev.s-cubism.com/web2py_plugins; but removing it doesn't make a 
difference)


**
controller
**


def server_administration():
  links = [lambda row: A('Check status',_href=URL(c='administration', 
f='check_server_status/%s' % row.id))]

  servers = SQLFORM.grid(
db.servers,
links = links,
deletable=True,
editable=True,
create=True)

  return dict(servers=servers)


view


{{=servers}}




[web2py] Re: two SQLFORM.grid in one view?

2011-10-11 Thread stefaan
Maybe useful for readers in the future:

Using multiple grids in one view is not supported, and the problems
won't be fixed.
(workaround: e.g. use iframes, or design a better UI that doesn't need
two grids in one view ;) )



[web2py] Re: Tag handling suggestions

2011-10-11 Thread stefaan
How does choosing option 1 <--> option 3 affect building a UI ?

It seems to me that option 1 can be used "as-is" in an SQLFORM.grid
containing other fields,
whereas option 3 might require a separate SQLFORM.grid to manage the
correspondence tags<->items?

If this is just me not understanding all possibilities of
SQLFORM.grid, then please elaborate.



[web2py] Re: two SQLFORM.grid in one view?

2011-10-09 Thread Stefaan Himpe

Some code:


view


{{extend 'layout.html'}}
{{=servers}}
{{=server_capabilities}}

**
controller
**

def index():
  links = [lambda row: A('Check status',_href=URL(c='administration', 
f='check_server_status/%s' % row.id))]


  servers = SQLFORM.grid(
db.servers,
formname="srvrs",
links = links,
deletable=True,
editable=True,
create=True
)

  server_capabilities = SQLFORM.grid(
db.server_capabilities,
formname="capabilities",
deletable=True,
editable=True,
create=True
  )
  return dict(servers=servers, server_capabilities=server_capabilities)


*
model
*

db.define_table('servers',
Field('name', 'string', length=63, default='testserver', 
required=True, notnull=True, unique=True, label="Server name"),
Field('ip', 'string', requires=IS_IPV4(), required=True, 
notnull=True, unique=True, label="Server ip address"),
Field('testimon_folder', 'string', length=256, 
default='/home/user', required=True, notnull=True, label='TestiMon 
installation folder'),

format="%(name)s"
)

db.define_table('server_capabilities',
Field('server_id', db.servers, requires=IS_IN_DB(db, 'servers.id', 
'servers.name')),
Field('provides', 'string', length=63, required=True, notnull=True, 
label='Provides'),

format="%(provides)s"
)
db.server_capabilities.server_id.represent = lambda id, row: 
db(db.servers.id==id).select().first().name




[web2py] Re: two SQLFORM.grid in one view?

2011-10-09 Thread Stefaan Himpe

And noticed another thing: the export button
always returns results for the first table, even
when clicked on the second table.






[web2py] Re: two SQLFORM.grid in one view?

2011-10-09 Thread Stefaan Himpe

Also, performing a search in one of the two grids actually
results in both grids searching for the same keyword.





[web2py] two SQLFORM.grid in one view?

2011-10-09 Thread Stefaan Himpe

Hello list,

I try to add two SQLFORM.grid in one view.
They refer to separate tables.
I have given them a separate formname.

The edit and update buttons behave weird: when i press view/edit in 
either grid, *both* the grids display the same (expected) view/edit form.


Can two SQLFORM.grid be used in one view?

web2py 1.99.2 from source on debian sid amd64

Thanks,
Stefaan.



[web2py] [SOLVED] how to do db administration of default auth tables?

2011-10-06 Thread stefaan
Near the top of the scaffolding application, it said:

db = DAL('sqlite://storage.sqlite')

Near the bottom of the application i had copied from my old
application the following:

db = SQLDB('sqlite://db.db')


So the variable db was used twice to indicate different tables.
I have no idea now how authentication could ever work like that...




[web2py] Re: how to do db administration of default auth tables?

2011-10-05 Thread Stefaan Himpe

Massimo Di Pierro wrote:

Did you put this:

auth.define_tables()

in the controller instead of a model? Something is not executing that
line when you visit appadmin.



I left it where it was in the simple application i created using the
web interface. I just added a table of my own at the bottom of db.py.

I will try to insert some print statements tomorrow to see if something 
is printed on the console.


Thanks for this insight.
Stefaan.





[web2py] Re: how to do db administration of default auth tables?

2011-10-05 Thread stefaan



> I think he redefine the auth model and now can't see all column in the
> appadmin?!

To be clear: I didn't redefine anything auth related. I just use the
default auth provisions.


[web2py] Re: how to do db administration of default auth tables?

2011-10-05 Thread stefaan

Hello,

> The auth tables should be visible from the db administration interface --
> not from your models in "design" view but from the 'db' interface where you
> can view table contents and insert records directly into tables (in "design"
> view, you follow the "database administration" button just under the
> "models" heading and above the list of your model files.)

That's indeed where I'm looking.

> something's wrong with your installation.

It was a fresh 1.99.2 web2py src code, which I manually copied it over
an old install.
But login, registration, etc. work as expected - I just cannot see the
auth tables.


[web2py] how to do db administration of default auth tables?

2011-10-04 Thread stefaan
I've ported an old version of my application from T2 to the new crud/
auth/smartgrid...stuff.
I'm using the default auth provisions as defined in the scaffolding
application: auth.define_tables()

Is it possible to inspect the auth tables from the administrative
interface ?
I only see my custom tables listed, but nothing created by auth.

(The sql.log does contain references to auth tables, and registration/
login/logout/profile/password recovery all work as expected).

I'm running web2py 1.99.2 from source on win32.

Thanks,
Stefaan.



[web2py] Re: wrapping long text lengths in grid/smartgrid

2011-09-30 Thread Stefaan Himpe

A partial reply to my own questions:


I was wondering about grid/smartgrid: currently we can use
maxtextlength=XXX to indicate the max length of a column. If the real
length is longer than XXX, the text is chopped at a suitable length
and "..." is added to it.
If you configure a long maxtextlength, at least with the default
template the column as displayed becomes very wide
Is it somehow possible instead to configure long maxtextlengths and
then have the text wrap at some column?


I still have no idea here.


And related to this: Instead of having long maxtextlength and
wrapping, I could also enable the "View" button, but then I get to see
too many details (certain table columns I don't think are worth
displaying.) Can I customize the fields that are shown by clicking the
"View" button?


Yes! By defining the database table Fields as writable=False and 
readable=False.






[web2py] wrapping long text lengths in grid/smartgrid

2011-09-29 Thread stefaan
I was wondering about grid/smartgrid: currently we can use
maxtextlength=XXX to indicate the max length of a column. If the real
length is longer than XXX, the text is chopped at a suitable length
and "..." is added to it.
If you configure a long maxtextlength, at least with the default
template the column as displayed becomes very wide
Is it somehow possible instead to configure long maxtextlengths and
then have the text wrap at some column?

And related to this: Instead of having long maxtextlength and
wrapping, I could also enable the "View" button, but then I get to see
too many details (certain table columns I don't think are worth
displaying.) Can I customize the fields that are shown by clicking the
"View" button?


[web2py] Re: website stats update

2011-09-23 Thread stefaan
Maybe we could add a stats graph tracking evolution somewhere on the
web2py page.
The google charts api is really easy to use.


[web2py] Re: new web2py issue tracking app

2011-09-22 Thread Stefaan Himpe



Please help me test it and suggest improvements:


Also not sure if bug or feature:
If I add an issue, owner is fixed to massimo.dipie...@gmail.com
(I had expected to be the owner of the issues I logged)

Also I seem to be unable to add new issues (perhaps that's a matter of 
permissions), but I also don't get any warnings about this: the new 
issue form can be submitted, but doesn't seem to appear in the list.





[web2py] Re: new web2py issue tracking app

2011-09-22 Thread Stefaan Himpe



Please help me test it and suggest improvements:

http://tests.web2py.com/tracker


Hello, I've attached a .jpg image to one of the issues,
but when I tried to download the attachment, I got

Invalid Request

Also, not sure if bug or feature:
after commenting on one of the issues it seems I became the "Author" of 
the bug (at least that's how I interpret the "Author" column)






[web2py] Re: new web2py issue tracking app

2011-09-22 Thread stefaan
I still get a ticket when clicking tracker -> "issues" button after
logging in via google. Without login, the issues button seems to work.

http://tests.web2py.com/admin/default/ticket/tracker/192.146.11.2.2011-09-22.16-42-57.2692ee08-77f7-4a72-a1e2-5744c55e58e1



[web2py] Re: Tricky query

2011-09-15 Thread stefaan
> How do I escape the ' after the second '2' in this query?

Do you really want only one ' to appear ? (my chemistry is a little
rusty):
you can escape a single quote using a backslash:

s = lower('2,2\'-(Butane-1,4-diyl)dibenzimidazolium dichloride')

or alternatively, enclose the string in " " instead:

s = lower("2,2'-(Butane-1,4-diyl)dibenzimidazolium dichloride")

best regards,
Stefaan.


[web2py] Re: how to use cgi in web2py

2011-09-08 Thread stefaan
> web2py provides a file cgihandler.py to interface to CGI.

If still in doubt, use google:

http://web2py.com/AlterEgo/default/show/93

(As far as I understand, a cgi program expects input via stdin, and
sends output to stdout,
but I'm by no means an expert)

Best regards,
Stefaan.



[web2py] Re: how to use cgi in web2py

2011-09-08 Thread stefaan

> hey guys ,
>
> anyone can tell me how to use cgi in web2py ??

If in doubt, always check the online book first...
http://www.web2py.com/book/default/chapter/11?search=cgi

Best regards,
Stefaan.


[web2py] Re: content type of jsonrpc service reply

2011-09-02 Thread Stefaan Himpe

Is this coming through generic.json?


I created a simple web application from scratch, only added this code in 
the controller (I think web2py has support for both json and jsonrpc? 
i'm using jsonrpc here):


@service.jsonrpc
def add(x,y):
return x+y

Now, I post a json request over http to add numbers 5 and 6 to 
'http://127.0.0.1:5000/simple_json_server/default/call/jsonrpc',

and I get back a reply with the following header contents:

[ http_version(1-1),
  status(ok,'OK'),
  x_powered_by(web2py),
  set_cookie(set_cookie(session_id_simple_json_server,
'127.0.0.1-abd8ad25-61f4-4a62-bb59-9f64c7ba065a',
[path= (/)])),
  expires('Fri, 02 Sep 2011 22:40:47 GMT'),
  pragma('no-cache'),
  cache_control('no-store, no-cache, must-revalidate, post-check=0, 
pre-check=0'),

  content_type('text/html; charset=utf-8'),
  date('Fri, 02 Sep 2011 22:40:47 GMT'),
  server('Rocket 1.2.2 Python/2.6.7'),
  content_length(56),
  connection('keep-alive')
]

The rest of the request then contains the json reply containing the 
correct answer.


Please let me know if you need more data.

Best regards,
Stefaan.



[web2py] Re: content type of jsonrpc service reply

2011-09-02 Thread Stefaan Himpe



There *is* a bug, but it should be generating text/x-json (and that should be 
fixed). Are you sure you're getting text/html?


I definitely received text/html.
(web2py 1.98.2, running on rocket 1.2.2).

A wide variety of content types seems to be in use, but
http://www.ietf.org/rfc/rfc4627.txt specifies jsonrpc must have 
"application/json".


Best regards,
Stefaan.



[web2py] content type of jsonrpc service reply

2011-09-02 Thread Stefaan Himpe

Hello,

I seem to have hit an unexpected detail of the jsonrpc support in 
web2py: when I post a json request to my web2py application, I get a 
json reply with a content-type set to "text/html; charset=utf8" (whereas 
i had expected something like "application/json").


Am I doing something wrong? Is this a bug in the jsonrpc support for 
web2py? Or do I simply have wrong expectations?


Any insights welcome!

Best regards,
Stefaan.




  1   2   >