obj.save(force_insert=True, using=self.db)
TypeError: save() got an unexpected keyword argument 'force_insert'
[04/Mar/2020 12:11:16] "POST /register/ HTTP/1.1" 500 108601

On Wed, Mar 4, 2020 at 12:00 PM Soumen Khatua <soumenkhatua...@gmail.com>
wrote:

> okay..sure
>
> On Wed, Mar 4, 2020 at 11:56 AM Naveen Arora <naveenarorak...@gmail.com>
> wrote:
>
>> Can you share the complete traceback of error + what are you passing and
>> where so that i can understand the flow. ?
>>
>> Cheers
>>
>> On Tuesday, 3 March 2020 19:15:56 UTC+5:30, Soumen Khatua wrote:
>>>
>>> after changing the path still I'm getting the same type of error.
>>>
>>> Thank you for your response.
>>>
>>>
>>> On Tue, Mar 3, 2020 at 3:01 PM Naveen Arora <naveena...@gmail.com>
>>> wrote:
>>>
>>>> Try passing a relative path, as the error itself says, absolute path
>>>> not supported.
>>>>
>>>> Thanks
>>>>
>>>> On Tuesday, 3 March 2020 13:46:11 UTC+5:30, Soumen Khatua wrote:
>>>>>
>>>>> Hi Folks,
>>>>>
>>>>> I'm using AWS S3 Bucket to store media folder(images) but I want to
>>>>> resize each every image in 300*300. So, I'm overriding the save method
>>>>> inside django model class. But I'm getting one error caled:
>>>>> *   NotImplementedError: This backend doesn't support absolute paths.*
>>>>>
>>>>> *My django models look like:*
>>>>>
>>>>> * class Profile(models.Model):*
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> *    user = models.OneToOneField(        AUTH_USER_MODEL,
>>>>> on_delete=models.CASCADE,        related_name="profile"    )    
>>>>> profile_pic
>>>>> = models.ImageField(default = 'profile.jpg',upload_to =
>>>>> user_directory_path, null = True)    def save(self, *args, **kwargs):
>>>>>   super().save(*args, **kwargs)        img =
>>>>> Image.open(self.profile_pic.path)        if img.height > 300 or img.width 
>>>>> >
>>>>> 300:            output_size = (300, 300)
>>>>> img.thumbnail(output_size)            img.save(self.image.path)*
>>>>>
>>>>>
>>>>>
>>>>> I don't know how to solve this issue.
>>>>>
>>>>> Thank you in advance
>>>>>
>>>>> Regards,
>>>>> soumen
>>>>>
>>>> --
>>>> 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...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/c207b85c-c966-43c5-8c23-14084bb4a979%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/c207b85c-c966-43c5-8c23-14084bb4a979%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>> 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 visit
>> https://groups.google.com/d/msgid/django-users/1b7a29a2-8987-4169-9d4c-d6879fc35c46%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/1b7a29a2-8987-4169-9d4c-d6879fc35c46%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 visit 
https://groups.google.com/d/msgid/django-users/CAPUw6WZNtw3xO6p9Moj-uAWA1xh6btrW%2Bow68q8duxFj-iwvDw%40mail.gmail.com.

Reply via email to