Re: [web2py] Re: need a simple wiki...

2012-09-09 Thread Andrew W
Thanks Massimo, I'm testing it out now. Does it support html helpers like H1(Hello) or {{ type python stuff here}} ? In another thread, the topic of WYSIWYG editors came up, but I think that was in relation to just doing Markmin text entry. Does a WYSIWYG editor make sense for

Re: [web2py] Re: need a simple wiki...

2012-09-09 Thread Massimo Di Pierro
No. The wiki does not support template language at all. It only supports URLs @ and components @{component:}. Massimo On Sunday, 9 September 2012 18:13:43 UTC-5, Andrew W wrote: Thanks Massimo, I'm testing it out now. Does it support html helpers like H1(Hello) or {{ type python

Re: [web2py] Re: need a simple wiki...

2012-09-09 Thread Massimo Di Pierro
Actually as I think about this we need to add some sanitization rules. On Sunday, 9 September 2012 18:33:50 UTC-5, Massimo Di Pierro wrote: No. The wiki does not support template language at all. It only supports URLs @ and components @{component:}. Massimo On Sunday, 9

Re: [web2py] Re: need a simple wiki...

2012-09-08 Thread Tito Garrido
auth.wiki shouldn't include a WYSIWYG widget by default instead of a text box? On Mon, Sep 3, 2012 at 10:16 PM, Andrew W awillima...@gmail.com wrote: I've just done some tests on tools.py On edit: The page.body is being updated correctly, but page.html does not change. I've added some

Re: [web2py] Re: need a simple wiki...

2012-09-08 Thread Andrew W
Good point. On Sunday, September 9, 2012 8:44:32 AM UTC+12, Tito Garrido wrote: auth.wiki shouldn't include a WYSIWYG widget by default instead of a text box? On Mon, Sep 3, 2012 at 10:16 PM, Andrew W awill...@gmail.comjavascript: wrote: I've just done some tests on tools.py On edit:

Re: [web2py] Re: need a simple wiki...

2012-09-08 Thread Massimo Di Pierro
I guess it can be made an option but I really hate WYSIWG. I think wiki markup are superior. On Saturday, 8 September 2012 15:46:16 UTC-5, Andrew W wrote: Good point. On Sunday, September 9, 2012 8:44:32 AM UTC+12, Tito Garrido wrote: auth.wiki shouldn't include a WYSIWYG widget by default

Re: [web2py] Re: need a simple wiki...

2012-09-08 Thread Anthony
On Saturday, September 8, 2012 5:16:32 PM UTC-4, Massimo Di Pierro wrote: I guess it can be made an option but I really hate WYSIWG. I think wiki markup are superior. I think it really depends on the end user -- some folks just aren't realistically going to learn wiki markup and will expect

Re: [web2py] Re: need a simple wiki...

2012-09-08 Thread Massimo Di Pierro
Looking at the source code... this is already possible. Wiki(render=lambda page: page.body) I now exposed in auth.wiki(render=lambda page: page.body). This option will allow html in wiki. We may want to allow autolinks as well. On Saturday, 8 September 2012 19:42:18 UTC-5, Anthony wrote:

Re: [web2py] Re: need a simple wiki...

2012-09-08 Thread Massimo Di Pierro
Now in trunk: auth.wiki(render='html') will allow html, will do autolink, oembed and allows @ syntax as well as @{component:...} syntax. On Saturday, 8 September 2012 20:34:25 UTC-5, Massimo Di Pierro wrote: Looking at the source code... this is already possible. Wiki(render=lambda

[web2py] Re: need a simple wiki...

2012-09-03 Thread Massimo Di Pierro
On Monday, 3 September 2012 00:51:47 UTC-5, Andrew W wrote: Hi Massimo, Some questions on auth.wiki, in anticipation of some details in the book. Have you finalised the syntax for adding components ? I think we can keep @{component:url} How do I embed media eg images? Do I follow

[web2py] Re: need a simple wiki...

2012-09-03 Thread Andrew W
I can create pages OK, but when I click on Edit, make some changes and then press Submit, the changes do not get displayed. The changes are still there if I open up the Edit screen again, but the html won't change. I've stopped and restarted rocket but the old html stays. I've tried on a

[web2py] Re: need a simple wiki...

2012-09-03 Thread Andrew W
P.S. Menu changes work, in that the menu text gets updated, but the displayed menu text in the content area after I press submit still has the old text. On Tuesday, September 4, 2012 11:42:48 AM UTC+12, Andrew W wrote: I can create pages OK, but when I click on Edit, make some changes and

[web2py] Re: need a simple wiki...

2012-09-03 Thread Andrew W
I've just done some tests on tools.py On edit: The page.body is being updated correctly, but page.html does not change. I've added some print statements and markmin_render() (the compute functions for page.html) is called on the intial page create, but is not called on subsequent updates -

[web2py] Re: need a simple wiki...

2012-09-02 Thread Andrew W
Hi Massimo, Some questions on auth.wiki, in anticipation of some details in the book. Have you finalised the syntax for adding components ? How do I embed media eg images? Do I follow the markmin reference doc, or is it a combo of the two: I've added the media to the page [[some image

[web2py] Re: need a simple wiki...

2012-08-28 Thread Alan Etkin
You seem to need access to the Wiki object in more then one controller. Why? One case of use is described in issue 962 (now fixed, about re-using the wiki model) Other possible case: I intend to give access to wiki documents from a view in a plugin, i.e.: controllers/plugin_bavaria.py def

[web2py] Re: need a simple wiki...

2012-08-27 Thread duncan macneil
Works well! Just wondering are we keeping the ability to embed template code with the new auth.wiki? It would be handy to be able to {{=include.things}} using nothing more than the wiki form (for advanced users). Or do we always need to use LOAD now or something? The menu makes sense to

[web2py] Re: need a simple wiki...

2012-08-27 Thread Alan Etkin
I'be been testing the wiki for a while and have some random comments. -I created .wiki() in the model and used it in a given function, but it doesn't add by default the menu entries -Doing auth.wiki() in any function is not apt for lazyness. i'd add the option to decorate them: @auth.wikify()

[web2py] Re: need a simple wiki...

2012-08-27 Thread Alan Etkin
El lunes, 27 de agosto de 2012 08:06:00 UTC-3, Alan Etkin escribió:I'be been testing the wiki for a while and have some random comments. Wouldn't be better to separate the Wiki class setup and plugging phases? For example, set welcome by default with something like: # model wiki =

[web2py] Re: need a simple wiki...

2012-08-27 Thread Massimo Di Pierro
I am not sure I fully understand the reason for these suggestions. You seem to need access to the Wiki object in more then one controller. Why? I can see why one may want to define the wiki outside of an action to benefit from the menu (if you delete models/menu.py) all actions will have the

[web2py] Re: need a simple wiki...

2012-08-26 Thread Alan Etkin
I mean, the wiki section might be available under app/default/wiki. In which case the wiki menu should only appear from pages under that path. All other areas of the site would have the normal menu. I think it is already working like that, I just wanted to mention it again so you

[web2py] Re: need a simple wiki...

2012-08-26 Thread Massimo Di Pierro
You should be able to do: in models/db.py wiki = auth.wiki() in model/menu.py remove any reference to response.menu in controllers/defaulty.py def index(): return wiki On Sunday, 26 August 2012 13:06:15 UTC-5, Alan Etkin wrote: I mean, the wiki section might be available under

[web2py] Re: need a simple wiki...

2012-08-26 Thread Alan Etkin
The wiki menu will appear only if you created an auth.wiki in the action controller, but only there, as far as I know. Thanks Massimo. That line is wrong. I meant that there's no wiki menu unless you create it, since if the action does not call wiki() the entry will not be added. About

[web2py] Re: need a simple wiki...

2012-08-26 Thread Alan Etkin
Found the problem. No bug, it was my code. I was trying to use a wiki table before calling auth.wiki(), so the tablename was not available :P On Sunday, August 26, 2012 4:56:43 PM UTC-3, Alan Etkin wrote: The wiki menu will appear only if you created an auth.wiki in the action controller,

[web2py] Re: need a simple wiki...

2012-08-22 Thread Andrew
Would you mind giving a simple example on how I could use markmin2pdf with the auth.wiki (or any markmin text in an app).The book just gives a print example, but how would it be used for real in an app to view/print a pdf. I'm also looking at pyfpdf but I think I'm getting mixed up

[web2py] Re: need a simple wiki...

2012-08-22 Thread villas
Regarding the menu, I can see there is a point in having both: 1. The 'menu field' may be better for anyone wishing to change the menus dynamically. 2. The 'menu page' is ideal for those wishing to visualize the menu in one easy place. My other reason for suggesting that is because you have

[web2py] Re: need a simple wiki...

2012-08-22 Thread Massimo Di Pierro
Having it both ways will be a mess. We need to choose one way. On Wednesday, 22 August 2012 06:57:32 UTC-5, villas wrote: Regarding the menu, I can see there is a point in having both: 1. The 'menu field' may be better for anyone wishing to change the menus dynamically. 2. The 'menu page'

[web2py] Re: need a simple wiki...

2012-08-22 Thread villas
Yes, in that case I would personally recommend the plugin_wiki method, it was above all easy (and I suppose that is what a wiki is all about?). In any case, the wiki should not be assumed to be always activated from the main index function of the site. I mean, the wiki section might be

[web2py] Re: need a simple wiki...

2012-08-21 Thread Alan Etkin
Two issues for debugging: -In a new scaffolding app with auth.wiki() appadmin does not show wiki tables, but they are defined (db.tables() return their names). -There's an auth_membership for wiki_editor with user_id set to None, I suppose it was created when loading the wiki feature without a

[web2py] Re: need a simple wiki...

2012-08-21 Thread Rob_McC
Do I have to set something to get this to embedd youtube? Thanks, Rob ## Index Rob page content http://youtu.be/AHBjHCAUjus On Monday, August 20, 2012 9:30:09 PM UTC-4, Massimo Di Pierro wrote: I think the problem is that we broke trunk as we are running some tests... On Monday, 20

[web2py] Re: need a simple wiki...

2012-08-21 Thread Massimo Di Pierro
You have to use http://www.youtube.com/watch?v=AHBjHCAUjus else web2py does not know what oembed service to use. youtu.be is not a well known oembed service provider. On Tuesday, 21 August 2012 13:20:08 UTC-5, Rob_McC wrote: Do I have to set something to get this to embedd youtube?

[web2py] Re: need a simple wiki...

2012-08-21 Thread Tim Michelsen
I reverted trunk to the older Storage but this is not the end of this. We are still working to replace it in a backward compatible way OK, now it works. But why do I always get Registration needs Verification? Can this be switched off? --

[web2py] Re: need a simple wiki...

2012-08-21 Thread Rob_McC
Thanks ! works perfectly. youtu.be is not a well known oembed service provider. Funny the http://youtu.be/theVideoID tag, is all they've been using to SHARE a link lately. Also, the markmin syntax seems to work well. http://web2py.com/examples/static/markmin.html

[web2py] Re: need a simple wiki...

2012-08-21 Thread Massimo Di Pierro
In principle you can extend the rules for autolinks by registering additional oembed services: import re from gluon.contrib.autolinks import EMBED_MAPS EMBED_MAPS.append((re.compile('http://\S*?flickr.com/\S*'), 'http://www.flickr.com/services/oembed/')) but this cannot be done in a model or

[web2py] Re: need a simple wiki...

2012-08-21 Thread villas
1. How does the menu field work? 2. Are we going to expose automenu option for auth.wiki(automenu=False)? A separate top level menu for each page is impractical, so at least we could turn it off. 3. Can we have a configurable menu like we had with meta-menu on plugin_wiki? I think that is

[web2py] Re: need a simple wiki...

2012-08-21 Thread Massimo Di Pierro
2. ok in trunk. 4. fixed in trunk 2+3. right now the menu field is a path: /menu/submenu/subsubmenu and based on the path the page is added to the menu. You can sort manues with /0:menu/2:submenu/3:subsubmenu so menu is the top first top menu item, submenu is the second item in the

[web2py] Re: need a simple wiki...

2012-08-20 Thread Calycé
Pystar, In the admin, add a group named 'wiki_editor' and put yourself in that group. Logout (if you were logged in the application), login and normally voilà! That's what I did and it worked. On Monday, August 20, 2012 7:43:34 AM UTC+2, Pystar wrote: Max, Tried it, still gives me the 401

[web2py] Re: need a simple wiki...

2012-08-20 Thread rif
The Search Pages is also not working. If I enter a page title and hit Submit I get: Traceback (most recent call last): File /home/rif/Downloads/web2py/gluon/restricted.py, line 205, in restricted exec ccode in environment File

[web2py] Re: need a simple wiki...

2012-08-20 Thread Alan Etkin
Incredible, this saves a lot of features development in pyodel. I was very worried on how to provide video streamming with rbac in the elearning plugin. The new changes should make it very easier. I'll try the changes as soon as possible. Thanks El domingo, 19 de agosto de 2012 20:45:34

[web2py] Re: need a simple wiki...

2012-08-20 Thread Massimo Di Pierro
The generated HTML is always cached in DB. The tag search is also quite efficient. It shows a tagcloud in the search page. You can also do in views: {{=auth.wiki('header')}} ... {{=auth.wiki('footer')}} etc. and edit the header, footer, etc as normal wiki pages. On Monday, 20 August 2012

[web2py] Re: need a simple wiki...

2012-08-20 Thread Tim Michelsen
I just gave it a try and it didnt work as stated. In my index.py file I have the return auth.wiki() directive there but whenever I try to view the page I get a login page and after that a 401 unauthorized error. I also have a problem to create a new user (register) from the frontend. With

[web2py] Re: need a simple wiki...

2012-08-20 Thread Massimo Di Pierro
I think the problem is that we broke trunk as we are running some tests... On Monday, 20 August 2012 14:21:40 UTC-5, Timmie wrote: I just gave it a try and it didnt work as stated. In my index.py file I have the return auth.wiki() directive there but whenever I try to view the page I

[web2py] Re: need a simple wiki...

2012-08-20 Thread Massimo Di Pierro
I reverted trunk to the older Storage but this is not the end of this. We are still working to replace it in a backward compatible way On Monday, 20 August 2012 20:30:09 UTC-5, Massimo Di Pierro wrote: I think the problem is that we broke trunk as we are running some tests... On Monday,

[web2py] Re: need a simple wiki...

2012-08-19 Thread Pystar
I just gave it a try and it didnt work as stated. In my index.py file I have the return auth.wiki() directive there but whenever I try to view the page I get a login page and after that a 401 unauthorized error. On Monday, August 20, 2012 12:45:34 AM UTC+1, Massimo Di Pierro wrote: ...this

[web2py] Re: need a simple wiki...

2012-08-19 Thread Massimo Di Pierro
Try login into admin, then visit the page again. It should create a group wiki_editor and make you member automatically. On Sunday, 19 August 2012 20:17:29 UTC-5, Pystar wrote: I just gave it a try and it didnt work as stated. In my index.py file I have the return auth.wiki() directive

[web2py] Re: need a simple wiki...

2012-08-19 Thread Pystar
Max, Tried it, still gives me the 401 unauthorized error. On Monday, August 20, 2012 5:45:34 AM UTC+1, Massimo Di Pierro wrote: Try login into admin, then visit the page again. It should create a group wiki_editor and make you member automatically. On Sunday, 19 August 2012 20:17:29 UTC-5,