Skip to content

v0.3.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@benmurden benmurden released this 20 Mar 06:08
· 8 commits to master since this release

Changes invocation of the widget removing auto_geo_ip and adding use_default_init=True.

There are too many possible valid implementations of the geoIpLookup feature in intl-tel-input, and it would be better left up to the developer to decide how to use it, so we have decided to no longer support a default implementation. To help developers implement their own initialization scripts, we have included a new option use_default_init, which will include the default implementation if True, and exclude it if False.

class MyForm(forms.Form):
    tel_number = forms.CharField(widget=IntlTelInputWidget(
        use_default_init=False
    ))

...

Now when you include {{ form.media.js }} in your template, you'll only get the standard intl-tel-input-jquery.min.js and no init.js. Copy the default init.js and modify according to your needs.