Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class JobForm(ModelForm):
- class Meta:
- fields= '__all__'
- model = Job
- widgets = {
- 'job_description': Textarea(attrs={'cols': 40, 'rows': 8}),
- 'job_requirements': Textarea(attrs={'cols': 40, 'rows': 12}),
- }
- def __init__(self, user=None,*args,**kwargs):
- super(JobForm, self).__init__(*args,**kwargs)
- if user:
- self.fields['job_company'].queryset = Company.objects.filter(user=user)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement