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

extra_content not being displayed in 4.3 video #1

Open
tsmurer opened this issue Oct 22, 2021 · 1 comment
Open

extra_content not being displayed in 4.3 video #1

tsmurer opened this issue Oct 22, 2021 · 1 comment

Comments

@tsmurer
Copy link

tsmurer commented Oct 22, 2021

This issue refers to the third video (Introduction to Django class-based views) in the fourth section (Building Dynamic Webpages), at 2:39.
Please notice that the 'extra_content' data is not displayed at the welcome.html template and you do not address the issue at all.
Said issue is fixed and in the fourth video of the same section, at 1:29, the 'extra_content' data is correctly displayed.
You do not mention at any moment what was the problem or how did you resolve it.

@thekopiman
Copy link

With reference to: https://docs.djangoproject.com/en/2.0/ref/class-based-views/mixins-simple/#django.views.generic.base.ContextMixin.get_context_data

Instead of adding
extra_content = {'today': datetime.today()}
in your HomeView class

Put
def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['today'] = datetime.today() return context
instead.

Shamaine added a commit to Shamaine/django-esst-2894047 that referenced this issue Feb 16, 2024
Shamaine added a commit to Shamaine/django-esst-2894047 that referenced this issue Feb 16, 2024
Shamaine added a commit to Shamaine/django-esst-2894047 that referenced this issue Feb 16, 2024
Shamaine added a commit to Shamaine/django-esst-2894047 that referenced this issue Feb 16, 2024
Shamaine added a commit to Shamaine/django-esst-2894047 that referenced this issue Feb 19, 2024
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

2 participants