Parent view seen as a string in template
See original GitHub issueHi,
I’m trying to register user via django-unicorn but I’m having issue with session:
File "REDACTED/unicorn/app/components/email.py", line 57, in register_email
login(self.request, user)
File "REDACTED/.venv/lib/python3.9/site-packages/django/contrib/auth/__init__.py", line 102, in login
if SESSION_KEY in request.session:
AttributeError: 'NoneType' object has no attribute 'session'
Here is the code I’m running:
def register_email(self): # TODO: Add rate limiting
pwd = get_random_string(32)
user = CustomUser.objects.create_user(email=self.email, password=pwd)
user = authenticate(email=self.email, password=pwd)
login(self.request, user)
print("logged")
return redirect('/register')
Hope this helps.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Angular - display a string property, defined in Child... in the ...
This value is only read 'AfterViewInit'. The parent would need some sort of event to update the value when it gets changed in...
Read more >Sharing data between child and parent directives ... - Angular
The $event contains the data that the user types into the <input> in the child template UI. To see the @Output() working, add...
Read more >How to pass string to a component using Angular2
In angular2, a component is considered as a 'view' with its own logic and ... by the child component from the parent component...
Read more >Props | Vue.js
So far, you've seen props passed as static values, like in: template <BlogPost title="My journey with Vue" />. You've also seen props assigned...
Read more >Outputs in ARM template - Azure Resource Manager
Describes how to define output values in an Azure Resource Manager template (ARM template).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Holy crap! The real problem I had since the beggining was the missing
unicorn
in the settings.py… I thought that onlydjango_unicorn
was needed 😕 Thanks a lot @adamghill !Thanks, I’ll take a look at this as soon as possible!