Re: drop down multi checkbox with bootstraps selet
thank you for your help بتاريخ السبت، 18 مارس، 2017 6:58:07 م UTC+2، كتب ايهاب توفيق: > > I am tring to create drop down checkbox with values from database in my > templet using bootstrap select and form MultipleChoiceField like this > > > > Html > > select class="selectpicker" multiple> > > {% for topping in form.the_topping %} > > {{ topping.topping_id }} > > > > {% endfor %} > > > > > > > > $(document).ready(function() { > > $('.selectpicker').selectpicker({ > > style: 'btn-info', > > size: 4 > > }); > > }); > > > > Form.py > > *class *ProfileForm(forms.ModelForm): > the_topping = > forms.ModelMultipleChoiceField(queryset=Topping.objects.all(), > required=*False*, widget=forms.CheckboxSelectMultiple) > > *class *Meta: > model = Pizza > exclude = [*'user'*] > > > > the bootstrp working and the form is working but doesnot combined > > > > can any one help me PLS > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ef81db93-c69b-427c-bd0e-c69ec75bd9a6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
drop down multi checkbox with bootstraps selet
I am tring to create drop down checkbox with values from database in my templet using bootstrap select and form MultipleChoiceField like this Html select class="selectpicker" multiple> {% for topping in form.the_topping %} {{ topping.topping_id }} {% endfor %} $(document).ready(function() { $('.selectpicker').selectpicker({ style: 'btn-info', size: 4 }); }); Form.py *class *ProfileForm(forms.ModelForm): the_topping = forms.ModelMultipleChoiceField(queryset=Topping.objects.all(), required=*False*, widget=forms.CheckboxSelectMultiple) *class *Meta: model = Pizza exclude = [*'user'*] the bootstrp working and the form is working but doesnot combined can any one help me PLS -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/27867c6f-995f-4d44-8980-6957e26f002b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: file fields
thank you for your help I solve the problem and it working بتاريخ الخميس، 26 يناير، 2017 1:04:28 ص UTC+2، كتب ايهاب توفيق: > > I am new in django and to know how to use multiple file field in the same > model can any one help me > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7bcfd585-79a5-4297-8cd2-0557ff3238de%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: file fields
hi this backtrace Performing system checks... System check identified no issues (0 silenced). Unhandled exception in thread started by .wrapper at 0x036B8588> Traceback (most recent call last): File "C:\Users\e.bugaighis\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper fn(*args, **kwargs) File "C:\Users\e.bugaighis\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\management\commands\runserver.py", line 117, in inner_run self.check_migrations() File "C:\Users\e.bugaighis\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\management\commands\runserver.py", line 163, in check_migrations executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS]) File "C:\Users\e.bugaighis\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\db\migrations\executor.py", line 20, in __init__ self.loader = MigrationLoader(self.connection) File "C:\Users\e.bugaighis\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\db\migrations\loader.py", line 49, in __init__ self.build_graph() File "C:\Users\e.bugaighis\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\db\migrations\loader.py", line 170, in build_graph self.load_disk() File "C:\Users\e.bugaighis\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\db\migrations\loader.py", line 105, in load_disk migration_module = import_module("%s.%s" % (module_name, migration_name)) File "C:\Users\e.bugaighis\AppData\Local\Programs\Python\Python35-32\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 986, in _gcd_import File "", line 969, in _find_and_load File "", line 958, in _find_and_load_unlocked File "", line 673, in _load_unlocked File "", line 665, in exec_module File "", line 222, in _call_with_frames_removed File "C:\Users\e.bugaighis\Desktop\ehab\test001\migrations\0007_auto_20161213_1444.py", line 9, in class Migration(migrations.Migration): File "C:\Users\e.bugaighis\Desktop\ehab\test001\migrations\0007_auto_20161213_1444.py", line 19, in Migration field=models.FileField(blank=True, null=True, storage=django.core.files.storage.FileSystemStorage(location=('C:\\Users\\e.bugaighis\\Desktop\\ehab\\media',)), upload_to='/media/'), File "C:\Users\e.bugaighis\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\files\storage.py", line 185, in __init__ self.location = abspathu(self.base_location) File "C:\Users\e.bugaighis\AppData\Local\Programs\Python\Python35-32\lib\ntpath.py", line 535, in abspath path = _getfullpathname(path) TypeError: _getfullpathname: illegal type for path parameter بتاريخ الخميس، 26 يناير، 2017 1:04:28 ص UTC+2، كتب ايهاب توفيق: > > I am new in django and to know how to use multiple file field in the same > model can any one help me > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/99a9c6a2-2019-4b71-8542-1710bb9ebff7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: file fields
this the error that keep coming up TypeError: _getfullpathname: illegal type for path parameter بتاريخ الخميس، 26 يناير، 2017 1:04:28 ص UTC+2، كتب ايهاب توفيق: > > I am new in django and to know how to use multiple file field in the same > model can any one help me > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ce05b6ca-a5fa-468e-8230-a501e9239a91%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: file fields
Thank you for your reply and I try the fixed model but the problem with the view that I use to store the files from templets to the db I followed the django documents as *def *custmoer(request): *if *request.method == *'POST'*: form = CustomerForm(request.POST, request.FILES) *if *form.is_valid(): form.save() *return *HttpResponseRedirect(*'/login/custmoer/'*) *else*: *return *HttpResponseRedirect(*'/login'*) *else*: form= CustomerForm() *return *render(request, *"custmoer.html"*, {*'form'*:form}) this will work if it one file filed but for more than one will give erro I don’t know how to fix this بتاريخ الخميس، 26 يناير، 2017 1:04:28 ص UTC+2، كتب ايهاب توفيق: > > I am new in django and to know how to use multiple file field in the same > model can any one help me > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9edfcc46-e3e6-4ce7-a7ff-8ca12ed16ec8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
file fields
I am new in django and to know how to use multiple file field in the same model can any one help me -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/da76e41d-1975-4371-b91d-4eedd9ba9a96%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.