From 5ae8734e246e2cdbeb38f7c254f2a2bb8b09a1e9 Mon Sep 17 00:00:00 2001 From: Martin Koistinen Date: Mon, 8 Jun 2015 16:52:02 -0400 Subject: [PATCH] Add example --- README.rst | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 1034cb7b..ee4d67ab 100644 --- a/README.rst +++ b/README.rst @@ -45,12 +45,17 @@ To support environments where non-standard URLs would otherwise work, this project supports the defining of an additional RegEx pattern for validating the host-portion of the URL. -For example: +For example: :: - RFC1123 Pattern - DJANGOCMS_LINK_INTRANET_HOSTNAME_PATTERN = r'[a-z,0-9,-]{1,15}' - NetBios Pattern - DJANGOCMS_LINK_INTRANET_HOSTNAME_PATTERN = r'[a-z,0-9,!@#$%^()\\-\'{}.~]{1,15}' + RFC1123 Pattern: + DJANGOCMS_LINK_INTRANET_HOSTNAME_PATTERN = r'[a-z,0-9,-]{1,15}' + + NetBios Pattern: + DJANGOCMS_LINK_INTRANET_HOSTNAME_PATTERN = r'[a-z,0-9,!@#$%^()\\-\'{}.~]{1,15}' + +Either of these might accept a URL such as: :: + + http://SEARCHHOST/?q=some+search+string If left undefined, the normal Django URLValidator will be used.