Thanks so much for this code, it's really helpful.

@BlueShadow - I keep my auth functions in a separate controller i.e. 
admin.py and can simply exclude this function from the list like so:

if 'admin.py' in ctls: ctls.remove('admin.py')


If you have functions in default.py that you wish to exclude you can create 
a list and have these items excluded in the loop, like so:

    exclusions = ['user','unsubscribe']


    for ctl in ctls:
        if ctl.endswith(".bak") == False:
            filename = os.path.join(ctldir,ctl)
            data = open(filename, 'r').read()
            functions = regex_expose.findall(data)
            ctl = ctl[:-3].replace("_"," ")
            for f in functions:
                if not any(f in s for s in exclusions): # if function is 
not in exclustions
                    sitemap.append(TAG.url(TAG.loc(
'http://www.leandro.inf.br/%s/%s/%s' % (request.application,ctl,f.replace(
"_"," ")))))


Not sure why your deleted function is appearing, the code dynamically 
generates the sitemap on request.

I hope that helps.

-James


On Monday, March 25, 2013 1:06:14 AM UTC+13, BlueShadow wrote:
>
> This Sitemap generator is great! But I got a couple questions about it.can 
> you remove all entries which require authorisation?
> I tried it for one of my applications and it shows an entry for a long 
> deleted function(the view has been deleted too). why is that happening?
>

-- 

--- 
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.


Reply via email to