@@ -0,0 +1,1366 @@
+#!/usr/bin/env python2.5%0A#%0A# Copyright 2011 the Melange authors.%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#   http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A%0A%22%22%22Module for constructing core URL patterns%0A%22%22%22%0A%0A__authors__ = %5B%0A  '%22Madhusudan.C.S%22 %3Cmadhusudancs@gmail.com%3E',%0A  %5D%0A%0A%0Afrom soc.models import linkable%0A%0Adef captureLinkId(name):%0A  %22%22%22Returns a capture group for a link id with the specified name.%0A  %22%22%22%0A  return r'(?P%3C%25s%3E%25s)' %25 (name, linkable.LINK_ID_PATTERN_CORE)%0A%0A%0Adef namedLinkIdPattern(names):%0A  %22%22%22Returns a link ID pattern consisting of named parts.%0A%0A  The returned pattern does not start or end with a /, the parts are however%0A  concatenated with a /.%0A%0A  Args:%0A    names: The names that should be given to the different parts.%0A  %22%22%22%0A  named_patterns = %5B%5D%0A  for name in names:%0A    named_patterns.append(captureLinkId(name))%0A%0A  return r'/'.join(named_patterns)%0A%0A%0AUSER = namedLinkIdPattern(%5B'link_id'%5D)%0A

Add a url_pattern module for soc core views.