Returns the URL patterns managed by the considered factory / application.
343619
def get_urlpatterns(self):
        
        return [
            path(
                '',
                search_view_factory(view_class=self.search_view, form_class=self.search_form),
                name='search',
            ),
        ]
713849
def app_routes(app):
    
    _routes = []
    for rule in app.url_map.iter_rules():
        _routes.append({
            'path': rule.rule,
            'name': rule.endpoint,
            'methods': list(rule.methods)
        })
    return jsonify({'routes': _routes})
80359
def get_urlpatterns(self):
        
        return [
            path(
                _('profile/edit/'),
                self.forum_profile_update_view.as_view(),
                name='profile_update',
            ),
            path(
                _('profile/<str:pk>/'),
                self.forum_profile_detail_view.as_view(),
                name='profile',
            ),
            path(
                _('profile/<str:pk>/posts/'),
                self.user_posts_list.as_view(),
                name='user_posts',
            ),
            path(
                _('subscriptions/'),
                self.topic_subscription_list_view.as_view(),
                name='user_subscriptions',
            ),
            path(
                _('topic/<int:pk>/subscribe/'),
                self.topic_subscribe_view.as_view(),
                name='topic_subscribe',
            ),
            path(
                _('topic/<int:pk>/unsubscribe/'),
                self.topic_unsubscribe_view.as_view(),
                name='topic_unsubscribe',
            ),
        ]
799544
public static function findUrlFactory()
    {
        try {
            $messageFactory = static::findOneByType(UriFactoryInterface::class);
        } catch (DiscoveryFailedException $e) {
            throw self::createException('url factory', $e);
        }

        return static::instantiateClass($messageFactory);
    }
785442
def get_urlpatterns(self):
        
        return [
            path(
                _('mark/forums/'),
                self.mark_forums_read_view.as_view(),
                name='mark_all_forums_read',
            ),
            path(
                _('mark/forums/<int:pk>/'),
                self.mark_forums_read_view.as_view(),
                name='mark_subforums_read',
            ),
            path(
                _('mark/forum/<int:pk>/topics/'),
                self.mark_topics_read_view.as_view(),
                name='mark_topics_read',
            ),
            path(
                _('unread-topics/'),
                self.unread_topics_view.as_view(),
                name='unread_topics',
            ),
        ]
351003
def get_local_urls(port):
    ''''''
    url_list = []
    for name, info in psutil.net_if_addrs().items():
        for addr in info:
            if AddressFamily.AF_INET == addr.family:
                url_list.append('http://{}:{}'.format(addr.address, port))
    return url_list
713552
def urls(self):
        ""
        # First, check the urls() method for each plugin.
        plugin_urls = []
        for plugin_name, plugin in \
                                self.model.model_databrowse().plugins.items():
            urls = plugin.urls(plugin_name, self)
            if urls is not None:
                #plugin_urls.append(urls)
                values = self.values()
                return zip(self.values(), urls)
        if self.field.rel:
            m = EasyModel(self.model.site, self.field.rel.to)
            if self.field.rel.to in self.model.model_list:
                lst = []
                for value in self.values():
                    if value is None:
                        continue
                    url = mark_safe('%s%s/%s/objects/%s/' %
                                            (self.model.site.root_url,
                                             m.model._meta.app_label,
                                             m.model._meta.model_name,
                                             iri_to_uri(value._get_pk_val())))
                    lst.append((smart_text(value), url))
            else:
                lst = [(value, None) for value in self.values()]
        elif self.field.choices:
            lst = []
            for value in self.values():
                url = mark_safe('%s%s/%s/fields/%s/%s/' %
                                        (self.model.site.root_url,
                                         self.model.model._meta.app_label,
                                         self.model.model._meta.model_name,
                                         self.field.name,
                                         iri_to_uri(self.raw_value)))
                lst.append((value, url))
        elif isinstance(self.field, models.URLField):
            val = self.values()[0]
            lst = [(val, iri_to_uri(val))]
        else:
            lst = [(self.values()[0], None)]
        return lst
461724
def resource_urls(request):
    """"""

    url_parsed = urlparse(settings.SEARCH_URL)
    defaults = dict(
        APP_NAME=__description__,
        APP_VERSION=__version__,
        SITE_URL=settings.SITE_URL.rstrip('/'),
        SEARCH_TYPE=settings.SEARCH_TYPE,
        SEARCH_URL=settings.SEARCH_URL,
        SEARCH_IP='%s://%s:%s' % (url_parsed.scheme, url_parsed.hostname, url_parsed.port)
    )
    return defaults
