Django is_popup variable does not exist in base.html - django

I'm trying to config the django project in vscode and running via debug.
python==3.6.7
Django==2.1.8
When I try to open http://127.0.0.1:8000/admin/ I am getting the following error, please refer the screen shot below.
I tried many possible workaround from google, by trying to change logging level from debug to info, but nothing seems to be worked.
I request you to please let me know how to fix this issues.
Thanks in advance.
Error Logs:
Exception has occurred: VariableDoesNotExist
Failed lookup for key [is_popup] in [{'True': True, 'False': False, 'None': None}, {'csrf_token': <SimpleLazyObject: <function csrf.<locals>._get_val at 0x7ff6323e3510>>, 'request': <WSGIRequest: GET '/admin/login/?next=/admin/'>, 'user': <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7ff632434dd8>>, 'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x7ff6323b2f98>, 'messages': <django.contrib.messages.storage.fallback.FallbackStorage object at 0x7ff63246cc88>, 'DEFAULT_MESSAGE_LEVELS': {'DEBUG': 10, 'INFO': 20, 'SUCCESS': 25, 'WARNING': 30, 'ERROR': 40}}, {}, {'form': <AdminAuthenticationForm bound=False, valid=Unknown, fields=(username;password)>, 'view': <django.contrib.auth.views.LoginView object at 0x7ff63246cc50>, 'site_title': 'Django site admin', 'site_header': 'Django administration', 'site_url': '/', 'has_permission': False, 'available_apps': [], 'title': 'Log in', 'app_path': '/admin/login/?next=/admin/', 'username': '', 'next': '/admin/', 'site': <django.contrib.sites.requests.RequestSite object at 0x7ff6323f95f8>, 'site_name': '127.0.0.1:8000', 'LANGUAGE_CODE': 'en-us', 'LANGUAGE_BIDI': False}]
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/base.py", line 850, in _resolve_lookup
(bit, current)) # missing attribute
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/base.py", line 796, in resolve
value = self._resolve_lookup(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/base.py", line 671, in resolve
obj = self.var.resolve(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/defaulttags.py", line 875, in eval
return self.value.resolve(context, ignore_failures=True)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/defaulttags.py", line 302, in render
match = condition.eval(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/base.py", line 163, in _render
return self.nodelist.render(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/base.py", line 163, in _render
return self.nodelist.render(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/base.py", line 163, in _render
return self.nodelist.render(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/base.py", line 171, in render
return self._render(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/response.py", line 83, in rendered_content
content = template.render(context, self._request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/template/response.py", line 106, in render
self.content = self.rendered_content
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 154, in _get_response
response = response.render()
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/utils/deprecation.py", line 91, in __call__
response = response or self.get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/utils/deprecation.py", line 91, in __call__
response = response or self.get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/utils/deprecation.py", line 91, in __call__
response = response or self.get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/utils/deprecation.py", line 91, in __call__
response = response or self.get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/utils/deprecation.py", line 91, in __call__
response = response or self.get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/utils/deprecation.py", line 91, in __call__
response = response or self.get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/utils/deprecation.py", line 91, in __call__
response = response or self.get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 78, in get_response
response = self._middleware_chain(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 142, in __call__
response = self.get_response(request)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/contrib/staticfiles/handlers.py", line 65, in __call__
return self.application(environ, start_response)
File "/usr/lib/python3.6/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/servers/basehttp.py", line 194, in handle_one_request
handler.run(self.server.get_app())
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/servers/basehttp.py", line 169, in handle
self.handle_one_request()
File "/usr/lib/python3.6/socketserver.py", line 721, in __init__
self.handle()
File "/usr/lib/python3.6/socketserver.py", line 361, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.6/socketserver.py", line 348, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python3.6/socketserver.py", line 317, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python3.6/socketserver.py", line 238, in serve_forever
self._handle_request_noblock()
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/servers/basehttp.py", line 213, in run
httpd.serve_forever()
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 139, in inner_run
ipv6=self.use_ipv6, threading=threading, server_cls=self.server_cls)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 104, in run
self.inner_run(None, **options)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 95, in handle
self.run(**options)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
output = self.handle(*args, **options)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 60, in execute
super().execute(*args, **options)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/fs052/Desktop/workspace/tryouts/dj2/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/fs052/Desktop/workspace/tryouts/dj2/dj2/manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.6/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/lib/python3.6/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)

Seems your django installation is corrupt. Try this
pip install -I django

Related

How to handle migrations in Django project in production (Digital Ocean App Platform)?

I have been using the app platform for almost 2 months. Yesterday, I made some changes in database tables (models) in my Django projects. I pushed those changes to Github and my app successfully redeployed. But When I open the site, I got “ProgrammingError” that some field that I created new in the existing table does not exist. So, I opened the console in App Platform and applied migrations but nothing is changed. I am still facing the error.
Here is the full traceback:
Traceback (most recent call last):
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
The above exception (column products_subcategory.description does not exist
LINE 1: ...subcategory"."id", "products_subcategory"."name", "products_...
^
) was the direct cause of the following exception:
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
return handler(request, *args, **kwargs)
File "/workspace/lavisco/views.py", line 40, in get
return render(request, 'lavisco/index.html', context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/shortcuts.py", line 19, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/loader.py", line 62, in render_to_string
return template.render(context, request)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/base.py", line 170, in render
return self._render(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/loader_tags.py", line 192, in render
return template.render(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/base.py", line 172, in render
return self._render(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/base.py", line 162, in _render
return self.nodelist.render(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/base.py", line 938, in render
bit = node.render_annotated(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
return self.render(context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/template/defaulttags.py", line 311, in render
if match:
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/models/query.py", line 291, in bool
self._fetch_all()
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/models/query.py", line 1308, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/models/query.py", line 53, in iter
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1156, in execute_sql
cursor.execute(sql, params)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute
return super().execute(sql, params)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
Exception Type: ProgrammingError at /
Exception Value: column products_subcategory.description does not exist
LINE 1: ...subcategory"."id", "products_subcategory"."name", "products_...

Django catch missing manifest exceptions

Every now and then I end up with a missing file after deploy a django project, and I find it one of the hardest issues to debug because I get no logging and no error email, its just dead. I have made a custom 500 error page (followed this answer). Is it possible to show the details of which static file is missing on it? With this error Django fails before rendering a 500 page.
Heres a traceback of the error:
Traceback (most recent call last):
File "/usr/lib/python3.8/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/home/user/venv/project/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 133, in __call__
response = self.get_response(request)
File "/home/user/venv/project/lib/python3.8/site-packages/django/core/handlers/base.py", line 75, in get_response
response = self._middleware_chain(request)
File "/home/user/venv/project/lib/python3.8/site-packages/django/core/handlers/exception.py", line 36, in inner
response = response_for_exception(request, exc)
File "/home/user/venv/project/lib/python3.8/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/home/user/venv/project/lib/python3.8/site-packages/django/core/handlers/exception.py", line 129, in handle_uncaught_exception
return callback(request, **param_dict)
File "/home/user/project/src/core/base/views.py", line 236, in error_500_view
response = render(request, "core.base/500.html", context=context)
File "/home/user/venv/project/lib/python3.8/site-packages/django/shortcuts.py", line 19, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/home/user/venv/project/lib/python3.8/site-packages/django/template/loader.py", line 62, in render_to_string
return template.render(context, request)
File "/home/user/venv/project/lib/python3.8/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/home/user/venv/project/lib/python3.8/site-packages/django/template/base.py", line 171, in render
return self._render(context)
File "/home/user/venv/project/lib/python3.8/site-packages/django/test/utils.py", line 95, in instrumented_test_render
return self.nodelist.render(context)
File "/home/user/venv/project/lib/python3.8/site-packages/django/template/base.py", line 936, in render
bit = node.render_annotated(context)
File "/home/user/venv/project/lib/python3.8/site-packages/django/template/base.py", line 903, in render_annotated
return self.render(context)
File "/home/user/venv/project/lib/python3.8/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/home/user/venv/project/lib/python3.8/site-packages/django/test/utils.py", line 95, in instrumented_test_render
return self.nodelist.render(context)
File "/home/user/venv/project/lib/python3.8/site-packages/django/template/base.py", line 936, in render
bit = node.render_annotated(context)
File "/home/user/venv/project/lib/python3.8/site-packages/django/template/base.py", line 903, in render_annotated
return self.render(context)
File "/home/user/venv/project/lib/python3.8/site-packages/django/templatetags/static.py", line 106, in render
url = self.url(context)
File "/home/user/venv/project/lib/python3.8/site-packages/django/templatetags/static.py", line 103, in url
return self.handle_simple(path)
File "/home/user/venv/project/lib/python3.8/site-packages/django/templatetags/static.py", line 118, in handle_simple
return staticfiles_storage.url(path)
File "/home/user/venv/project/lib/python3.8/site-packages/django/contrib/staticfiles/storage.py", line 153, in url
return self._url(self.stored_name, name, force)
File "/home/user/venv/project/lib/python3.8/site-packages/django/contrib/staticfiles/storage.py", line 132, in _url
hashed_name = hashed_name_func(*args)
File "/home/user/venv/project/lib/python3.8/site-packages/django/contrib/staticfiles/storage.py", line 423, in stored_name
raise ValueError("Missing staticfiles manifest entry for '%s'" % clean_name)
ValueError: Missing staticfiles manifest entry for 'img/pwa/browserconfig.xml'

How to use reverse url within app to point to a template of a different app?

I have two apps: simulation_api and building_data. Each one has templates and urls. The urls I import in my main configuration.
In my template of simulation_api I would like to set a link to my detail view of building data.
This is what I am trying (in my template of simulation_api) which throws me an error (django.urls.exceptions.NoReverseMatch):
{% for item in simulations.project.buildinggroup_set.all %}
{{ item.description }}
{% endfor%}
The for loop works, the problem is the url that I am trying to reverse.
I am reversing it like this in my models of building_data:
class BuildingGroup(models.Model):
name = models.CharField(max_length=500, null=True, blank=True)
project = models.ForeignKey(Project, on_delete=models.CASCADE)
def get_absolute_url(self):
return reverse("detail_building_group", kwargs={"id" : self.id})
I think the problem is somehow that I reverse the url in one app but it is not recognised in the template of the other app. But maybe it's also something else...
Anyone has an idea? Thanks so much in advance! Very much appreciated!
Not sure if it is useful, but here my simplified model for the simulation:
class Simulation(models.Model):
project = models.ForeignKey(Project, on_delete=models.CASCADE)
my urls of building_data
app_name = 'buildings'
urlpatterns = [
path('list/building-group/<int:id>/', DetailBuildingGroupView.as_view(), name="detail_building_group"),
]
My traceback:
django.urls.exceptions.NoReverseMatch
django.urls.exceptions.NoReverseMatch: Reverse for 'detail_building_group' not found. 'detail_building_group' is not a valid view function or pattern name.
Traceback (most recent call last)
File "/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/handlers.py", line 66, in __call__
return self.application(environ, start_response)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 146, in __call__
response = self.get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 81, in get_response
response = self._middleware_chain(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
response = response_for_exception(request, exc)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
response = self.get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
response = response_for_exception(request, exc)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
response = self.get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
response = response_for_exception(request, exc)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
response = self.get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
response = response_for_exception(request, exc)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
response = self.get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
response = response_for_exception(request, exc)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
response = self.get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
response = response_for_exception(request, exc)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
response = self.get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
response = response_for_exception(request, exc)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
response = self.get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
response = response_for_exception(request, exc)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
response = self.get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
response = response_for_exception(request, exc)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/app/analytics/middleware.py", line 22, in __call__
response = self.get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
response = response_for_exception(request, exc)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py", line 95, in __call__
response = self.get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
response = response_for_exception(request, exc)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 158, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 156, in _get_response
response = response.render()
File "/usr/local/lib/python3.6/site-packages/django/template/response.py", line 106, in render
self.content = self.rendered_content
File "/usr/local/lib/python3.6/site-packages/django/template/response.py", line 83, in rendered_content
content = template.render(context, self._request)
File "/usr/local/lib/python3.6/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 175, in render
return self._render(context)
File "/usr/local/lib/python3.6/site-packages/django/test/utils.py", line 98, in instrumented_test_render
return self.nodelist.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 943, in render
bit = node.render_annotated(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 910, in render_annotated
return self.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/loader_tags.py", line 155, in render
return compiled_parent._render(context)
File "/usr/local/lib/python3.6/site-packages/django/test/utils.py", line 98, in instrumented_test_render
return self.nodelist.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 943, in render
bit = node.render_annotated(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 910, in render_annotated
return self.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/loader_tags.py", line 67, in render
result = block.nodelist.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 943, in render
bit = node.render_annotated(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 910, in render_annotated
return self.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/defaulttags.py", line 211, in render
nodelist.append(node.render_annotated(context))
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 910, in render_annotated
return self.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/defaulttags.py", line 447, in render
url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
File "/usr/local/lib/python3.6/site-packages/django/urls/base.py", line 90, in reverse
return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
File "/usr/local/lib/python3.6/site-packages/django/urls/resolvers.py", line 636, in _reverse_with_prefix
raise NoReverseMatch(msg)
django.urls.exceptions.NoReverseMatch: Reverse for 'detail_building_group' not found. 'detail_building_group' is not a valid view function or pattern name.
I solved it doing this:
I added a namespace to my urls in my main config.
Then I reversed it like this:
def get_absolute_url(self):
return reverse("buildings:detail_building_group", kwargs={"id": self.id})
whereas buildings is my namespace and detail_building_groupis my url-name.
Also I had to add my detail-url to my other app as well in the urls, so it recognized the url.
Thanks JPG for leading me in the right direction!
This also helped: http://cheng.logdown.com/posts/2016/01/06/django-how-to-reverse-urls-belonged-to-other-apps

Django Password Reset No reverse match

I am trying to use password reset of django
I am getting the following error after I have entered email for password reset
django.urls.exceptions.NoReverseMatch: Reverse for
'password_reset_confirm' not found. 'password_reset_confirm' is not a
valid view function or pattern name.
my urls.py include
path(
"dashboard/",
include(("ami.dashboard.urls", "dashboard"), namespace="dashboard"),
),
my dashboard/urls.py is
from django.conf.urls import include, url
# from graphene_django.views import GraphQLView
# from django.contrib import admin
from django.contrib.auth import views as auth_views
from . import views as core_views
from .product.urls import urlpatterns as product_urls
urlpatterns = [
url(r'^$', core_views.index, name='index'),
url(r'^products/', include(product_urls)),
# url(r'^login/$', auth_views.login, name='login'),
url(r'^login/$', auth_views.login, {'template_name': 'dashboard/login.html'}, name='login'),
url(r'^logout/$', auth_views.logout, {'next_page': '/'}, name='logout'),
# url(r'^logout/$', auth_views.logout, name='logout'),
# url(r'^admin/', admin.site.urls),
url(r'^', include('django.contrib.auth.urls')),
url(r'^password_reset/$', auth_views.password_reset, {
'post_reset_redirect': '/dashboard/password_reset/done/'
, 'template_name': 'registration/password_reset_form.html'},
name='password_reset'),
url(r'^password_reset/done/$', auth_views.password_reset_done,
{'template_name': 'registration/password_reset_done.html'}, name='password_reset_done'),
url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
auth_views.password_reset_confirm, {'template_name': 'registration/password_reset_confirm.html'},
name='password_reset_confirm'),
url(r'^reset/done/$', auth_views.password_reset_complete,
{'template_name': 'registration/password_reset_complete.html'},
name='password_reset_complete'),
]
error Traceback:
File
"/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/handlers.py",
line 66, in call
return self.application(environ, start_response)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/wsgi.py",
line 146, in call
response = self.get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py",
line 81, in get_response
response = self._middleware_chain(request)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 37, in inner
response = response_for_exception(request, exc)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 87, in response_for_exception
response = handle_uncaught_exception(request,
get_resolver(get_urlconf()), sys.exc_info())
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File
"/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in
reraise
raise value
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 35, in inner
response = get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py",
line 95, in call
response = self.get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 37, in inner
response = response_for_exception(request, exc)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 87, in response_for_exception
response = handle_uncaught_exception(request,
get_resolver(get_urlconf()), sys.exc_info())
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File
"/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in
reraise
raise value
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 35, in inner
response = get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py",
line 95, in call
response = self.get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 37, in inner
response = response_for_exception(request, exc)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 87, in response_for_exception
response = handle_uncaught_exception(request,
get_resolver(get_urlconf()), sys.exc_info())
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File
"/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in
reraise
raise value
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 35, in inner
response = get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py",
line 95, in call
response = self.get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 37, in inner
response = response_for_exception(request, exc)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 87, in response_for_exception
response = handle_uncaught_exception(request,
get_resolver(get_urlconf()), sys.exc_info())
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File
"/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in
reraise
raise value
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 35, in inner
response = get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py",
line 95, in call
response = self.get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 37, in inner
response = response_for_exception(request, exc)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 87, in response_for_exception
response = handle_uncaught_exception(request,
get_resolver(get_urlconf()), sys.exc_info())
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File
"/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in
reraise
raise value
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 35, in inner
response = get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py",
line 95, in call
response = self.get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 37, in inner
response = response_for_exception(request, exc)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 87, in response_for_exception
response = handle_uncaught_exception(request,
get_resolver(get_urlconf()), sys.exc_info())
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File
"/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in
reraise
raise value
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 35, in inner
response = get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py",
line 95, in call
response = self.get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 37, in inner
response = response_for_exception(request, exc)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 87, in response_for_exception
response = handle_uncaught_exception(request,
get_resolver(get_urlconf()), sys.exc_info())
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File
"/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in
reraise
raise value
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 35, in inner
response = get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py",
line 95, in call
response = self.get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 37, in inner
response = response_for_exception(request, exc)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 87, in response_for_exception
response = handle_uncaught_exception(request,
get_resolver(get_urlconf()), sys.exc_info())
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File
"/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in
reraise
raise value
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 35, in inner
response = get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/utils/deprecation.py",
line 95, in call
response = self.get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 37, in inner
response = response_for_exception(request, exc)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 87, in response_for_exception
response = handle_uncaught_exception(request,
get_resolver(get_urlconf()), sys.exc_info())
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 122, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File
"/usr/local/lib/python3.6/site-packages/django_extensions/management/technical_response.py", line 6, in null_technical_500_response
six.reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/six.py", line 693, in
reraise
raise value
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
line 35, in inner
response = get_response(request)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py",
line 128, in _get_response
response = self.process_exception_by_middleware(e, request)
File
"/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py",
line 126, in _get_response
response = wrapped_callback(request, *callback_args,
**callback_kwargs)
File "/usr/local/lib/python3.6/contextlib.py", line 52, in inner
return func(*args, **kwds)
File
"/usr/local/lib/python3.6/site-packages/django/views/generic/base.py",
line 69, in view
return self.dispatch(request, *args, **kwargs)
File
"/usr/local/lib/python3.6/site-packages/django/utils/decorators.py",
line 62, in _wrapper
return bound_func(*args, **kwargs)
File
"/usr/local/lib/python3.6/site-packages/django/utils/decorators.py",
line 142, in _wrapped_view
response = view_func(request, *args, **kwargs)
File
"/usr/local/lib/python3.6/site-packages/django/utils/decorators.py",
line 58, in bound_func
return func.get(self, type(self))(*args2, **kwargs2)
File
"/usr/local/lib/python3.6/site-packages/django/contrib/auth/views.py",
line 407, in dispatch
return super().dispatch(*args, **kwargs)
File
"/usr/local/lib/python3.6/site-packages/django/views/generic/base.py",
line 89, in dispatch
return handler(request, *args, **kwargs)
File
"/usr/local/lib/python3.6/site-packages/django/views/generic/edit.py",
line 142, in post
return self.form_valid(form)
File
"/usr/local/lib/python3.6/site-packages/django/contrib/auth/views.py",
line 420, in form_valid
form.save(**opts)
File
"/usr/local/lib/python3.6/site-packages/django/contrib/auth/forms.py",
line 297, in save
email, html_email_template_name=html_email_template_name,
File
"/usr/local/lib/python3.6/site-packages/django/contrib/auth/forms.py",
line 244, in send_mail
body = loader.render_to_string(email_template_name, context)
File
"/usr/local/lib/python3.6/site-packages/django/template/loader.py",
line 62, in render_to_string
return template.render(context, request)
File
"/usr/local/lib/python3.6/site-packages/django/template/backends/django.py",
line 61, in render
return self.template.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py",
line 175, in render
return self._render(context)
File "/usr/local/lib/python3.6/site-packages/django/test/utils.py",
line 98, in instrumented_test_render
return self.nodelist.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py",
line 943, in render
bit = node.render_annotated(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py",
line 910, in render_annotated
return self.render(context)
File
"/usr/local/lib/python3.6/site-packages/django/template/defaulttags.py",
line 37, in render
output = self.nodelist.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py",
line 943, in render
bit = node.render_annotated(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py",
line 910, in render_annotated
return self.render(context)
File
"/usr/local/lib/python3.6/site-packages/django/template/defaulttags.py",
line 447, in render
url = reverse(view_name, args=args, kwargs=kwargs,
current_app=current_app)
File "/usr/local/lib/python3.6/site-packages/django/urls/base.py",
line 88, in reverse
return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args,
**kwargs))
File
"/usr/local/lib/python3.6/site-packages/django/urls/resolvers.py",
line 632, in _reverse_with_prefix
You're specifying a namespace - "dashboard" for the URLs you're including:
include(("ami.dashboard.urls", "dashboard"), namespace="dashboard"),
In this situation you need to include the namespace when reversing an URL, try:
reverse('dashboard:password_reset_confirm')
And in templates you would use:
{% url 'dashboard:password_reset_confirm' %}
More information in the Django docs: Reversing namespaced URLs

Django Exception NoReverseMatch for an app not installed (anymore)

I was develping a site and once installed django-bb, but at some point i've decided not to use anymore, so i "turned-off" django-bb commenting all reference code. So far all good. On my dev machine everting runs ok. But on the server machine, something is calling for djangobb. I tried to delete all files relatives to djangobb, and it's no way i can get rid of this exception error. And I've checked all my html code and cant find anyware this call for djangobb.
Please anybody can help?
File "/root/Envs/PolyAssocEnv/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 280, in run
self.result = application(self.environ, self.start_response)
File "/root/Envs/PolyAssocEnv/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 674, in __call__
return self.application(environ, start_response)
File "/root/Envs/PolyAssocEnv/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 248, in __call__
response = self.get_response(request)
File "/root/Envs/PolyAssocEnv/lib/python2.6/site-packages/django/core/handlers/base.py", line 130, in get_response
return self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "/root/Envs/PolyAssocEnv/lib/python2.6/site-packages/django/core/handlers/base.py", line 180, in handle_uncaught_exception
return callback(request, **param_dict)
File "/root/Envs/PolyAssocEnv/lib/python2.6/site-packages/django/utils/decorators.py", line 76, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/root/Envs/PolyAssocEnv/lib/python2.6/site-packages/django/views/defaults.py", line 31, in server_error
return http.HttpResponseServerError(t.render(Context({})))
File "/root/Envs/PolyAssocEnv/lib/python2.6/site-packages/django/template/__init__.py", line 173, in render
return self._render(context)
File "/root/Envs/PolyAssocEnv/lib/python2.6/site-packages/django/template/__init__.py", line 167, in _render
return self.nodelist.render(context)
File "/root/Envs/PolyAssocEnv/lib/python2.6/site-packages/django/template/__init__.py", line 796, in render
bits.append(self.render_node(node, context))
File "/root/Envs/PolyAssocEnv/lib/python2.6/site-packages/django/template/__init__.py", line 809, in render_node
return node.render(context)
File "/root/Envs/PolyAssocEnv/lib/python2.6/site-packages/django/template/defaulttags.py", line 385, in render
raise e
NoReverseMatch: u'djangobb' is not a registered namespace