That limit is a default setting. You're free to change it to whatever value you want in your models. (See the docs for URLField <https://docs.djangoproject.com/en/4.1/ref/models/fields/#urlfield>)
On Friday, September 23, 2022 at 3:58:55 PM UTC-4 matthew.pava wrote: > Hello, > > I ran into an issue with a models.URLField because it limits the size of > the field to 200 characters. I find this too short to my use case. I have a > valid URL to an external website (in academia), and it won’t fit in the > Django URLField. > > > > This took me down a rabbit hole and this very good answer on Stack > Overflow: > > https://stackoverflow.com/a/417184/603819 > > > > Summary: > > 1. The HTTP protocol doesn’t place a limit on the number of characters. > 2. Modern browsers suggest not exceeding 2,000 characters. > > > > There are other details, such as the domain name not exceeding 255 > characters, but that is a different issue. > > > > Why does Django impose such a limit on URLField? Could we increase it to, > say, 2000 characters? Or even just remove the limitation on it? > > Thanks, > > Matthew > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/a42f7ebc-d6c3-4e57-8b23-03dad0e5f391n%40googlegroups.com.