Export HTML template filled by form to HTML file

2019-10-31 Thread Valentin Jungbluth
I have a template page on which one I access when I filled my `Django form`. This page is a simple `HTML page` with data coming from my form. I would like to be able to download the filled template. That's to say, get a browser window which let to download the template or by clicking on a

Write queryset containing request from middleware outside of django's views

2019-05-21 Thread valentin jungbluth
Hello guys, I have a little question about request attribute in my function located in a menu.py file (not my view): def list_of_edition(request): """ Return list of editions :return queryset """ instance = NavbarMenuSettings.objects.filter(application=request.cur_app ,

^Django build_absolute_uri() issue : double slashes in url

2019-02-22 Thread valentin jungbluth
Hello guys, I'm using build_absolute_uri() in order to create the beginning of my download link which is sent by email. I'm working with django 1.11.20 *My code :* I have in my code, this view which let to create my url : class FileExport(View): def my_export(self, request,

Re: Create a Celery task with Django

2019-02-13 Thread valentin jungbluth
Thank you Andréas ! I understand your comment, but it could be possible to illustrate it with my code ? I spent 1 week and up to now I don't find any way to solve my issue and execute my Celery task :/ -- You received this message because you are subscribed to the Google Groups "Django

Create a Celery task with Django

2019-02-13 Thread valentin jungbluth
Hello guys, I'm working on my Django project and I need to integrate Celery to do something. I'm using Django 1.11.20. *My context :* I have a template page with a search form. Once you did a search, it returns a table with search results. It's possible to export to .xls format with/without

Re: Loop over Django objects and Bootstrap cards

2019-01-03 Thread valentin jungbluth
I used UploadField so I just have to use {{ object.fieldname.url }} and it works. But my question is : How I can gather all documents according to one publication in one card ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: ModelMultipleChoiceField doesn't display objects

2018-12-12 Thread valentin jungbluth
I don't use my form to ModelAdmin part, so to my mind it shouldn't solve my issue ? Le mercredi 12 décembre 2018 15:55:30 UTC+1, valentin jungbluth a écrit : > > Hello guys, > > I would like to use *ModelMultipleChoiceField* with > *ModelSelect2MultipleWidget* in order to dis

ModelMultipleChoiceField doesn't display objects

2018-12-12 Thread valentin jungbluth
Hello guys, I would like to use *ModelMultipleChoiceField* with *ModelSelect2MultipleWidget* in order to display a dropdown list with my widget. If I write this : publication_list = forms.ModelMultipleChoiceField(queryset=Publication. objects.all().order_by('pub_id')) It displays my

Iterate over objects in HTML template doesn't work well

2018-12-12 Thread valentin jungbluth
I would like to get your help in order to display objects choosen by user and get some querysets according to each object. I'm working with django 1.11.16 on this project. *Context :* User has to choice some things : - Start date - End date - One or several publication(s) Then, it