So I got a couple minutes and found the problem there was a bakup file of
my default controler which ended with .1
fixed it by this line: if ctl.endswith(".bak") == False and
ctl.endswith(".1")== False:
On Tuesday, March 26, 2013 2:50:32 PM UTC+1, BlueShadow wrote:
>
> Thanks james I did it exactly the other way around I made a list of
> funktions which are allowed to show ^^.
> It works pretty great except that all static(without an id) funktions show
> up twice. do you have the same problem?
> I'm sure its easy to fix I will do it once I finished the more pressing
> matters :)
>
> On Tuesday, March 26, 2013 7:58:49 AM UTC+1, James Burke wrote:
>>
>> 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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.