e357e1dbcdf36eb12be0bc5043e0a098f94a833a,django/comicsite/templatetags/comic_templatetags.py,comic_URLNode,render,#comic_URLNode#Any#,250

Before Change


        url = super(comic_URLNode, self).render(context)
        url = url.lower()

        if subdomain_is_projectname:
            // Interpret subdomain as a comicsite. What would normally be the
            // path to this comicsite?

            try:
                project = re.findall("^\/site\/([^\/]+)\/.*$", url)[0]

            except IndexError:
                // this url cannot use the domain name shortcut, so it is
                // probably meant as a link the main comicframework site.
                // in that case hardcode the domain to make sure the sub-
                // domain is gone after following this link
                return settings.MAIN_HOST_NAME + url

            url.replace("/site/" + project,"")

        return url


class TagListNode(template.Node):

After Change


            // Interpret subdomain as a comicsite. What would normally be the
            // path to this comicsite?

            args = [arg.resolve(context) for arg in self.args]
            project = args[0]

            if project == settings.MAIN_PROJECT_NAME:
                // this url cannot use the domain name shortcut, so it is
                // probably meant as a link the main comicframework site.
                // in that case hardcode the domain to make sure the sub-
                // domain is gone after following this link
                return settings.MAIN_HOST_NAME + url

            path_to_site = reverse_djangocore("comicsite.views.site", args=[project]).lower()

            if url.startswith(path_to_site):
                return url.replace(path_to_site, "/")

        return url


class TagListNode(template.Node):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: comic/grand-challenge.org
Commit Name: e357e1dbcdf36eb12be0bc5043e0a098f94a833a
Time: 2017-05-09
Author: jamesmeakin@gmail.com
File Name: django/comicsite/templatetags/comic_templatetags.py
Class Name: comic_URLNode
Method Name: render


Project Name: nipy/dipy
Commit Name: 3f0bd0264210e859fe4de2715e321cbaed327c85
Time: 2017-07-28
Author: sheybani.saber@gmail.com
File Name: dipy/denoise/localpca.py
Class Name:
Method Name: localpca


Project Name: nipy/dipy
Commit Name: 71b50613bb182a263e799be300e187b840fc1572
Time: 2017-07-21
Author: sheybani.saber@gmail.com
File Name: dipy/denoise/localpca.py
Class Name:
Method Name: localpca