jasonyates / netbox-documents

Plugin to manage site, circuit and device diagrams and documents in Netbox
Apache License 2.0
131 stars 20 forks source link

Bug: External URL Limited to 200 Characters #37

Closed JLawrence14 closed 11 months ago

JLawrence14 commented 1 year ago

When adding an external URL as a document there appears to be a character limit on the URL Field. After checking the Django documentation, the URLField has a default character limit of 200 (https://docs.djangoproject.com/en/4.2/ref/models/fields/#urlfield) Can this be increased? We have URLs coming from a SharePoint repository which tend to be longer than 200 characters.

Your operating system name and version - Ubuntu 18.04, Docker version 24.0.1, build 6802122, NetBox 3.4 & 3.5

Any details about your local setup that might be helpful in troubleshooting - Running NetBox-Docker with a NetBox-Plugin image setup.

Detailed steps to reproduce the bug:

  1. Go to Documents
  2. Add new device document
  3. Change to External URL
  4. Add a URL that is over the default 200 characters
  5. The URL should be cut short when too long. Once saved you can still click it but won't work as the URL is incomplete
jasonyates commented 11 months ago

The django URLField has a max length of 255 as it is based on a CharField. I've increased the max length to 255 in the latest release.