is_safe_url() got an unexpected keyword argument 'host' #2086

Closed
opened 2025-12-29 17:22:09 +01:00 by adam · 1 comment
Owner

Originally created by @jkjuopperi on GitHub (Nov 3, 2018).

Environment

  • Python version: 3.6.6
  • NetBox version: develop-2.5 66ef5c726c

develop-2.5 branch.

Steps to Reproduce

Install requirements in requirements.txt (Django 2.1.3), start Netbox and try to log in.

Expected Behavior

Should work

Observed Behavior

Gives error:
is_safe_url() got an unexpected keyword argument 'host'

Cause

Django's is_safe_url function contract has changed. 'host' parameter is now 'allowed_hosts' and accepts either a string or a list of strings.

Originally created by @jkjuopperi on GitHub (Nov 3, 2018). ### Environment * Python version: 3.6.6 * NetBox version: develop-2.5 66ef5c726c17fff57239d06ebc2ee6eeafe6e9bf develop-2.5 branch. ### Steps to Reproduce Install requirements in requirements.txt (Django 2.1.3), start Netbox and try to log in. ### Expected Behavior Should work ### Observed Behavior Gives error: is_safe_url() got an unexpected keyword argument 'host' ### Cause Django's is_safe_url function contract has changed. 'host' parameter is now 'allowed_hosts' and accepts either a string or a list of strings.
adam added the type: bugstatus: accepted labels 2025-12-29 17:22:09 +01:00
adam closed this issue 2025-12-29 17:22:09 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 5, 2018):

Thanks for the PR!

@jeremystretch commented on GitHub (Nov 5, 2018): Thanks for the PR!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2086