def get_url(self, url_or_dict):
        """
        Returns the reversed url given a string or dict and prints errors if MENU_DEBUG is enabled
        """
        if isinstance(url_or_dict, basestring):
            url_or_dict = {'viewname': url_or_dict}
        try:
            return reverse(**url_or_dict)
        except NoReverseMatch:
            if MENU_DEBUG:
                print >>stderr,'Unable to reverse URL with kwargs %s' % url_or_dict
def get_url ( self , url_or_dict ) : if isinstance ( url_or_dict , basestring ) : url_or_dict = { 'viewname' : url_or_dict } try : return reverse ( ** url_or_dict ) except NoReverseMatch : if MENU_DEBUG : print >> stderr , 'Unable to reverse URL with kwargs %s' % url_or_dict
Returns the reversed url given a string or dict and prints errors if MENU_DEBUG is enabled