Applies to other fields as well as `URLField`.
Use something like...

    max_length = getattr(model_field, 'max_length', None)
    if max_length is not None:
        kwargs['max_length'] = max_length

Also needs a test to catch any regressions.