Re: [web2py] Re: Markmin question

2011-06-16 Thread Vasile Ermicioi
thank you sir


[web2py] Re: Migration problem

2011-06-16 Thread pbreit
Resolved. Postgres doesn't like field name 'user'.

Re: [web2py] Re: import error

2011-06-16 Thread Pierre Thibault
2011/6/15 Massimo Di Pierro 

> looking into this...
>

Still no news. Should we forget this issue? I really would like to debug but
I don't have enough information. It seems the bug is very rare.


>
> On Jun 15, 8:12 am, "mb_...@yahoo.fr"  wrote:
> > I wanted to use the w2popenid example application from bitbucket
> > website :https://bitbucket.org/bottiger/web2py-openid/overview
> >  I have downloaded and placed the code in the applications directory.
> > I have changed in the models folder the file db.py: this line "from
> > applications.cas.modules.w2popenid import OpenIDLogin" is replaced
> > with this one "from w2popenid import OpenIDLogin" or this "from
> > applications.w2popenid.modules.import OpenIDLogin". But it don't
> > worked. I get to follow this trace
> > Traceback (most recent call last):
> >   File "/home/mamadou/Desktop/web2py/gluon/restricted.py", line 192,
> > in restricted
> > exec ccode in environment
> >   File "/home/mamadou/Desktop/web2py/applications/w2popenid/models/
> > db.py", line 42, in 
> > from testing import lala
> >   File "/home/mamadou/Desktop/web2py/gluon/custom_import.py", line
> > 280, in __call__
> > fromlist, level)
> >   File "/home/mamadou/Desktop/web2py/gluon/custom_import.py", line 75,
> > in __call__
> > level)
> >   File "/home/mamadou/Desktop/web2py/applications/w2popenid/modules/
> > testing.py", line 7, in 
> > import openid.consumer.consumer
> >   File "/home/mamadou/Desktop/web2py/gluon/custom_import.py", line
> > 280, in __call__
> > fromlist, level)
> >   File "/home/mamadou/Desktop/web2py/gluon/custom_import.py", line 75,
> > in __call__
> > level)
> >   File "/usr/lib/pymodules/python2.7/openid/consumer/consumer.py",
> > line 197, in 
> > from openid.consumer.discover import discover,
> > OpenIDServiceEndpoint, \
> >   File "/home/mamadou/Desktop/web2py/gluon/custom_import.py", line
> > 280, in __call__
> > fromlist, level)
> >   File "/home/mamadou/Desktop/web2py/gluon/custom_import.py", line 75,
> > in __call__
> > level)
> >   File "/usr/lib/pymodules/python2.7/openid/consumer/discover.py",
> > line 21, in 
> > from openid.yadis.etxrd import nsTag, XRDSError, XRD_NS_2_0
> >   File "/home/mamadou/Desktop/web2py/gluon/custom_import.py", line
> > 280, in __call__
> > fromlist, level)
> >   File "/home/mamadou/Desktop/web2py/gluon/custom_import.py", line 75,
> > in __call__
> > level)
> >   File "/usr/lib/pymodules/python2.7/openid/yadis/etxrd.py", line 28,
> > in 
> > ElementTree = importElementTree()
> >   File "/usr/lib/pymodules/python2.7/openid/oidutil.py", line 58, in
> > importElementTree
> > ElementTree = __import__(mod_name, None, None, ['unused'])
> >   File "/home/mamadou/Desktop/web2py/gluon/custom_import.py", line
> > 258, in __call__
> > globals.get("__file__", ""))
> > AttributeError: 'NoneType' object has no attribute 'get'
> >
> > to fix i must modify the module custom_import in the web2py/gluon
> > folder.
> > starting line 256
> >
> > try:
> > caller_file_name = os.path.join(self.web2py_path,
> > \globals.get("__file__", ""))
> > except AttributeError:
> > caller_file_name = ""
>



-- 


A+

-
Pierre
My blog and profile
(http://pierrethibault.posterous.com)
YouTube page 
(http://www.youtube.com/user/tubetib)
Twitter (http://twitter.com/pierreth2) 


[web2py] Migration problem

2011-06-16 Thread pbreit
I'm having trouble agin getting a new table created. I still don't really 
understand how Web2py knows how to migrate, how it uses the .table and 
sql.log files and what fake_migrate does exactly.

If I am missing a whole table, how can I prompt Web2py to create it? Do I 
have to manipulate or delete the .table file or sql.log?


[web2py] Re: Problem with auth_cas table not getting created

2011-06-16 Thread pbreit
OK, I think it worked now. I'm not sure what the problem is exactly but 
might have been a false alarm.

[web2py] Re: Problem with auth_cas table not getting created

2011-06-16 Thread pbreit
The .table file was created and the auth_cas table shows in sql.log 
(although faked).

[web2py] Re: Problem with auth_cas table not getting created

2011-06-16 Thread pbreit
I have a custom auth_user table if that matters.

[web2py] Problem with auth_cas table not getting created

2011-06-16 Thread pbreit
I've recently upgraded to 1.96.4 and I'm having trouble getting the new 
auth_cas table created on a Postgres DB. It should get created automatically 
if I have migrate ON, right?

[web2py] Re: Markmin question

2011-06-16 Thread Massimo Di Pierro


On Jun 16, 8:19 pm, elffikk  wrote:
> hi,
> I like markmin syntax, I am thinking to use it, yet I have a few
> questions
> - is there a html to markmin converter? (a markmin to html is - /gluon/
> contrib/markmin/markmin2html.py)

yes
from gluon.html import markmin_serializer
markmin = TAG(html).flatten(markmin_serializer)

> - how to emebed flash?

yes

text=""" bla ``bla``:flash bla """
MARKMIN(text,extra=dict(flash=lambda content: '...')


> - what about including css or javascript ? (, )

text=""" bla ``bla``:js bla """
MARKMIN(text,extra=dict(js=lambda content: '