Files in models directory ignored....

20 views
Skip to first unread message

Sundar

unread,
Sep 22, 2015, 8:10:07 AM9/22/15
to web2py-users
Not sure if it is recorded in the documentation. But it took some time for me to figure out that the files in Models Directory that include - (hyphen) in their names are ignored by Web2py - and I do not see them in Appadmin either.

Not sure if some other characters (like hyphen) also cause this.

Version used: 2.12.3-Source Version  in Widows Platform

If the above fact is already recorded somewhere, apologies for this post.

Leonel Câmara

unread,
Sep 22, 2015, 8:33:30 AM9/22/15
to web2py-users
This doesn't need to be documented because it is very unpythonic to use dashes in module names. You can't even import them as usual because the interpreter thinks you're using a minus you need to use __import__. Anyway, don't do it.  

Sundararajan Seshadri

unread,
Sep 22, 2015, 8:37:37 AM9/22/15
to web...@googlegroups.com
Got it. Thanks.

On Tue, Sep 22, 2015 at 6:03 PM, Leonel Câmara <leonel...@gmail.com> wrote:
This doesn't need to be documented because it is very unpythonic to use dashes in module names. You can't even import them as usual because the interpreter thinks you're using a minus you need to use __import__. Anyway, don't do 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 a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/Gf12QE9yans/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages