assem-ch / django-jet-reboot

Legacy Django jet rebooted to support Django > 3 (4 and 5), and latest python releases
https://django-jet-reboot.readthedocs.io/
GNU Affero General Public License v3.0
420 stars 68 forks source link

Connection refused by localhost when trying to add a foreign key model inside a model #48

Closed rust-floppy closed 2 years ago

rust-floppy commented 2 years ago

I have 2 models, one has a foreign key pointing to the other model. When I press "Add item" in the first model, I can press the plus button next to the foreign key field to add another to that model, but when I click it, it says "Connection refused by localhost".

`class Currency(models.Model): name = models.CharField(max_length=200, null=False, blank=False)

class Item(models.Model): name = models.CharField(max_length=200, verbose_name="Megnevezés", blank=False) curr = models.ForeignKey(Currency, max_length=50, blank=False, on_delete=models.CASCADE) `

screenshot: https://imgur.com/a/f1AFAY1

Django version: 4.0.6 jet version: newest.

alejandroacho commented 2 years ago

Hi @adhdisdev,

Can you try to add this to your Jet settings file: X_FRAME_OPTIONS = "ALLOWALL"

This worked for me, as you can see in this PR.

rust-floppy commented 2 years ago

Oh, yes it works! Thank you!

Is it possible for the dev to put this in the readme? Would be a great timesaver!