danihodovic / django-allauth-ui

Nice looking templates for django-allauth
https://django-allauth-ui.hodovi.ch
MIT License
189 stars 24 forks source link

Exceptions raised because of base_color #43

Open atopheim opened 3 months ago

atopheim commented 3 months ago
./logs/app.log:7939:[2024-03-14 09:50:51] DEBUG [django.template._resolve_lookup:925] Exception while resolving variable 'base_color' in template 'socialaccount/login.html'.
./logs/app.log:7946:KeyError: 'base_color'
./logs/app.log:7954:AttributeError: type object 'RequestContext' has no attribute 'base_color'
./logs/app.log:7962:ValueError: invalid literal for int() with base 10: 'base_color'
./logs/app.log:7969:django.template.base.VariableDoesNotExist: Failed lookup for key [base_color] in [{'True': True, 'False': False, 'None': None}, {'csrf_token': <SimpleLazyObject: 'abc123'>, 'request': <ASGIRequest: GET '/accounts/google/login/?process=login&next=%2Fsign-up-proxy%2F'>, 'user': <SimpleLazyObject: <function AuthenticationMiddleware.process_request.<locals>.<lambda> at 0x>>, 'perms': PermWrapper(<SimpleLazyObject: <function AuthenticationMiddleware.process_request.<locals>.<lambda> at 0x>>), 'messages': <FallbackStorage: request=<ASGIRequest: GET '/accounts/google/login/?process=login&next=%2Fsign-up-proxy%2F'>>, 'DEFAULT_MESSAGE_LEVELS': {'DEBUG': 10, 'INFO': 20, 'SUCCESS': 25, 'WARNING': 30, 'ERROR': 40}}, {}, {'provider': <allauth.socialaccount.providers.google.provider.GoogleProvider object at 0x>, 'process': 'login'}, {'block': <Block Node: content. Contents: [<TextNode: '\n    <div class="flex fle'>, <Block Node: whitebox. Contents: [<TextNode: '\n        '>]>, <TextNode: '\n    </div>\n  </div>\n    '>]>}, {'block': <Block Node: whitebox. Contents: [<TextNode: '\n<div class="flex items-c'>, <IfNode>, <TextNode: '\n  </p>\n</div>\n<form meth'>, <django.template.defaulttags.CsrfTokenNode object at 0x7f8e2dc6f990>, <TextNode: '\n  '>, <IncludeNode: template=<FilterExpression '"account/_button.html"'>>, <TextNode: '\n</form>\n'>]>}, {'text': 'Continue'}]

Seems like there is a "with base_color" in account/_button that might be the culprit, but I don't see why it won't just default to bg-blue if it's not found.

Should I set the base_color, if so how?

Feels like I'm missing something and this should be a quick one, @danihodovic.

danihodovic commented 3 months ago

What page is this happening on?

atopheim commented 3 months ago

I get it when attempting to sign up using google third party sign-in.

danihodovic commented 3 months ago

I can have a look at this next month as I'm currently busy with work. If you figure it out open a PR

atopheim commented 3 months ago

I see, and that is totally understood. If it's a non-obvious error I will investigate further and open a PR if I find something of course :+1:

danihodovic commented 3 months ago

It's not a big code base. If you can navigate allauth this is a piece of cake. If I find it in the meantime I will update you.