- Removed a unneeded installation time requirement for Django <= 1.4.
- Removed the use of versiontools due to unwanted installation time side effects.
- Refactored tests slightly.
- Added
~django_hosts.callbacks.cached_host_site
callback which stores the matching~django.contrib.sites.models.Site
instance in the default cache backend (also see new~django.conf.settings.HOST_SITE_TIMEOUT
setting). - Throw warning if django-debug-toolbar is used together with the
django_hosts
and the order of theMIDDLEWARE_CLASSES
setting isn't correct. - Added CI server at https://ci.enn.io/job/django-hosts/
- Added ability to
save the result<asvar>
of~django_hosts.templatetags.hosts.host_url
template tag in a template context variable.
- Consolidated reversal internals.
- Removed unfinished support for the Django Debug Toolbar.
- Added a custom callback which uses Django's sites app to retrieve a
Site
instance matching the current host, settingrequest.site
. - Extended tests dramatically (100% coverage).
- Added docs at http://django-hosts.rtfd.org
- Stopped preventing the name 'default' for hosts.
- Fixed issue related to the
PARENT_HOST
setting when used with empty host patterns. - Stopped automatically emulating hosts in debug mode.
BACKWARDS INCOMPATIBLE Renamed the package to
django_hosts
Please change your import from:
from hosts import patterns, hosts
to:
from django_hosts import patterns, hosts
BACKWARDS INCOMPATIBLE Changed the data type that the
django_hosts.patterns
function returns to be a list instead of a SortedDict to follow conventions of Django's URL patterns. You can use that for easy extension of the patterns, e.g.:from django_hosts import patterns, host from mytemplateproject.hosts import host_patterns host_patterns += patterns('', host('www2', 'mysite.urls.www2', name='www2') )
- Extended tests to have full coverage.
- Fixed prefix handling.
- Fixed docs issues.
- Use absolute imports where possible.
- Initial release with middleware, reverse and templatetags.