lafferc
lafferc

Reputation: 2769

Django 1.8 admin, blank page displayed after save on popup

I'm using Django 1.8.

When I click the + link on a foreign key to add a model I'm redirected to

admin/Language/dictionary/add/?_to_field=id&_popup=1

Edit:[ This is where the problem is, I'm being redirected. I've looking at a different project running Django 1.7 and the + link produces a new popup window.]

The page is shown correctly and I can save the model to the database successfully. When I click save I'm redirected to

admin/Language/dictionary/add/?_to_field=id&_popup=1

and the page is blank

I am not using grappelli or any other external app.

How can I fix this ?

Why is the redirect to the same link and not back to the model I clicked the + sign from ?

Edit: The page I get back has the following code

<html>
  <head><title></title></head>
  <body>
    <script type="text/javascript">
        opener.dismissAddRelatedObjectPopup(window, "7", "Test2");
    </script>
  </body>
</html>

With a Javascript Error:

Uncaught TypeError: Cannot read property 'dismissAddRelatedObjectPopup' of null

Upvotes: 2

Views: 1628

Answers (1)

lafferc
lafferc

Reputation: 2769

The javascript that creates the popups has changed between 1.6 and 1.8. The problem was that the static files that were being served were from Django 1.6. I deleted the old static files and made sure that the new files are being served.

If your having the same problem be sure to clear you cached data in your browser, and verify that the static files are in the right location.

Thank you @sthzg for your help.

Upvotes: 3

Related Questions