yourlabs / django-autocomplete-light

A fresh approach to autocomplete implementations, specially for Django. Status: v4 alpha, v3 stable, v2 & v1 deprecated.
https://django-autocomplete-light.readthedocs.io
MIT License
1.8k stars 468 forks source link

HTTPS not working #180

Closed backbohne closed 11 years ago

backbohne commented 11 years ago

It seems that the JavaScript stuff is not working well together with HTTPS.

jpic commented 11 years ago

What do you mean ?

backbohne commented 11 years ago

I have a Django project where autocomplete is running fine. But when I try to run the same projects via HTTPS (means just the http://... has been changed to https://...) the autocomplete function is not working. I've just had a small look into the JavaScripts and there are some hard-coded "http:" strings.

jpic commented 11 years ago

Only in remote.js, are you using remote autocompletes ?

backbohne commented 11 years ago

Not sure. I just using autocompletes in admin views and Django restframework. Btw. just noticed that the restframework stuff is working fine, only the admin pages will not work under https. My admin.py looks like:

class CustomerForm(forms.ModelForm):
    city = forms.ModelChoiceField(required=True, queryset=models.AddressCity.objects.all(), widget=autocomplete_light.ChoiceWidget('AddressCityAutocomplete'))
    class Meta:
        model = models.Customer

class CustomerAdmin(AdminModel):
    list_display = ("mykey", "source", "customer_number", "customer_type", "short_name", "username", "customer_name", "city", "email", "customer_base", "is_active", "product_list")
    search_fields = ("mykey", "customer_number", "first_name", "last_name", "company_name", "short_name", "username")
    list_filter = ("source", "customer_base__base_name", "customer_type", "is_active", "is_reseller")
    readonly_fields = ('mykey',)
    list_select_related = True
    form = CustomerForm
jpic commented 11 years ago

Maybe 47224616fc57907935bbed fixes this. Could you try the last development version please ?

jpic commented 11 years ago

Fix released in 1.4.5. Could you please let me know how it goes ? Could you re-open if necessary ?

Thanks for your feedback !