def djangoURLPatterns(self): return [ url(r'admin/trackings/shipment_info/edit/%s' % url_patterns.namedIdBasedPattern(['sponsor', 'program']), self, name='edit_shipment_info') ]
def url(regex, view, kwargs=None, name=None): """Constructs an url pattern prefixed with ^gsoc/. Args: see django.conf.urls.url """ return django_url('^gsoc/%s' % regex, view, kwargs=kwargs, name=name) class SOCUrlPatternConstructor(url_patterns.UrlPatternConstructor): """Implementation of UrlPatternConstructor which constructs Summer Of Code-specific URL patterns prefixed with ^gsoc/. """ def construct(self, regex, view, kwargs=None, name=None): """See url_patterns.UrlPatternConstructor.construct for specification.""" return django_url('^gsoc/%s' % regex, view, kwargs=kwargs, name=name) SOC_URL_PATTERN_CONSTRUCTOR = SOCUrlPatternConstructor() SHIPMENT_INFO = namedIdBasedPattern(['sponsor', 'program']) SURVEY = namedLinkIdPattern(['sponsor', 'program', 'survey']) COMMENT = namedIdBasedPattern(['sponsor', 'program', 'user']) SURVEY_RECORD = namedIdBasedPattern(['sponsor', 'program', 'survey', 'user']) GRADING_RECORD = '/'.join([ url_patterns.USER_ID, r'(?P<group>(\d+))', r'(?P<record>(\d+))']) PREFIXES = "(gsoc_program|gsoc_org)" DOCUMENT = url_patterns.DOCUMENT_FMT % PREFIXES ORG_DOCUMENT = url_patterns.ORG_DOCUMENT_FMT % PREFIXES
# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Module for constructing GCI related URL patterns """ from django.conf.urls.defaults import url as django_url from soc.views.helper import url_patterns 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) TASK = url_patterns.namedIdBasedPattern(['sponsor', 'program']) PREFIXES = "(gci_program|gci_org)" DOCUMENT = url_patterns.DOCUMENT_FMT % PREFIXES ORG_DOCUMENT = url_patterns.ORG_DOCUMENT_FMT % PREFIXES
from django.conf.urls import url as django_url from soc.views.helper import url_patterns def url(regex, view, kwargs=None, name=None): """Constructs an url pattern prefixed with ^gci/. Args: see django.conf.urls.url """ return django_url("^gci/%s" % regex, view, kwargs=kwargs, name=name) class CIUrlPatternConstructor(url_patterns.UrlPatternConstructor): """Implementation of UrlPatternConstructor which constructs Code In-specific URL patterns prefixed with ^gci/. """ def construct(self, regex, view, kwargs=None, name=None): """See url_patterns.UrlPatternConstructor.construct for specification.""" return django_url("^gci/%s" % regex, view, kwargs=kwargs, name=name) CI_URL_PATTERN_CONSTRUCTOR = CIUrlPatternConstructor() TASK = url_patterns.namedIdBasedPattern(["sponsor", "program"]) PREFIXES = "(gci_program|gci_org)" DOCUMENT = url_patterns.DOCUMENT_FMT % PREFIXES ORG_DOCUMENT = url_patterns.ORG_DOCUMENT_FMT % PREFIXES
# limitations under the License. """Module for constructing GSoC related URL patterns """ from django.conf.urls.defaults import url as django_url from soc.views.helper.url_patterns import namedIdBasedPattern from soc.views.helper.url_patterns import namedLinkIdPattern from soc.views.helper import url_patterns def url(regex, view, kwargs=None, name=None): """Constructs an url pattern prefixed with ^gsoc/. Args: see django.conf.urls.defaults.url """ return django_url('^gsoc/%s' % regex, view, kwargs=kwargs, name=name) SURVEY = namedLinkIdPattern(['sponsor', 'program', 'survey']) PROPOSAL = namedIdBasedPattern(['sponsor', 'program']) REVIEW = namedIdBasedPattern(['sponsor', 'program', 'user']) PROJECT = namedIdBasedPattern(['sponsor', 'program', 'user']) SURVEY_RECORD = namedIdBasedPattern(['sponsor', 'program', 'survey', 'user']) GRADING_RECORD = '/'.join([PROJECT, r'(?P<group>(\d+))', r'(?P<record>(\d+))']) PREFIXES = "(gsoc_program|gsoc_org)" DOCUMENT = url_patterns.DOCUMENT_FMT % PREFIXES ORG_DOCUMENT = url_patterns.ORG_DOCUMENT_FMT % PREFIXES
""" from django.conf.urls import url as django_url from soc.views.helper import url_patterns def url(regex, view, kwargs=None, name=None): """Constructs an url pattern prefixed with ^gci/. Args: see django.conf.urls.url """ return django_url('^gci/%s' % regex, view, kwargs=kwargs, name=name) class CIUrlPatternConstructor(url_patterns.UrlPatternConstructor): """Implementation of UrlPatternConstructor which constructs Code In-specific URL patterns prefixed with ^gci/. """ def construct(self, regex, view, kwargs=None, name=None): """See url_patterns.UrlPatternConstructor.construct for specification.""" return django_url('^gci/%s' % regex, view, kwargs=kwargs, name=name) CI_URL_PATTERN_CONSTRUCTOR = CIUrlPatternConstructor() TASK = url_patterns.namedIdBasedPattern(['sponsor', 'program']) PREFIXES = "(gci_program|gci_org)" DOCUMENT = url_patterns.DOCUMENT_FMT % PREFIXES ORG_DOCUMENT = url_patterns.ORG_DOCUMENT_FMT % PREFIXES