Thank you so mach!
четверг, 4 февраля 2021 г. в 14:13:24 UTC-1, wne...@gmail.com:
> https://riptutorial.com/django/example/16667/one-view--multiple-forms
> https://pylab.ru/django-dve-formy-v-odnom-view/
>
>
> четверг, 4 февраля 2021 г. в 16:44:54 UTC+3, soko...@gmail.com:
>
>> Hi, I have same
https://riptutorial.com/django/example/16667/one-view--multiple-forms
https://pylab.ru/django-dve-formy-v-odnom-view/
четверг, 4 февраля 2021 г. в 16:44:54 UTC+3, soko...@gmail.com:
> Hi, I have same problem.
> I am doing same like did you but it doesnt work. POST doesnt work.
> Could you pleas
Hi, I have same problem.
I am doing same like did you but it doesnt work. POST doesnt work.
Could you please hrlp me with it?
среда, 6 мая 2020 г. в 12:47:00 UTC-1, adigun...@gmail.com:
> You are welcome.
>
> I'm happy to help
>
--
You received this message because you are subscribed to the Go
You are welcome.
I'm happy to help
--
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 view this discussion on the web
Thank you very much!!
You are best!!!
среда, 6 мая 2020 г., 15:09:39 UTC+2 пользователь Sherif Adigun написал:
>
> https://us04web.zoom.us/j/79500561313?pwd=TnIzekVTMU0xRDNsaGpaS0kxQlhTdz09
>
>
> JOIN NOW
>
--
You received this message because you are subscribed to the Google Groups
"Django
https://us04web.zoom.us/j/79500561313?pwd=TnIzekVTMU0xRDNsaGpaS0kxQlhTdz09
JOIN NOW
--
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...@go
;> среда, 6 мая 2020 г., 12:00:13 UTC+2 пользователь Sherif Adigun написал:
>>>
>>> Please join the meeting now let's quickly fix it .
>>>
>>>
>>> https://us04web.zoom.us/j/77729655336?pwd=c1o2Q0JQOFJiYm5hTlJTYjgra0dOQT09
>>>
>>> On Monda
quickly fix it .
>>
>> https://us04web.zoom.us/j/77729655336?pwd=c1o2Q0JQOFJiYm5hTlJTYjgra0dOQT09
>>
>> On Monday, May 4, 2020 at 4:37:39 PM UTC+1, Sergei Sokov wrote:
>>>
>>> I have two forms in one template, but one of them doesn't have data to
>&g
y 4, 2020 at 4:37:39 PM UTC+1, Sergei Sokov wrote:
>>
>> I have two forms in one template, but one of them doesn't have data to
>> my database.
>> Why does it happen and how to fix it?
>>
>> When I fill out the Pack form and press "submit" the term
Please join the meeting now let's quickly fix it .
https://us04web.zoom.us/j/77729655336?pwd=c1o2Q0JQOFJiYm5hTlJTYjgra0dOQT09
On Monday, May 4, 2020 at 4:37:39 PM UTC+1, Sergei Sokov wrote:
>
> I have two forms in one template, but one of them doesn't have data to my
> data
my zoom
Sergey Sokov
среда, 6 мая 2020 г., 10:37:42 UTC+2 пользователь Sergei Sokov написал:
>
> I can but my english is very bad.
>
> среда, 6 мая 2020 г., 10:08:47 UTC+2 пользователь Sherif Adigun написал:
>>
>> Can you come to zoom so we fix this ones and for all
>>
>> On Wed, May 6, 2020, 8:13
I can but my english is very bad.
среда, 6 мая 2020 г., 10:08:47 UTC+2 пользователь Sherif Adigun написал:
>
> Can you come to zoom so we fix this ones and for all
>
> On Wed, May 6, 2020, 8:13 AM Sergei Sokov >
> wrote:
>
>> [image: kwargs.JPG]
>> But the form is empty.
>>
>> class SkladCreateVi
Can you come to zoom so we fix this ones and for all
On Wed, May 6, 2020, 8:13 AM Sergei Sokov wrote:
> [image: kwargs.JPG]
> But the form is empty.
>
> class SkladCreateView(LoginRequiredMixin, CustomSuccessMessageMixin,
> CreateView):
> model = Sklad
> template_name = 'sklad.html'
>
[image: kwargs.JPG]
But the form is empty.
class SkladCreateView(LoginRequiredMixin, CustomSuccessMessageMixin,
CreateView):
model = Sklad
template_name = 'sklad.html'
form_class = SkladForm
success_url = reverse_lazy('sklad')
success_msg = 'Материал сохранён'
def get_co
Please remove
if pack_form.is_valid():
pack_form.instance = self.object
pack_form.save()
And replace with print(pack_form)
Then let's see what it's printing in the console
On Tue, May 5, 2020, 8:30 PM Sergei Sokov wrote:
> I have this error when I try save data for
I have this error when I try save data for SkladForm, when I press submit
Request Method: POST
Request URL: http://192.168.0.249:8000/sklad
Django Version: 3.0.5
Exception Type: KeyError
Exception Value:
'pack_form'
Exception Location: /var/workspace/myp4/webprint/print/views.py in
form_valid,
>
> you have two returns in get_Context_data. use only this
>
def get_context_data(self, **kwargs):
context = super(SkladCreateView, self).get_context_data(**kwargs)
if self.request.POST:
context['pack_form'] = PackForm(self.request.POST)
else:
con
Thank you for answer.
I have this error when I try save data for SkladForm, when I press submit
Request Method: POST
Request URL: http://192.168.0.249:8000/sklad
Django Version: 3.0.5
Exception Type: KeyError
Exception Value:
'pack_form'
Exception Location: /var/workspace/myp4/webprint/print/vie
Try this code. Instead of using kwargs[], context is most common.
class SkladCreateView(LoginRequiredMixin, CustomSuccessMessageMixin,
CreateView):
model = Sklad
template_name = 'sklad.html'
form_class = SkladForm
success_url = reverse_lazy('sklad')
success_msg = 'Материал сохранён'
def g
I guessed about it.
But I dont know how to do that.
понедельник, 4 мая 2020 г., 18:42:10 UTC+2 пользователь Sherif Adigun
написал:
>
> Your code is working perfectly. Just that you need to remember that the
> view has its model set to Sklad. Hence, when you called super() on
> form_valid, only
Your code is working perfectly. Just that you need to remember that the view
has its model set to Sklad. Hence, when you called super() on form_valid, only
the Skald instance is saved.
You need to manually save the Pack form in the form_valid method.
--
You received this message because you a
I have two forms in one template, but one of them doesn't have data to my
database.
Why does it happen and how to fix it?
When I fill out the Pack form and press "submit" the terminal shows that:
"POST" /sklad HTTP/1.1" 200 9937
This data doesn't save to my d
Thank you so much!
среда, 15 ноября 2017 г., 6:29:57 UTC+3 пользователь Mike Ru написал:
>
> How can I pass two forms(registration and login) in one template? I'm
> using 'registration' and it's using different templates. For registration
> it's using 'registration_form.html and for login it's u
You need to render your template with two forms in context. For example:
class LoginFormView(views.View):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["login_form"] = LoginForm()
context["registration_form"] = RegistrationFo
How can I pass two forms(registration and login) in one template? I'm using
'registration' and it's using different templates. For registration it's
using 'registration_form.html and for login it's using login.html. How can
I pass a login form in modal window inside registration_form.html. In
s
25 matches
Mail list logo