Ticket #3226: settings.diff

File settings.diff, 832 bytes (added by James Bennett, 18 years ago)

Patch to change to correct example

  • settings.txt

     
    157157
    158158Default: ``{}`` (Empty dictionary)
    159159
    160 A dictionary mapping ``"app_label.module_name"`` strings to functions that take
     160A dictionary mapping ``"app_label.model_name"`` strings to functions that take
    161161a model object and return its URL. This is a way of overriding
    162162``get_absolute_url()`` methods on a per-installation basis. Example::
    163163
    164164    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),
    167167    }
    168168
    169169ADMIN_FOR
Back to Top