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

New Widget against payment #783

Open
Bastilla123 opened this issue Apr 13, 2021 · 0 comments
Open

New Widget against payment #783

Bastilla123 opened this issue Apr 13, 2021 · 0 comments

Comments

@Bastilla123
Copy link

Hello,

i need a new widget that generate in template a nested multiselect list view like this:

https://www.jqueryscript.net/demo/Tree-Generator-jQuery-Bonsai/

on submit all entrys are saved.

Models.py:

from django.db import models
from mptt.models import MPTTModel, TreeForeignKey

class Properties(MPTTModel):
name = models.CharField(max_length=32)
parent = TreeForeignKey('self', on_delete=models.CASCADE, null=True, blank=True, related_name='children')

def __str__(self):
    return self.name

class MPTTMeta:
    order_insertion_by = ['name']

class Address(models.Model):
id = models.AutoField(primary_key=True)
properties_link = models.ManyToManyField(Properties, blank=True, default=None,)

forms.py:

from django import forms
from .widget import nestedmultiselectfield

class Addressform(forms.ModelForm):
class Meta:
fields = ('properties_link')
widgets = {'homepage':nestedmultiselectfield()}

Can someone implement this nestedmultiselectfield widget? I will pay for this.

Regards

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

1 participant