Sure. To make this app work with any app name you would modify db.py:
openid = local_import('w2popenid')
oid_login = openid.OpenIDLogin(URL(r=request, c='default',
f='openID'), globals())


On Jul 16, 2:44 pm, Yarin <[email protected]> wrote:
> I see- yeah there were some mid-hardcoded import statements- fixed
> them and now I can access edit screens.
>
> Can you show me an example of using the local_import function?
>
> On Jul 16, 3:11 pm, "mr.freeze" <[email protected]> wrote:
>
> > If you look in db.py of the application you will see:
> > from applications.cas.modules.w2popenid import OpenIDLogin
> > If you named the application something other than 'cas', the import
> > will fail and throw an error.
>
> > It's best practice to use the local_import function to import modules
> > from within your app's modules folder. This will use
> > request.application instead of a hard-coded value.
>
> > On Jul 16, 2:00 pm, Yarin <[email protected]> wrote:
>
> > > Where do you see the application name, and what difference does it
> > > make?
>
> > > On Jul 16, 2:37 pm, "mr.freeze" <[email protected]> wrote:
>
> > > > Unzipping to web2py/applications is sufficient.  It looks like the
> > > > application name is hard-coded as 'cas'. Did you name it something
> > > > else?
>
> > > > On Jul 16, 1:05 pm, Yarin <[email protected]> wrote:
>
> > > > > I'm trying to install an existing application from source code I
> > > > > pulled off of 
> > > > > bitbucket:http://bitbucket.org/hc/w2popenid/get/3fc7570ecc85.zip
>
> > > > > Guess I'm not clear on the process.  Is it enough to unzip the source
> > > > > into a directory under ../web2py/applications/ ?  I did that, and the
> > > > > application show up in the installed applications of my site, but it
> > > > > doesn't work  - keep on getting an internal error with unrecoverable
> > > > > ticket whenever I try to edit.  I tried to compile as well, but it
> > > > > says "Cannot compile: there are errors in your app:"  I don't know if
> > > > > I'm dealing with an install or an app issue?
>
> > > > > The admin interface offers an option of uploading 'packed'
> > > > > applications- So if I wanted to pack this source from the command
> > > > > line, would I just tar/zip it and add an .w2p extension?
>
> > > > > Sorry if this has been covered before- I can't seem to find any good
> > > > > information on this.

Reply via email to