Remove gratuitous restrictions on bug_tracker URLs

Review Request #520 — Created Aug. 31, 2008 and submitted

Information

Review Board SVN (deprecated)
628

Reviewers

Django's URLField is fairly strict in the kinds of URLs it allows. For example, it fails to allow domain-less (internal) hostnames; see http://code.djangoproject.com/ticket/7969. Based on django tickets, it also prevents some other useful real-world URLs.

Since the bug tracker URL is controlled by the administrator, and internal sites may face working with legacy system integration, I propose removing the URL validation by switching to CharField.

Not covered in this patch is altering django's source to fix url_re in Django's source (url_re in django/forms/fields.py line 523).
None (I modified the database directly, which worked for my internal installation's needs)
david
  1. This change looks okay, but I'm concerned about migrations.  Does this work with ./manage.py evolve?
    1. I can't test it locally, since I did not use the provided patch locally.
    2. It won't. The field type changes and it will cause a problem.
      
      You'll have to do something like in diffviewer/evolutions/add_parent_diffs.py (with the FakeChangeFieldType).
      
      I'd also much rather see a URIField implemented (in Djblets) than to use a CharField here.
    3. Any update on this?
    4. Nothing from me. I fixed it on our site as I mentioned before. I've seen no ill effects from inserting my non-conforming URL directly using the command-line sqlite client. I don't yet have the resources (time, mostly) to stand up another testing instance and try to meet your suggestions.
      
      If you want to close this until someone steps up (or I find some time), I'll understand.
    5. Just a heads-up on where this stands.
      
      I'm ready to commit this, but we require some work in Django Evolution first. We need a good solution over there for when a field type's class is changing when the field type itself is generally the same. We're investigating possibilities. After we have a solution, I'll commit this.
    6. Submitted in r1571. Thanks!
  2.