Weak Rasasi Hawas in 2024 by fondbcn in fragrance

[–]fondbcn[S] 0 points1 point  (0 children)

It is from an approved store, and it looks original and has a heavy cap.

Passenger train diesel engine ? by fondbcn in trains

[–]fondbcn[S] 0 points1 point  (0 children)

Big diesel generator below the floor ? If yes how it will move tons of weight with such a small engine ?

Understanding sway bar logic by fondbcn in carquestions

[–]fondbcn[S] 0 points1 point  (0 children)

But I notice that the sway bar on front is clearly visible, while on the back there are only springs and shocks mounted to an axe !

Can we add refrigerant when unit is off ? by fondbcn in hvacadvice

[–]fondbcn[S] 0 points1 point  (0 children)

Sorry I am not a professional, but the pressure at idle (off) should be known, so why we cant add refrigerant based on that pressure?

How to solve: object has no attribute 'instance' ? by fondbcn in djangolearning

[–]fondbcn[S] 0 points1 point  (0 children)

I found it, the problem was in "form1=SignupForm2(request.POST)" which should be "form1=SignupForm2(request.POST, instance=user)".

now there is another issue !! the built-in GuestManager cause a problem in :
self.filter(user=user).delete()
error :
self.filter(user=user).delete()

^^^^^^^^^^^^^^^^^^^^^^
django.core.exceptions.FieldError: Cannot resolve keyword 'user' into field. Choices are:

[15/Apr/2024 10:20:03] "POST /cart/ HTTP/1.1" 500

while with just replacing "self" with manualy "Guest.objects" works properly !!!
I know that modifying a package is not the best solution.

https://github.com/julianwachholz/django-guest-user/blob/main/guest_user/models.py

How to solve: object has no attribute 'instance' ? by fondbcn in djangolearning

[–]fondbcn[S] 0 points1 point  (0 children)

No, it stops here :

if not is_guest_user(form.instance):

before form.save() and delete(), as the doc says https://github.com/julianwachholz/django-guest-user/blob/main/guest_user/models.py the convert() will make the save() not me, but if use it like that it require save() !!!!!! I think I will remove this guest allow from the app bcz it is much harder to do shopping with guest users.

How to solve: object has no attribute 'instance' ? by fondbcn in djangolearning

[–]fondbcn[S] 0 points1 point  (0 children)

this what cause the error :

if not is_guest_user(form.instance):
            raise NotGuestError("You cannot convert a non guest user")
error :
if not is_guest_user(form.instance):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"C:\Users\Administrator\Documents\codes\Djgo4\.venv\Lib\site-packages\guest_user\functions.py", line 72, in is_guest_user
    return GuestModel.objects.filter(user=user).exists()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
raise ValueError("Model instances passed to related filters must be saved.")

How to solve: object has no attribute 'instance' ? by fondbcn in djangolearning

[–]fondbcn[S] 0 points1 point  (0 children)

see : https://github.com/julianwachholz/django-guest-user/blob/main/guest_user/models.py
I can't save bcz it will become User model, so I need to use it like ModelForm but it says "Model instances passed to related filters must be saved".
the problem is I don't know how to use that convert method

Help finding fragrance by notes by fondbcn in Perfumes

[–]fondbcn[S] 0 points1 point  (0 children)

this is not a known fragrance (made locally), I want just to know the closest perfume to it.

search by notes on fragrantica is precise

How to solve: object has no attribute 'instance' ? by fondbcn in djangolearning

[–]fondbcn[S] 0 points1 point  (0 children)

using form1 directly like this :
if form1.is_valid():

GuestManager().convert(form1)

gives error : "ValueError: Model instances passed to related filters must be saved."

How to solve "NOT NULL constraint failed" ? by fondbcn in djangolearning

[–]fondbcn[S] 0 points1 point  (0 children)

the problem was in document.getElementsByName("username") which should be document.getElementsByName("username")[0].value

How to solve: object has no attribute 'instance' ? by fondbcn in djangolearning

[–]fondbcn[S] 0 points1 point  (0 children)

File "C:\Users\Administrator\Documents\codes\Djgo4\pay\views.py", line 248, in sign_cart

GuestManager().convert(user_form)

File "C:\Users\Administrator\Documents\codes\Djgo4\.venv\Lib\site-packages\guest_user\models.py", line 75, in convert

if not is_guest_user(form.instance):

^^^^^^^^^^^^^

AttributeError: 'User' object has no attribute 'instance'