Ejemplo n.º 1
0
 def djangoURLPatterns(self):
   """Returns the URL patterns for the tasks in this module.
   """
   patterns = [
       django_url(r'^tasks/gsoc/proposal_duplicates/start$',
                  self.start, name='proposal_duplicates_task_start'),
       django_url(r'^tasks/gsoc/proposal_duplicates/calculate$',
                  self.calculate, name='proposal_duplicates_task_calculate'),
       ]
   return patterns
Ejemplo n.º 2
0
 def djangoURLPatterns(self):
   return [
       url(r'document/show/%s$' % gsoc_url_patterns.DOCUMENT, self,
           name='show_gsoc_document'),
       url(r'document/show/%s$' % gsoc_url_patterns.ORG_DOCUMENT, self,
           name='show_gsoc_document'),
       django_url(r'^document/show/%s$' % gsoc_url_patterns.DOCUMENT,
                  self),
       django_url(r'^document/show/%s$' % gsoc_url_patterns.ORG_DOCUMENT,
                  self),
   ]
Ejemplo n.º 3
0
 def djangoURLPatterns(self):
   """Returns the URL patterns for the tasks in this module
   """
   patterns = [
       django_url(r'^tasks/gsoc/trackings/sync/shipment/start$',
                  self.startShipmentSync,
                  name='shipment_sync_task_start'),
       django_url(r'^tasks/gsoc/trackings/sync/shipment/continue$',
                  self.continueShipmentSync,
                  name='shipment_sync_task_continue'),
   ]
   return patterns
Ejemplo n.º 4
0
  def djangoURLPatterns(self):
    """Returns the list of tuples for containing URL to view method mapping.
    """

    return [
        url(r'org/%s$' % url_patterns.ORG, self,
            name='gsoc_org_home'),
        url(r'org/show/%s$' % url_patterns.ORG, self),
        url(r'org/home/%s$' % url_patterns.ORG, self),
        django_url(r'^org/show/%s$' % url_patterns.ORG, self),
        django_url(r'^org/home/%s$' % url_patterns.ORG, self),
    ]
Ejemplo n.º 5
0
    def _wrapper(f):
        if module:
            if "urlpatterns" not in module.__dict__:
                module.urlpatterns = []
            url_pattern = args[0]
            if len(args) > 1:
                url_name = args[1]
                pattern = django_url(url_pattern, f, name=url_name)
            else:
                pattern = django_url(url_pattern, f)

            module.urlpatterns += patterns("", pattern)
        return f
Ejemplo n.º 6
0
    def _wrapper(f):
        if module:
            if 'urlpatterns' not in module.__dict__:
                module.urlpatterns = []
            url_pattern = args[0]
            if len(args) > 1:
                url_name = args[1]
                pattern = django_url(url_pattern, f, name=url_name)
            else:
                pattern = django_url(url_pattern, f)

            module.urlpatterns += patterns('', pattern)
        return f
Ejemplo n.º 7
0
 def djangoURLPatterns(self):
   """Returns the URL patterns for the tasks in this module.
   """
   return [
       django_url(r'^tasks/mail/send_mail$', self.sendMail,
                  name='send_email_task'),
   ]
Ejemplo n.º 8
0
 def djangoURLPatterns(self):
   return [
       url(r'accepted_orgs/%s$' % url_patterns.PROGRAM, self,
           name='gsoc_accepted_orgs'),
       url(r'program/accepted_orgs/%s$' % url_patterns.PROGRAM, self),
       django_url(r'^program/accepted_orgs/%s$' % url_patterns.PROGRAM, self),
   ]
Ejemplo n.º 9
0
  def djangoURLPatterns(self):
    """Returns the list of tuples for containing URL to view method mapping.
    """

    return [
        url(r'homepage/%s$' % url_patterns.PROGRAM, self,
            name='gsoc_homepage'),
        url(r'program/home/%s$' % url_patterns.PROGRAM, self),
        django_url(r'^program/home/%s$' % url_patterns.PROGRAM, self),
    ]
Ejemplo n.º 10
0
 def djangoURLPatterns(self):
   patterns = [
       django_url(r'^gdata/popup/oauth/redirect$', self,
                  name='gdata_popup_oauth_redirect'),
   ]
   return patterns
Ejemplo n.º 11
0
 def djangoURLPatterns(self):
   return [
       django_url(r'^$', self, name='site_home'),
       django_url(r'^(login)$', self, name='login'),
       django_url(r'^(logout)$', self, name='logout'),
   ]
Ejemplo n.º 12
0
 def djangoURLPatterns(self):
   return [
       django_url(r'^site/edit$', self, name='edit_site_settings'),
   ]
Ejemplo n.º 13
0
def api_url(pattern, *args, **kwargs):
    assert pattern.endswith('$'), 'Api urls must be terminal.'
    pattern = r'%s(\.(?P<emitter_format>json|xml|jsonp)|(?<!.\.json|..\.xml|\.jsonp))$' % pattern[:-1]

    return django_url(pattern, *args, **kwargs)
Ejemplo n.º 14
0
 def djangoURLPatterns(self):
   return [
       django_url(r'^host/profile$', self, name='edit_host_profile'),
       django_url(r'^host/profile/%s$' % url_patterns.USER, self,
                  name='edit_host_profile_linkid'),
   ]
Ejemplo n.º 15
0
 def djangoURLPatterns(self):
   return [
       django_url(r'^user/create$', self, name='create_user'),
   ]
Ejemplo n.º 16
0
 def get_url(self, url_prefix=''):
     return django_url(
         self.get_url_pattern(url_prefix=url_prefix),
         self.validate,
         name=self.get_url_name())
Ejemplo n.º 17
0
 def djangoURLPatterns(self):
   patterns = [
       django_url(r'^gdata/oauth/verify$', self, name='gdata_oauth_verify'),
   ]
   return patterns
Ejemplo n.º 18
0
 def djangoURLPatterns(self):
   patterns = [
     django_url(r'^gdata/make_request$', self, name='gdata_make_request')
   ]
   return patterns
Ejemplo n.º 19
0
 def djangoURLPatterns(self):
   patterns = [
       django_url(r'^gdata/popup/oauth/verified$', self,
                  name='gdata_popup_oauth_verified')
   ]
   return patterns
Ejemplo n.º 20
0
def url(regex, view, kwargs=None, name=None):
  """Constructs an url pattern prefixed with ^gci/.

  Args: see django.conf.urls.defaults.url
  """
  return django_url('^gci/%s' % regex, view, kwargs=kwargs, name=name)
Ejemplo n.º 21
0
 def url(self, regex, view, kwargs=None, name=None, prefix=''):
     """A replacement for 'url' that understands named patterns."""
     regex = self.parse_pattern(regex)
     return django_url(regex, view, kwargs, name, prefix)
Ejemplo n.º 22
0
def url(prefix, regex, view, kwargs=None, name=None):
  """Constructs an url pattern prefixed with an arbitrary prefix

  Args: see django.conf.urls.defaults.url
  """
  return django_url('^%s/%s' % (prefix, regex), view, kwargs=kwargs, name=name)
Ejemplo n.º 23
0
 def djangoURLPatterns(self):
   return [
       django_url(r'^user/edit', self, name='edit_user'),
   ]