-1
Thus, I created a user table and a business, both inherit from the Django user table. Perfect, both your users and tables. But I have a menu and a profile page.html and wanted that in this menu appeared the photo and name of who was logging in and the same on the profile page more as I have user.user and user.negocio I don’t know how to make this logic if you are logged in with user.user to show such thing but show user.business someone wants to waste time and help me?
hi friend excellent logging, the more appeared the following error
Exception Type: RelatedObjectDoesNotExist at /accounts/login/
Exception Value: User has no usuario.
Use Django admin Accounts for login– Mauricio Kalfelz
face I think it worked, the night I confirm you, but if gave saved my life
– Mauricio Kalfelz
opa friend, tried and did not work, it shows the company, more then when soon in the user it does not show, and case within the user’s if.user I ask the user’s photo.negocio.foto it accepts
– Mauricio Kalfelz
Hello Mauricio. Can you send me your code so I can have a look? Especially models.py, views.py and the html you’re trying to make?
– illozzaM
https://github.com/MauMaster/Pet-Aqui of course, but inside the menu is not with that if, Else Elif
– Mauricio Kalfelz
I appreciate any help, it’s part of my TCC to desperate
– Mauricio Kalfelz
I even published another post https://answall.com/questions/369788/desdenti%C3%A7%C3%A3o-entre-dois-tipos-de-usu%C3%A1rios-usando-if/369799#369799
– Mauricio Kalfelz
Mauricio. I was preparing the answer when you closed the topic. hehe
– illozzaM
I’ve reopened, why I haven’t managed yet, I appreciate you helping me friend
– Mauricio Kalfelz
I saw the other question there. Allan’s answer is quite complete. But, I created a new.py models that I believe would make your database more optimized. Check it out and see if you’re interested: https://pastebin.com/0De0Sk0u
– illozzaM
Another thing. As I said, it’s not the right way to do it but, for a moment of despair, it works well. hehe Anything, we are there.
– illozzaM
look where I’ve gone, if you can help me https://answall.com/questions/370822/if-else-entre-dois-tips-user
– Mauricio Kalfelz