Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No está claro cómo aprovechar la shell de Django #16

Open
astrojuanlu opened this issue Apr 23, 2024 · 0 comments
Open

No está claro cómo aprovechar la shell de Django #16

astrojuanlu opened this issue Apr 23, 2024 · 0 comments

Comments

@astrojuanlu
Copy link
Member

Intentando depurar #9, me volvió a pasar esto:

# docker compose exec -it web python manage.py shell
...
(InteractiveConsole)
>>> from users.models.password_reset import PasswordResetStates, PasswordReset
>>> t = PasswordReset.objects.last()
>>> t
<PasswordReset: PasswordReset object (27)>
>>> t.state
'sent'
>>> PasswordResetStates().handle_new(t)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<console>", line 1, in <module>
  File "/takahe/users/models/password_reset.py", line 26, in handle_new
    subject=f"{Config.system.site_name}: Confirm new account",
               ^^^^^^^^^^^^^
AttributeError: type object 'Config' has no attribute 'system'
>>> from core.models import Config
>>> Config.system
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<console>", line 1, in <module>
AttributeError: type object 'Config' has no attribute 'system'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant