Hey Patric,
Have a look at stackoverflow.
https://stackoverflow.com/a/60273100/7063031
I used form_valid in the createview to get the form instance field, passed the
pk through the URL to the template, then used get_context in the view so the
template can get the pk from the URL. You’ll unde
bs class by Company_Name,
> by using a pk, is that working for you?
>
>
>
> Thanks
>
>
>> On Friday, February 14, 2020 at 10:19:04 PM UTC-5, Sam Hefer wrote:
>> Hi,
>>
>> I'm trying to figure out how to fill a form field in the background using
Bitbucket is great if you don’t like Git env. It has a great interface.
Thanks,
Sam
> On 15/02/2020, at 4:34 PM, Ram wrote:
>
>
> Hi,
>
> I'm currently having development server with Digital Ocean for our Django
> based web site. We are currently copying new code manually to project folder
Hi,
I'm trying to figure out how to fill a form field in the background using
form_valid. However, everything I've tried doesn't work.
As you can see in the model, there is a job field with a foreign key to
Job.
class JobDocket(models.Model):
EQUIPMENT_TYPE = (
('1', 'Air Conditio
0
I'm trying to build a form that automatically fills some fields in a class
based create view that lets logged in users create a Job. However, I can't
seem to find the correct way of doing this for fields that aren't the user
(eg. request.user).
So the create view is trying to get a company_n
Hi,
I'm trying to create a formset for a model that has multiple foreign keys
and many to many fields.
The goal is the be able to find an item in a pre-populated list of
Equipment and Material, select multiple items and add/change the quantity
of each item, inside the formset.
I realize that
;
>
> On Wednesday, January 1, 2020 at 5:02:13 PM UTC-5, Sam Hefer wrote:
>>
>> Hi,
>>
>> I'm having some issues with displaying a filtered list in a template.
>>
>> My View:
>>
>> class MyJobs(ListView):
>> model = Job
>>
Hi,
I'm having some issues with displaying a filtered list in a template.
My View:
class MyJobs(ListView):
model = Job
template_name = 'jobs/my_job_list.html'
context_object_name = 'jobs'
def get_queryset(self, *args, **kwargs):
jobs = Job.objects.filter(company_name__o
8 matches
Mail list logo