Can not edit foreign key field in Django admin and pop-up form is not really popping up

992 views Asked by At

I am using Django-suit for admin panel. My 'user' model has 'address' and 'contact' fields as foreign key. When trying to change the user's info, the address and contact fields has change/edit and add new options beside them. But the change/edit option remains disabled (see image).

Besides, when I click on add new icon, a new form window is supposed to pop-up. But instead it take me to the form in same browser tab. Any insight for solving this problem?

1

There are 1 answers

0
Reaz Abedin On BEST ANSWER

After getting question from @Efi MK, I tried once again to dig into the problem, and found my mistake with the help from this post (Django admin add related object doesn't open popup window?).

The main project was previously implemented using Django-1.6. I was extending the project by adding some new features using Django-1.11. The problem is, the static files I was using for Django-admin, were from previous version. The 'collectstatic' command didn't replace those files from previous version which has same name as new version. Unfortunately, I didn't notice that.

I deleted whole 'static' folder, ran 'collectstatic' again, and both of the problems mentioned in the question were solved. Thanks, Efi for asking :)