1142179
def get_urls(self):
        """"""
        urls = super(SimpleHistoryAdmin, self).get_urls()
        admin_site = self.admin_site
        opts = self.model._meta
        info = opts.app_label, opts.model_name
        history_urls = [
            url(
                "^([^/]+)/history/([^/]+)/$",
                admin_site.admin_view(self.history_form_view),
                name="%s_%s_simple_history" % info,
            )
        ]
        return history_urls + urls
704397
def get_redirect_url(self, *args, **kwargs):
        
        if self.url:
            url = self.url % kwargs
        elif self.pattern_name:
            try:
                url = reverse(self.pattern_name, args=args, kwargs=kwargs)
            except NoReverseMatch:
                return None
        else:
            return None
        return url
697126
def factory_profiles(self):
        ''''''
        with self._mutex:
            if not self._factory_profiles:
                self._factory_profiles = []
                for fp in self._obj.get_factory_profiles():
                    self._factory_profiles.append(utils.nvlist_to_dict(fp.properties))
        return self._factory_profiles
535731
public function getRoutesPatterns()
	{
		$patterns = [];
		$rows = $this->getRoutes();
		if ($rows) foreach ($rows as $route) {
		    $patterns[] = $route->getPattern();
		}
		return $patterns;
	}
819786
def user_patterns(self):
        
        # We do here some lazy loading.
        if not self._user_patterns:
            self._user_patterns = UserPatternManager(self)
        return self._user_patterns
595683
private List<PatternCacheControl> buildPatternsList(ServiceProperties properties) {
        Map<String, PatternCacheControl> patterns = new LinkedHashMap<>();
        List<ServiceProperties> locationsList = properties.getNested("location");
        if (locationsList != null && locationsList.size() != 0) {
            for (ServiceProperties location : locationsList) {
                String directiveList = location.get("cache-control");
                String[] patternList = location.get("patterns").split("\\s+");
                for (String pattern : patternList) {
                    patterns.put(pattern, new PatternCacheControl(pattern, directiveList));
                }
            }
            resolvePatternSpecificity(patterns);
            return sortByMatchingPatternCount(patterns);
        }
        return new ArrayList<>(patterns.values());
    }
149818
private static synchronized Set<OIndexFactory> getFactories() {
		if (FACTORIES == null) {

			final Iterator<OIndexFactory> ite = lookupProviderWithOrientClassLoader(OIndexFactory.class,orientClassLoader);

			final Set<OIndexFactory> factories = new HashSet<OIndexFactory>();
			while (ite.hasNext()) {
				factories.add(ite.next());
			}
			FACTORIES = Collections.unmodifiableSet(factories);
		}
		return FACTORIES;
	}
1160248
def _get_named_patterns():
    """"""
    resolver = urlresolvers.get_resolver(None)
    patterns = sorted([(key, value[0][0][0])
                       for key, value in resolver.reverse_dict.items()
                       if isinstance(key, string_types)
                       ])
    return patterns
481865
def urlpatterns(self):
        '''
        '''
        if not hasattr(self, '_urlspatterns'):
            urlpatterns = []
            # load all urls
            # support .urls file and urls_conf = 'elephantblog.urls' on default module
            # decorate all url patterns if is not explicitly excluded
            for mod in leonardo.modules:
                # TODO this not work
                if is_leonardo_module(mod):

                    conf = get_conf_from_module(mod)

                    if module_has_submodule(mod, 'urls'):
                        urls_mod = import_module('.urls', mod.__name__)
                        if hasattr(urls_mod, 'urlpatterns'):
                            # if not public decorate all

                            if conf['public']:
                                urlpatterns += urls_mod.urlpatterns
                            else:
                                _decorate_urlconf(urls_mod.urlpatterns,
                                                  require_auth)
                                urlpatterns += urls_mod.urlpatterns
            # avoid circural dependency
            # TODO use our loaded modules instead this property
            from django.conf import settings
            for urls_conf, conf in six.iteritems(getattr(settings, 'MODULE_URLS', {})):
                # is public ?
                try:
                    if conf['is_public']:
                        urlpatterns += \
                            patterns('',
                                     url(r'', include(urls_conf)),
                                     )
                    else:
                        _decorate_urlconf(
                            url(r'', include(urls_conf)),
                            require_auth)
                        urlpatterns += patterns('',
                                                url(r'', include(urls_conf)))
                except Exception as e:
                    raise Exception('raised %s during loading %s' %
                                    (str(e), urls_conf))

            self._urlpatterns = urlpatterns

        return self._urlpatterns