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

TemplateDoesNotExist exception on startup #58

Closed
seb-b opened this issue Mar 28, 2024 · 2 comments · Fixed by #59
Closed

TemplateDoesNotExist exception on startup #58

seb-b opened this issue Mar 28, 2024 · 2 comments · Fixed by #59

Comments

@seb-b
Copy link

seb-b commented Mar 28, 2024

Just got stung by this because I didn't pin to 0.1.3. I'm using hero-icons in a ModelAdmin using Wagtail 5.2
modeladmin def looks something like this:

class CourseCompletionAdmin(ModelAdmin):
    model = CourseCompletion
    menu_icon = "heroicons-academic-cap-solid"
    menu_label = "Course completions"
    list_display = ("email", "course", "date_completed")

exception on startup -

... our app code that basically imports wagtail urls ...
File "wagtail/admin/urls/__init__.py", line 138, in <module>
  path(f"sprite-{get_sprite_hash()}/", home.sprite, name="wagtailadmin_sprite"),
File "wagtail/admin/urls/__init__.py", line 129, in get_sprite_hash
  content = str(home.sprite(None).content, "utf-8")
File "wagtail/admin/views/home.py", line 429, in sprite
  return HttpResponse(icons())
File "wagtail/admin/views/home.py", line 415, in icons
  render_to_string(icon)
File "django/template/loader.py", line 61, in render_to_string
  template = get_template(template_name, using=using)
File "django/template/loader.py", line 19, in get_template
  raise TemplateDoesNotExist(template_name, chain=chain)

Works ok after downgrading

@joshuadavidthomas
Copy link
Member

Ah, that's what I get for getting overly confident because I got to 100% code coverage. 😆

Thanks for the bug report and the traceback. There's enough here to chase this down.

@joshuadavidthomas
Copy link
Member

Fixed in v0.2.2 🎉

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

Successfully merging a pull request may close this issue.

2 participants