Skip to content
Snippets Groups Projects
Commit 81334258 authored by James Smith's avatar James Smith Committed by h4-rahman
Browse files

apologies for working in main. minor UI change to display user type as the...

 apologies for working in main. minor UI change to display user type as the text version instead of a number
parent 404b1515
No related branches found
No related tags found
1 merge request!34Removing of exposed ports for tensorflow container
......@@ -1074,3 +1074,87 @@ Watching for file changes with StatReloader
/usr/src/app/myapp/views.py changed, reloading.
Watching for file changes with StatReloader
Watching for file changes with StatReloader
Watching for file changes with StatReloader
Not Found: /favicon.ico
Not Found: /favicon.ico
Not Found: /favicon.ico
Not Found: /favicon.ico
Not Found: /favicon.ico
Internal Server Error: /user/
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 502, in parse
compile_func = self.tags[command]
~~~~~~~~~^^^^^^^^^
KeyError: 'endblock'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/app/myapp/views.py", line 187, in users
return render(request, 'user_page.html', context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/shortcuts.py", line 24, in render
content = loader.render_to_string(template_name, context, request, using=using)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/loader.py", line 61, in render_to_string
template = get_template(template_name, using=using)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/loader.py", line 15, in get_template
return engine.get_template(template_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/backends/django.py", line 33, in get_template
return Template(self.engine.get_template(template_name), self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/engine.py", line 175, in get_template
template, origin = self.find_template(template_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/engine.py", line 157, in find_template
template = loader.get_template(name, skip=skip)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/loaders/cached.py", line 57, in get_template
template = super().get_template(template_name, skip)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/loaders/base.py", line 28, in get_template
return Template(
^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 154, in __init__
self.nodelist = self.compile_nodelist()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 196, in compile_nodelist
return parser.parse()
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 510, in parse
raise self.error(token, e)
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 508, in parse
compiled_result = compile_func(self, token)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/loader_tags.py", line 295, in do_extends
nodelist = parser.parse()
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 510, in parse
raise self.error(token, e)
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 508, in parse
compiled_result = compile_func(self, token)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/loader_tags.py", line 234, in do_block
nodelist = parser.parse(("endblock",))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 510, in parse
raise self.error(token, e)
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 508, in parse
compiled_result = compile_func(self, token)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/defaulttags.py", line 960, in do_if
nodelist = parser.parse(("elif", "else", "endif"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 504, in parse
self.invalid_block_tag(token, command, parse_until)
File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 555, in invalid_block_tag
raise self.error(
django.template.exceptions.TemplateSyntaxError: Invalid block tag on line 262: 'endblock', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?
......@@ -7,7 +7,17 @@
User settings
</h1>
<h3 class="mb-4 text-xl font-semibold dark:text-white">
User type: {{ user_profile.user_type }}
{% if user_profile.user_type == 0 %}
User type: User
{% elif user_profile.user_type == 1 %}
User type: Admin
{% elif user_profile.user_type == 2 %}
User type: ML Engineer
{% elif user_profile.user_type == 3 %}
User type: Accountant
{% else %}
User type: Unknown
{% endif %}
</h3>
</div>
<!-- Right Content -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment