Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django docs don't cover a through-model case #325

Open
Klexus1 opened this issue Feb 11, 2021 · 2 comments
Open

Django docs don't cover a through-model case #325

Klexus1 opened this issue Feb 11, 2021 · 2 comments

Comments

@Klexus1
Copy link

Klexus1 commented Feb 11, 2021

You MUST use this template when reporting issues. Please make sure you follow the checklist and fill in all of the information sections below.


All versions of django-smart-selects prior to version 1.2.8 are vulnerable to an XSS attack as detailed in issue 171. As a result, all previous versions have been removed from PyPI to prevent users from installing insecure versions. All users are urged to upgrade as soon as possible.

Checklist

Put an x in the bracket when you have completed each task, like this: [x]

  • [x ] This issue is not about installing previous versions of django-smart-selects older than 1.2.8. I understand that previous versions are insecure and will not receive any support whatsoever.
  • [x ] I have verified that that issue exists against the master branch of django-smart-selects.
  • [x ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • [ x] I have debugged the issue to the smart_selects app.
  • [ x] I have reduced the issue to the simplest possible case.
  • [ x] I have included all relevant sections of models.py, forms.py, and views.py with problems.
  • [ x] I have used GitHub Flavored Markdown to style all of my posted code.

Steps to reproduce

Actual behavior

Expected behavior

For the following case, there is no hint how to handle a through model. Example:

class Continent(models.Model):
name = models.CharField(max_length=255)

class Country(models.Model):
continent = models.ManyToMany(Continent, through='CountryToContinent")
name = models.CharField(max_length=255)

class CountryToContinent(models.Model):
continent = models.ForeignKey(Continent)
name = models.ForeignKey(Country)

class Location(models.Model):
continent = models.ForeignKey(Continent)
country = models.ForeignKey(Country)
area = models.ForeignKey(Area)
city = models.CharField(max_length=50)
street = models.CharField(max_length=100)

@zubus
Copy link

zubus commented Apr 13, 2021

could you solve it?

@Klexus1
Copy link
Author

Klexus1 commented Apr 13, 2021

I did not, I started to use custom templates with jquery ajax requests instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants