02:13 PM UTC-4, Motaz Hejaze wrote:
>>>>>>
>>>>>> what kind of forms is this ? regular form or model form ?
>>>>>>
>>>>>>
>>>>>> On Wed, Apr 22, 2020 at 4:57 AM Ahmed Khairy
>>>
rm
>>>>
>>>> UserCreationForm
>>>>
>>>> On Tuesday, April 21, 2020 at 11:02:13 PM UTC-4, Motaz Hejaze wrote:
>>>>>
>>>>> what kind of forms is this ? regular form or model form ?
>>>>>
>>>>>
rm
>>>>
>>>> UserCreationForm
>>>>
>>>> On Tuesday, April 21, 2020 at 11:02:13 PM UTC-4, Motaz Hejaze wrote:
>>>>>
>>>>> what kind of forms is this ? regular form or model form ?
>>>>>
>>>>>
egular form or model form ?
>>>>
>>>>
>>>> On Wed, Apr 22, 2020 at 4:57 AM Ahmed Khairy
>>>> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> Got this unexpected error all of a sudden, h
1, 2020 at 11:02:13 PM UTC-4, Motaz Hejaze wrote:
>>>
>>> what kind of forms is this ? regular form or model form ?
>>>
>>>
>>> On Wed, Apr 22, 2020 at 4:57 AM Ahmed Khairy
>>> wrote:
>>>
>>>> Hi all,
>>>
gt;> On Wed, Apr 22, 2020 at 4:57 AM Ahmed Khairy
>> wrote:
>>
>>> Hi all,
>>>
>>> Got this unexpected error all of a sudden, how to fix it.
>>>
>>> save() got an unexpected keyword argument 'force_insert'
>>>
>>&
ected error all of a sudden, how to fix it.
>>
>> save() got an unexpected keyword argument 'force_insert'
>>
>>
>>
>> def register(request):
>> if request.method == 'POST':
>> form = UserRegisterForm(request.POST)
>> i
what kind of forms is this ? regular form or model form ?
On Wed, Apr 22, 2020 at 4:57 AM Ahmed Khairy
wrote:
> Hi all,
>
> Got this unexpected error all of a sudden, how to fix it.
>
> save() got an unexpected keyword argument 'force_insert'
>
>
>
Hi all,
Got this unexpected error all of a sudden, how to fix it.
save() got an unexpected keyword argument 'force_insert'
def register(request):
if request.method == 'POST':
form = UserRegisterForm(request.POST)
if form.is_valid():
form.save
To address the original question, I saw a similar error when overriding the
save() function of a model. The solution was to include *args and **kwargs
in the function definition:
def save(self,*args, **kwargs):
# your custom code here #
super(MyModel, self).save(*args,
t;, line 1, in
> File "/usr/lib/python2.6/site-packages/django/db/models/query.py", line
> 383, in get_or_create
> obj.save(force_insert=True, using=self.db)
> TypeError: save() got an unexpected keyword argument 'force_insert'
>
>
> I'm getting this error on c
bj.save(force_insert=True, using=self.db)
TypeError: save() got an unexpected keyword argument 'force_insert'
I'm getting this error on creating a new group on mydatabase2
Not getting the exact reason behind this ...
plz help ...
Thanks in Advance
--
You received this message because you are subs
12 matches
Mail list logo