web/views/urlpublishing.py
changeset 2293 7ded2a1416e4
parent 2058 7ef12c03447c
parent 2273 daf6e178659f
child 2650 18aec79ec3a3
--- a/web/views/urlpublishing.py	Thu Jul 02 10:36:25 2009 +0200
+++ b/web/views/urlpublishing.py	Mon Jul 06 19:55:18 2009 +0200
@@ -144,18 +144,12 @@
         <etype>[[/<attribute name>]/<attribute value>]*
     """
     priority = 2
-    def __init__(self, urlpublisher):
-        super(RestPathEvaluator, self).__init__(urlpublisher)
-        self.etype_map = {}
-        for etype in self.schema.entities():
-            etype = str(etype)
-            self.etype_map[etype.lower()] = etype
 
     def evaluate_path(self, req, parts):
         if not (0 < len(parts) < 4):
             raise PathDontMatch()
         try:
-            etype = self.etype_map[parts.pop(0).lower()]
+            etype = self.vreg.case_insensitive_etypes[parts.pop(0).lower()]
         except KeyError:
             raise PathDontMatch()
         cls = self.vreg.etype_class(etype)