Re: Queying 3 tables in Django

2023-05-13 Thread _M_A_Y_A_N_K_
You could follow the steps below. - Create a view function that takes the search parameter as a keyword argument. - Use the QuerySet object to filter the Skill table by the search parameter. - Use the prefetch_related() method to load the Recruitment objects associate

Re: Django - PrePopulate the Foreign Key on the web page, and use that id to save the model.

2020-04-12 Thread _M_A_Y_A_N_K_
Cool, thanks Antje. Seems it is working now, the only thing is in Drop-down i will have the Project Name for which the URL is rest of the PRojects are removed from drop down. Now will work to have pre-selected. As of now it will default display as -- with only one required project name. Thank

Re:

2020-04-27 Thread _M_A_Y_A_N_K_
You can create a function based view or class based view (views.py) where you can have our own queryset to retrieve the data from database. And pass the same into the html. Thanks & Regards, - Mayank Tripathi "Do what you can, with what you have, where you are -by Theodore Roo

Re: Charts view function suggestions

2020-05-08 Thread _M_A_Y_A_N_K_
Hi Hajar, Though you have multiple model, the main thing is to create a queryset. Once you have a queryset (which can be from one model or multiple model).. you should be able to use that queryset for Pie-Charts or any other charts. Also try to use Django-Chart.js, which is much more easier i feel

Re: Can we use Database with Django without creating models

2020-05-25 Thread _M_A_Y_A_N_K_
Adding more details... I did tried *inspectdb, *but having other different issues with this. Here i want to purely use the legacy / existing database. Thanks & Regards, - Mayank Tripathi Mo. +1 615 962 2128 "Do what you can, with what you have, where you are -by Theodore Roosev

Re: Help Me!!

2020-06-08 Thread _M_A_Y_A_N_K_
Do you already have a python code for StopWatch...? If so then you can directly use that python code in your django view and send it to the HTML page. Playing with Button as Start / Stop can be done using HTML and (or) JavaScript. Let me know if you need help in python code for StopWatch. Hope th

Re: Python-django project

2020-07-23 Thread _M_A_Y_A_N_K_
Interested Thanks & Regards, - Mayank Tripathi Mo. +1 615 962 2128 "Do what you can, with what you have, where you are -by Theodore Roosevelt" On Thu, Jul 23, 2020 at 3:49 PM Himanshi Dhanwadhiya wrote: > Interested > > On Tue, 21 Jul, 2020, 8:39 am learn code, wrote: > >

Re: Two models one form, or use generic CreateView

2021-01-07 Thread _M_A_Y_A_N_K_
You could use InlineFormSet, which is designed specially to handle such problems. Refer to the documentations here https://docs.djangoproject.com/en/3.1/topics/forms/modelforms/#inline-formsets Here you could provide the primary model (in your case it will be CUstomUser), and the secondary model

Re: Django django_filters DateFilter customization

2021-01-22 Thread _M_A_Y_A_N_K_
Thanks Kasper, Will try the suggested option. Meanwhile, do you know how to get the documentation for danjo_filters DateFilter() method, and want to know what all parameters it can accept. Usually we do pass field_name; lookup_expr; label , just curious if we could pass *attrs *as we pass in for

Re: Django django_filters DateFilter customization

2021-01-22 Thread _M_A_Y_A_N_K_
Thanks Kasper, I utilized the suggestion you shared, and implemented it with a custom template tag, and now am able to restrict it. [image: image.png] Thanks & Regards, - Mayank Tripathi Mo. +1 615 962 2128 "Do what you can, with what you have, where you are -by Theodore Roos