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

Template does not exist error when creating target from catalog search #658

Closed
rachel3834 opened this issue May 16, 2023 · 4 comments · Fixed by #662
Closed

Template does not exist error when creating target from catalog search #658

rachel3834 opened this issue May 16, 2023 · 4 comments · Fixed by #662
Assignees
Labels
bug Something isn't working

Comments

@rachel3834
Copy link
Contributor

rachel3834 commented May 16, 2023

Describe the bug
Manually creating a target in a brand-new TOM produces a TemplateDoesNotExist error on the TargetDetailView

To Reproduce
Steps to reproduce the behavior:

  1. On the 'Targets' page go to Create Targets -> Catalog Search
  2. Enter "M31" in the search term box, selecting "Simbad" as the catalog to search. This will correctly produce a TargetCreateView page with the RA and Dec filled in from Simbad
  3. Scroll to the bottom and click Submit
  4. See error:
File "/Users/rstreet1/software/test_tom_venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/Users/rstreet1/software/test_tom_venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 222, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/Users/rstreet1/software/test_tom_venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 362, in process_exception_by_middleware
    response = middleware_method(request, exception)
  File "/Users/rstreet1/software/test_tom_venv/lib/python3.9/site-packages/tom_common/middleware.py", line 29, in process_exception
    raise exception
  File "/Users/rstreet1/software/test_tom_venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 220, in _get_response
    response = response.render()
  File "/Users/rstreet1/software/test_tom_venv/lib/python3.9/site-packages/django/template/response.py", line 114, in render
    self.content = self.rendered_content
  File "/Users/rstreet1/software/test_tom_venv/lib/python3.9/site-packages/django/template/response.py", line 92, in rendered_content
    return template.render(context, self._request)
  File "/Users/rstreet1/software/test_tom_venv/lib/python3.9/site-packages/django/template/backends/django.py", line 63, in render
    reraise(exc, self.backend)
  File "/Users/rstreet1/software/test_tom_venv/lib/python3.9/site-packages/django/template/backends/django.py", line 84, in reraise
    raise new from exc
django.template.exceptions.TemplateDoesNotExist: bootstrap4/field.html

Expected behavior
The Target should be created normally. Note that it appears to be a problem with the TargetDetailView missing a field because the Target is actually stored in the TOM DB.

Desktop (please complete the following information):

  • OS: Mac OS Ventura 13.3.1a
@rachel3834 rachel3834 added the bug Something isn't working label May 16, 2023
@jchate6
Copy link
Contributor

jchate6 commented May 16, 2023

What version of Tom Base was this for?

@rachel3834
Copy link
Contributor Author

rachel3834 commented May 16, 2023 via email

@jchate6
Copy link
Contributor

jchate6 commented May 16, 2023

Do you have CRISPY_TEMPLATE_PACK = 'bootstrap4' in your settings?

@rachel3834
Copy link
Contributor Author

rachel3834 commented May 17, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants