Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove requirement for fully-qualified domains in custom URL fields #1460

Closed
kopacko opened this issue Aug 30, 2017 · 1 comment
Closed

Remove requirement for fully-qualified domains in custom URL fields #1460

kopacko opened this issue Aug 30, 2017 · 1 comment
Labels
type: feature Introduction of new functionality to the application

Comments

@kopacko
Copy link

kopacko commented Aug 30, 2017

Issue type

[ ] Feature request
[x] Bug report
[ ] Documentation

Environment

  • Python version:
  • NetBox version: 2.1.2

Description

I created a custom field URL to point do a devices repository for configuration backups as well as to a direct REST API link from my Cisco Prime Infrastructure servers. One thing I noticed is that you have to supply a FQDN for the custom field. We have our internal domains as our search domain and I believe this field should be able to accept that form of short-hand.

For example: https://ciscoprime.domain.com (currently required)

Internally domain.com is the given search domain so https://ciscoprime (should be acceptable by this field)

I could not find any previous issues directly referencing this issue. If they exist, I apologize now.

@jeremystretch
Copy link
Member

Validation of the URL is performed using Django's built-in URLValidator, which seems to enforce a domain name and TLD. We've already implemented our own URLField too allow for arbitrary schemes. It probably makes sense to ditch the built-in validator in favor of something more flexible.

@jeremystretch jeremystretch changed the title Custom Field URL Issue Remove requirement for fully-qualified domains in custom URL fields Aug 30, 2017
@jeremystretch jeremystretch added the type: feature Introduction of new functionality to the application label Aug 30, 2017
lampwins pushed a commit to lampwins/netbox that referenced this issue Oct 13, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants