1

I'm using the following code to change a standard implementation of profiles with userena:

from django import forms
from django.utils.translation import ugettext_lazy as _

from userena.forms import EditProfileForm
import autocomplete_light
import userena

from accounts.models import MyProfile

class CustomEditProfileForm(autocomplete_light.ModelForm, EditProfileForm):
    """ Base form used for fields that are always required """
    class Media:
        js = ('dependant_autocomplete.js')

    class Meta:
        exclude = ('user',)
        model = MyProfile

        widgets = autocomplete_light.get_widgets_dict(MyProfile)

so far I came across two problems.

One is that the javascript is being ignored. The other is that this override is showing a dropdown with a full list of the site's users.

What am I missing?

EDIT: Still don't know what was causing the js variable to be ignored. Worked around it by adding the required javascript on the editprofile template.

Bruno Amaral
  • 169
  • 1
  • 12

0 Answers0