https://docs.djangoproject.com/en/5.1/ref/forms/widgets/
this one is the second..
Em qui., 29 de ago. de 2024 às 17:15, Eduardo Barbachan <
eduardobarbacha...@gmail.com> escreveu:
> I would recommend you to read articles in the following links (both from
> Django documentati
I would recommend you to read articles in the following links (both from
Django documentation):
https://docs.djangoproject.com/en/5.1/topics/forms/
https://docs.djangoproject.com/en/5.1/topics/forms/
Em qui., 29 de ago. de 2024 às 17:05, frank dilorenzo
escreveu:
> I have a table listing
I have a table listing the names of butterflies. I would like to create a
user custom form with a select field populated by the list of butterflies.
I can't find anything on the web to show me the proper syntax. I would
appreciate any help.
--
You received this message because you are subsc
When rendering a form using the {% crispy form form.helper %} tag I get the
error message
Exception Value:
not all arguments converted during string formatting
Exception Location:
/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/crispy_forms/templatetags/crispy_
Ciao
I think the problem is in the NAME of the checkbox.
4 checkbox with same name, the form will consider only the last one.
I think, if you check for example 1 and x you will get:
'not_willing_to_judge: 'x''. Try to rename checkbox:
not_willing_to_judge_1, not_willing_to_judge_2, not_willing_to_
I have a Django ModelForm (below) that I include a customized html snipped.
And I am using django-crispy forms.
Added the clean() method to help explain my problem.
```python
class ProfileForm(forms.ModelForm):
self.helper.layout = Layout(
Fieldset(
"Triage {{ settings.t
On 15/04/2023 12.31, Prashanth Patelc wrote:
Hi all,
How to save employees information using ajax with django form , id
should automatic generation ?
Try this helpful link:
https://googlethatforyou.com?q=django%20ajax%20form
Kind regards,
Kasper Laudrup
--
You received this message becau
Hi all,
How to save employees information using ajax with django form , id should
automatic generation ?
--
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-
How to set uploaded imagefield image size both in forms or models
--
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...@googlegrou
I'm currently having strange behavior with a django admin form. Somehow the
django admin form is not creating the model fields and occasionally a GET
request fails because I am trying to change the widget of a field in the
__init__ method.
I think the error I have is in the django admin class I
This is easy you implement it with django forms then copy widget
html/javascript code with browser and then implement it 1:1 but not with
django forms... But i understand till yet WHY you want without django
forms? Yoz cab change django forms/widget 1:1 how do yoz want but this
isn't
ap developer how show you how to implement
>>> such thing. This is relative easy when you know how it works
>>>
>>> Regards
>>>
>>> Nishant Sagar schrieb am Fr., 23. Sept. 2022,
>>> 07:57:
>>>
>>>> Hey forks,
>>&
would hire on upworks a cheap developer how show you how to implement
>> such thing. This is relative easy when you know how it works
>>
>> Regards
>>
>> Nishant Sagar schrieb am Fr., 23. Sept. 2022,
>> 07:57:
>>
>>> Hey forks,
>>>
&
> 07:57:
>
>> Hey forks,
>>
>> I’m in little dilemma regarding Django forms. I'm working on a project as
>> a backend guy who doesn't know much about CSS and JavaScript so a frontend
>> guy delivered me a form template designed using CSS, however, Django
Hello,
I would hire on upworks a cheap developer how show you how to implement
such thing. This is relative easy when you know how it works
Regards
Nishant Sagar schrieb am Fr., 23. Sept. 2022,
07:57:
> Hey forks,
>
> I’m in little dilemma regarding Django forms. I'm working o
Hey forks,
I’m in little dilemma regarding Django forms. I'm working on a project as a
backend guy who doesn't know much about CSS and JavaScript so a frontend
guy delivered me a form template designed using CSS, however, Django
documentation suggests that it's good practice to u
You need to work with model forms, but not forms, in your templates
implement crispy forms to avoid over coding
On Wed, Aug 31, 2022, 03:03 Mike Dewhirst wrote:
> 1. Create a forms directory
> 2. Create ../forms/__init__.py
> 3. Move your forms.py into the forms directory
> 4. In .
1. Create a forms directory2. Create ../forms/__init__.py3. Move your forms.py
into the forms directory4. In ./__init__.py write from .forms import (
FormThis, FormThat, EtcForm,)This gives you unchanged forms calling from
wherever ... from appname.forms import etc5. When all that is working
gt; organize your forms in your projects?
>
> --
> 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.co
I have a large project and forms.py per app is bigger than I thought with
3k+ lines in each file, I'm looking for options to make a good scalation
structure, does anyone have experience with this? What do you do to
organize your forms in your projects?
--
You received this message becaus
trying to put two forms, here is my code:
> ```
> class FrontView(LoginRequiredMixin, UserPassesTestMixin, FormView):
> template_name = "template.html"
> form_class = FirstForm
> coupon_form = SecondForm
>
> def get_context_data(self, **kwargs):
> kwa
Hi I'm trying to put two forms, here is my code:
```
class FrontView(LoginRequiredMixin, UserPassesTestMixin, FormView):
template_name = "template.html"
form_class = FirstForm
coupon_form = SecondForm
def get_context_data(self, **kwargs):
kwargs['second_form'] = self
Iommi forms
On Thu, 28 Apr 2022, 23:00 Ryan Nowakowski, wrote:
> You're right, it's not very clear how to have a single class-based view
> handle both displaying details and submitting a form. This is a
> fantastic site that shows how each class based view is set up
> i
You're right, it's not very clear how to have a single class-based view
handle both displaying details and submitting a form. This is a
fantastic site that shows how each class based view is set up
inheritance-wise: https://ccbv.co.uk/
Take a look the ancestors for DetailView:
https://ccbv.c
Can anyone explain me how to make send email form on page.
So my forms.py
class ContactForm(forms.Form):
name = forms.CharField(required=True)
last_name = forms.CharField()
adults = forms.IntegerField() children = forms.IntegerField()
email = forms.EmailField(required=True)
m
l
> fields = ['text', ]
> inlines = [RelatedModelInlineTabular]
>
>
>
> El lun, 29 de nov. de 2021 a la(s) 20:28, 'Andrea Arighi' via Django users
> (django-users@googlegroups.com) escribió:
>
>> Good evening,
>> I am encountering a weird bug wh
via Django users (
django-users@googlegroups.com) escribió:
> Good evening,
> I am encountering a weird bug when rendering Inline forms on the "Add"
> view of a ModelAdmin.
>
> Here is a minimum example with Django version 2.2.4
>
> - - - - - - -
>
> in models.py:
Good evening,
I am encountering a weird bug when rendering Inline forms on the "Add" view
of a ModelAdmin.
Here is a minimum example with Django version 2.2.4
- - - - - - -
in models.py:
class MyModel(models.Model):
text = models.CharField(max_length=100)
class RelatedModel(mo
m.abu.b...@gmail.com wrote:
> I have an input field where the will customer add a number for buy
> membership then will get forms according to numbers 1,2, or 5 then will
> show 1,2, or 5 forms with input fields in which will add data.
>
> How can add this type of functionality
I have an input field where the will customer add a number for buy
membership then will get forms according to numbers 1,2, or 5 then will
show 1,2, or 5 forms with input fields in which will add data.
How can add this type of functionality? Because I'm a beginner in python
Django. T
Hello again. I know I'm posting in here all the time.
I am trying to get specific querysets in my forms based on the id in the
kwargs but it says there is a keyerror with 'id'. It's the same
kwargs.get('id') I reference whenever I do other stuff. Not sure why it
Anyone interested in talking about django sharing their knowledge or path
or want to learn more?
meeting Now
https://meet.google.com/wcv-ojtf-vhi
On Sat, Jun 19, 2021 at 10:31 AM DJANGO DEVELOPER
wrote:
> please can someone help me?
>
> On Sat, Jun 19, 2021 at 9:31 AM DJANGO DEVELOPER
> wrote
please can someone help me?
On Sat, Jun 19, 2021 at 9:31 AM DJANGO DEVELOPER
wrote:
> for convenience, please follow addorder1 to addorder5 respectively.
>
> On Saturday, June 19, 2021 at 9:29:48 AM UTC+5 DJANGO DEVELOPER wrote:
>
>> Hi guys I need urgent help. your help is appreciated.
>> When
for convenience, please follow addorder1 to addorder5 respectively.
On Saturday, June 19, 2021 at 9:29:48 AM UTC+5 DJANGO DEVELOPER wrote:
> Hi guys I need urgent help. your help is appreciated.
> When I try to add a single order from user side then it works fine but
> when I try to add multiple
i could use the font awesome unicode which would have been the
>> easiest solution.
>>
>> On Tue, Jun 15, 2021 at 9:53 AM Lalit Suthar
>> wrote:
>>
>>> you can try if it can be done with widgets I am not sure
>>> https://docs.djangoproject.com/en/2.
ould add i
> class i could use the font awesome unicode which would have been the
> easiest solution.
>
> On Tue, Jun 15, 2021 at 9:53 AM Lalit Suthar
> wrote:
>
>> you can try if it can be done with widgets I am not sure
>> https://docs.djangoproject.com/en/2.2/ref/for
t can be done with widgets I am not sure
> https://docs.djangoproject.com/en/2.2/ref/forms/widgets/
>
> On Tue, 15 Jun 2021 at 11:24, Williams Andy Inc
> wrote:
>
>> I would like to know is there any easier way rather than overriding
>> super, how do i add icons into the
you can try if it can be done with widgets I am not sure
https://docs.djangoproject.com/en/2.2/ref/forms/widgets/
On Tue, 15 Jun 2021 at 11:24, Williams Andy Inc
wrote:
> I would like to know is there any easier way rather than overriding super,
> how do i add icons into the html input
I would like to know is there any easier way rather than overriding super,
how do i add icons into the html input eg to have a key icon on the
password field
without installing any third party app also.
is the best solution to render form in html and pass field values to
django? or is there a
you mean request.method instead of request.post ?
On Thu, May 27, 2021 at 3:50 PM Bhanu prasad Ch wrote:
> Hello Boris,
> I was thinking of passing number from the input to view function
> *call_me_when_ten()*
> *index.html*
> ...
>
> ...
>
> *views.py*
> def call_me_when_ten(request):
>
You have a typo somehwere; in the HTML you have "numbered", whereas in the code
you have "numberid".
Antonis Christofides
+30-6979924665 (mobile)
On 27/05/2021 13.20, Bhanu prasad Ch wrote:
Hello Boris,
I was thinking of passing number from the input to view function
/call_me_when_ten()
How are you making the request?
On Thursday, May 27, 2021, 4:20:55 PM GMT+6, Bhanu prasad Ch
wrote:
Hello Boris, I was thinking of passing number from the input to view
function call_me_when_ten()index.html..
views.pydef call_me_when_ten(request): if request.post == 'POST':
Hello Boris,
I was thinking of passing number from the input to view function
*call_me_when_ten()*
*index.html*
...
...
*views.py*
def call_me_when_ten(request):
if request.post == 'POST':
number = request.POST['numberid']
if number == 10:
print('he
On 08/05/2021 10.32, Bharathwajan Rajendran wrote:
> i am trying to build a blog with comments
> but i didnt know how to select a blog(foreign key) automatically ,i have
> to select everytime when i post comments
>
Do you have a question you need help with?
If so, try to spend some time on descr
i am trying to build a blog with comments
but i didnt know how to select a blog(foreign key) automatically ,i have to
select everytime when i post comments
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
in items():
>self.declared_fields[name] = field
>super().__init__(*args, **kwargs)
>
> The "why" is a deeper question, but in short, that's what the source code
> says the DeclarativeFieldsMetaClass for forms uses. Technically, I belie
ms():
self.declared_fields[name] = field
super().__init__(*args, **kwargs)
The "why" is a deeper question, but in short, that's what the source code
says the DeclarativeFieldsMetaClass for forms uses. Technically, I believe
the code is a little ick because self.
Hello,
Thanks for your fast response. But i don't know how i can
use self.declared_fields and why this would help me...
Regards
shahee...@gmail.com schrieb am Sonntag, 18. April 2021 um 15:14:03 UTC+2:
> Try updating self.declared_fields instead.
>
> On Sun, 18 Apr 2021, 13:47 sebasti...@gma
Try updating self.declared_fields instead.
On Sun, 18 Apr 2021, 13:47 sebasti...@gmail.com,
wrote:
> Hello,
>
>
> *forms.py:*
>
> class Newsletterform(StandardMixin):
> class Meta:
> model = Newsletter
> fields = ['newslettername', 'from_link', 'to_list',
> 'email_subject', '
Hello,
*forms.py:*
class Newsletterform(StandardMixin):
class Meta:
model = Newsletter
fields = ['newslettername', 'from_link', 'to_list',
'email_subject', 'text_message', 'html_message' ]
*Mixins.py:*
class StandardMixin(forms.ModelForm):
class Meta:
abstract =
#Model
Form Django import models
Class singupdata(models.model):
Username=models.CharField(max_len=20)
Password=models.CharField(max_len=20)
#form
from django import forms
Class Signform (forms.form):
Username=forms.IntegerFiled(
labe='E
Hii Everyone,
I have a Model Form, one field is to upload image. Right now , user can
select images from their system and upload but I want to give a certain
number of images as a dropdown option (showing the images in preview) to
select from.
How can I implement this ?? and the best solution
mplete_fields.
Dne pátek 26. února 2021 v 10:14:54 UTC+1 uživatel zvo...@seznam.cz napsal:
> I want start a new project with good support for popups (select+options)
> in forms.
>
> My requirements are (and I think for real life project they are
> neccessary):
> 1. ajax retrie
I want start a new project with good support for popups (select+options) in
forms.
My requirements are (and I think for real life project they are neccessary):
1. ajax retrieved options based on users selection (outside of admin and
inside admin),
2. dynamic filtering of (especially related
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:
>
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.
>
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
and present I'm studying in engineering
>> 1st year
>>
>> On Monday, 26 October 2020 at 19:22:24 UTC+5:30 Derek wrote:
>>
>>> What you want to achieve (labels to the side) is the same example shown
>>> in the Django-crispy-forms README:
>>>
on .thank
> you for reading this message,and present I'm studying in engineering 1st
> year
>
> On Monday, 26 October 2020 at 19:22:24 UTC+5:30 Derek wrote:
>
>> What you want to achieve (labels to the side) is the same example shown
>> in the Django-crispy-forms
Hi Derek, Thanks for sharing. im gonna try with crispy forms.
El lunes, 26 de octubre de 2020 a la(s) 10:52:24 UTC-3, Derek escribió:
> What you want to achieve (labels to the side) is the same example shown in
> the Django-crispy-forms README:
>
> https://github.com/django-crispy-
wrote:
> What you want to achieve (labels to the side) is the same example shown in
> the Django-crispy-forms README:
>
> https://github.com/django-crispy-forms/django-crispy-forms
>
>
>
> On Sunday, 25 October 2020 at 19:46:54 UTC+2 wwran...@gmail.com wrote:
>
>>
What you want to achieve (labels to the side) is the same example shown in
the Django-crispy-forms README:
https://github.com/django-crispy-forms/django-crispy-forms
On Sunday, 25 October 2020 at 19:46:54 UTC+2 wwran...@gmail.com wrote:
> Hi guys,
>
> Is there any way to im
Hi guys,
Is there any way to improve the distribution of the elements of the django
form, from this (img1) to (img2)?
How so?
Thanks in Advance
Code:
{{filter.form|bootstrap}}
Buscar
%
.00
Aplicar
Yes you can do that.
OGUNSANYA OPEYEMI
On Fri, Jun 26, 2020 at 10:01 AM Jeric Epon
wrote:
> Is there way to pass value to http request from a custom html input form
> without using django modelForms ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django u
Is there way to pass value to http request from a custom html input form
without using django modelForms ?
--
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 djang
Hi Obed,
You can use django model forms, where modelform will access your fields in
model and you play with it using widgets.
Hope this helps.
Thank You
On Tue, Jun 16, 2020 at 5:25 PM Obed Balogun wrote:
> Please im trying to create a playlist app such that the user enters songs
>
Please I need help collecting data from a user. I have a playlist app where
users should be able to create a playlist and enter songs they feel belong
in the playlist. The problem im having is collecting songs from the user in
such a way that the songs would be iteable within a playlist model. W
Please im trying to create a playlist app such that the user enters songs in a
playlist creation page and this is added to a playlist model. I want to know
the best way to collect this data from the user. Im stuck at what possible way
to collect this data in the form page and then display each s
Okay!! I'll look into it, Thanks!!
On Saturday, 16 May 2020 06:54:57 UTC+5:30, Clive Bruton wrote:
>
> You can use bootsrap4, or look at the output from the forms and set
> up your CSS around that.
>
>
> -- Clive
>
> On 14 May 2020, at 19:40, Anubhav Madhav wro
You can use bootsrap4, or look at the output from the forms and set
up your CSS around that.
-- Clive
On 14 May 2020, at 19:40, Anubhav Madhav wrote:
Thankyou Clive!! I know I can use CSS like that, but if I do that
the problem I'll face is that the 'form' or the 'inpu
Thankyou so much Devansh!! This is really very helpful.
On Friday, 15 May 2020 19:46:51 UTC+5:30, Devansh Chaubey wrote:
>
> Hey Anubhav
> You can use django-widget-tweaks package
> https://pypi.org/project/django-widget-tweaks/
> See this.
> You can make own css styling us
Hey Anubhav
You can use django-widget-tweaks package
https://pypi.org/project/django-widget-tweaks/
See this.
You can make own css styling using class on forms.
On Fri, 15 May 2020 at 00:10, Anubhav Madhav
wrote:
> Thankyou Clive!! I know I can use CSS like that, but if I do that the
> p
have a Detail Model which has a ForeignKey() of User Model. I want to show
the list of subject (which is a field of Detail Model) associated with a
single user, at the Front End in Template. It should be a dropdown menu and
user should be able to select the subject from the list and submit the
Thankyou Clive!! I know I can use CSS like that, but if I do that the
problem I'll face is that the 'form' or the 'input' tags or 'submit'
button, which are rendered using django forms, cannot be modified using CSS
in this way. Is there any other way to fix i
Thankyou Kasper :)
On Wednesday, 13 May 2020 19:02:46 UTC+5:30, Kasper Laudrup wrote:
>
>
>
> On 13/05/2020 06.17, Bighnesh Pradhan wrote:
> > you can use javascript it is good
> >
>
> Oh yes, we all love javascript:
>
> https://www.destroyallsoftware.com/talks/wat
>
> :-)
>
> Seriously thou
n' Page
>> using HTML and CSS. Later on, in my project, I had to use 'forms' for
>> registration and login.
>> Is there any way to display the forms with my HTML CSS files.
>> Please Help!!
>>
>> --
>> You received this message because yo
On 13/05/2020 06.17, Bighnesh Pradhan wrote:
you can use javascript it is good
Oh yes, we all love javascript:
https://www.destroyallsoftware.com/talks/wat
:-)
Seriously though, javascript has nothing to do with using static CSS in
django templates.
--
You received this message becaus
On 12 May 2020, at 22:41, Anubhav Madhav wrote:
Is there any way to display the forms with my HTML CSS files.
Use {% include %} (https://docs.djangoproject.com/en/3.0/ref/
templates/builtins/#include) in your HTML template files for an
embedded style sheet, or just use a link in the head
you can use javascript it is good
On Wed, May 13, 2020 at 3:13 AM Anubhav Madhav
wrote:
> My problem is, that I've made a beautiful 'Sign Up' and 'Login' Page using
> HTML and CSS. Later on, in my project, I had to use 'forms' for
> registration
My problem is, that I've made a beautiful 'Sign Up' and 'Login' Page using
HTML and CSS. Later on, in my project, I had to use 'forms' for
registration and login.
Is there any way to display the forms with my HTML CSS files.
Please Help!!
--
You received this
tion.
>
> On Mon, May 11, 2020 at 1:27 AM Anonymous Patel
> wrote:
>
>> https://youtu.be/beh0ONKCkR8
>>
>> How to handle multiple forms in a django
>>
>>
>> Raj Patel
>>
>> --
>> You received this message because you are subscribed t
Thank you very much sir ,
Sir please make the Django complete video and User authentication.
On Mon, May 11, 2020 at 1:27 AM Anonymous Patel
wrote:
> https://youtu.be/beh0ONKCkR8
>
> How to handle multiple forms in a django
>
>
> Raj Patel
>
> --
> You received t
https://youtu.be/beh0ONKCkR8
How to handle multiple forms in a django
Raj Patel
--
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-user
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
1 - 100 of 2595 matches
Mail list logo