Skip to content
New issue

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

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

Already on GitHub? # to your account

ChainedManytoMany doesn't create a field in database to set data... #241

Closed
Jromero97 opened this issue Nov 17, 2017 · 2 comments
Closed

Comments

@Jromero97
Copy link

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

  1. I install smart_selects app
  2. Create a model to relate an organization and user
  3. The model should had a foreign key for both fields but i wanna do that a manytomany field show me all users in selected organization.

Actual behavior

class SampleModel(models.Model):
organization = models.ForeignKey(Organization)
user = ChainedManytoManyField(User, chained_field = 'organization',
chained_model_field='organization')

and it shows me the users in the organization, but it doesn't create a field on database of SampleMode with name user!

Expected behavior

I like that shows me on database a field with the selected users when I save the sample model...

@blag
Copy link
Collaborator

blag commented Nov 18, 2017

Please actually read GitHub's documentation on Markdown: https://help.github.com/articles/creating-and-highlighting-code-blocks

It makes your code much easier to read.

Please post all of your migrations (formatted with GFM).

@manelclos
Copy link
Member

No feedback, closing.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants