Skip to content

Commit

Permalink
Add example
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoistinen committed Jun 8, 2015
1 parent 0ac05ac commit 5ae8734
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 5ae8734

Please sign in to comment.