Ticket #3226: settings.diff
File settings.diff, 832 bytes (added by , 18 years ago) |
---|
-
settings.txt
157 157 158 158 Default: ``{}`` (Empty dictionary) 159 159 160 A dictionary mapping ``"app_label.mod ule_name"`` strings to functions that take160 A dictionary mapping ``"app_label.model_name"`` strings to functions that take 161 161 a model object and return its URL. This is a way of overriding 162 162 ``get_absolute_url()`` methods on a per-installation basis. Example:: 163 163 164 164 ABSOLUTE_URL_OVERRIDES = { 165 'blogs. blogs': lambda o: "/blogs/%s/" % o.slug,166 'news. stories': lambda o: "/stories/%s/%s/" % (o.pub_year, o.slug),165 'blogs.Weblog': lambda o: "/blogs/%s/" % o.slug, 166 'news.Story': lambda o: "/stories/%s/%s/" % (o.pub_year, o.slug), 167 167 } 168 168 169 169 ADMIN_FOR