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

create a 404 and 500 page for production server #411

Open
6 tasks done
Lungsangg opened this issue Oct 25, 2024 · 5 comments
Open
6 tasks done

create a 404 and 500 page for production server #411

Lungsangg opened this issue Oct 25, 2024 · 5 comments
Assignees

Comments

@Lungsangg
Copy link
Collaborator

Lungsangg commented Oct 25, 2024

current

The normal 404 page is not showing. debug is still set to True

Expected

have a user-friendly 404 and 500 page from Django

New Issue to solve :

Description :

Nginx need to setup in conjunction with python manage.py collectstatic in order to handle static file in production mode so that DEBUG False can work.

  • Debug issue
  • Setup collectstatic file from django
  • Setup Gunicorn
  • Setup Nginx
  • Setup Whitenoise
  • Test in dev.pecha.org
@Lungsangg Lungsangg self-assigned this Oct 25, 2024
@Lungsangg Lungsangg converted this from a draft issue Oct 25, 2024
@Lungsangg Lungsangg changed the title create a 404 page for production server create a 404 and 500 page for production server Oct 25, 2024
@Lungsangg Lungsangg moved this from IN PROGRESS to TESTING in Pecha.org Web Dev Oct 25, 2024
@Lungsangg
Copy link
Collaborator Author

Gen @drupchen la, i have added 404 page and 500 page (for internal server error).

@Lungsangg Lungsangg assigned drupchen and unassigned Lungsangg Oct 28, 2024
@drupchen
Copy link

Please tell me where I should test.

I tried in production by removing one letter in the url:

Image

same thing in dev:

Image

@drupchen drupchen assigned Lungsangg and unassigned drupchen Oct 29, 2024
@Lungsangg
Copy link
Collaborator Author

Image
@drupchen la its solved, can you plz check in dev

@ta4tsering ta4tsering moved this from IN PROGRESS to TESTING in Pecha.org Web Dev Nov 15, 2024
@ta4tsering ta4tsering assigned drupchen and unassigned Lungsangg Nov 15, 2024
@kaldan007 kaldan007 moved this from TESTING to TO DO in Pecha.org Web Dev Nov 19, 2024
@kaldan007 kaldan007 moved this from TO DO to IN PROGRESS in Pecha.org Web Dev Nov 19, 2024
@kaldan007 kaldan007 moved this from IN PROGRESS to TO DO in Pecha.org Web Dev Nov 19, 2024
@kaldan007 kaldan007 moved this from IN PROGRESS to TO DO in Pecha.org Web Dev Nov 20, 2024
@kaldan007 kaldan007 assigned Lungsangg and unassigned drupchen Nov 21, 2024
@Lungsangg
Copy link
Collaborator Author

Lungsangg commented Nov 29, 2024

@drupchen la, @lobsam right now couldn't add this to test, as my error solving in render log got stuck at below error/bug

Traceback (most recent call last):
info
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 41, in inner
info
    response = get_response(request)
info
  File "/usr/local/lib/python3.7/site-packages/django/utils/deprecation.py", line 140, in __call__
info
    response = self.get_response(request)
info
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 43, in inner
info
    response = response_for_exception(request, exc)
info
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 93, in response_for_exception
info
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
info
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 143, in handle_uncaught_exception
info
    return callback(request, **param_dict)
info
  File "/usr/local/lib/python3.7/site-packages/django/utils/decorators.py", line 149, in _wrapped_view
info
    response = view_func(request, *args, **kwargs)
info
  File "/app/reader/views.py", line 4948, in custom_server_error
info
    return render_template(request, template_name=template_name, app_props=None, template_context={}, status=500)
info
  File "/app/reader/views.py", line 185, in render_template
info
    status=status, using=using)
info
  File "/usr/local/lib/python3.7/site-packages/django/shortcuts.py", line 30, in render
info
    content = loader.render_to_string(template_name, context, request, using=using)
info
  File "/usr/local/lib/python3.7/site-packages/django/template/loader.py", line 68, in render_to_string
info
    return template.render(context, request)
info
  File "/usr/local/lib/python3.7/site-packages/django/template/backends/django.py", line 66, in render
info
    return self.template.render(context)
info
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 207, in render
info
    return self._render(context)
info
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 199, in _render
info
    return self.nodelist.render(context)
info
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 990, in render
info
    bit = node.render_annotated(context)
info
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 957, in render_annotated
info
    return self.render(context)
info
  File "/usr/local/lib/python3.7/site-packages/django/template/loader_tags.py", line 177, in render
info
    return compiled_parent._render(context)
info
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 199, in _render
info
    return self.nodelist.render(context)
info
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 990, in render
info
    bit = node.render_annotated(context)
info
  File "/usr/local/lib/python3.7/site-packages/django/template/base.py", line 957, in render_annotated
info
    return self.render(context)
info
  File "/usr/local/lib/python3.7/site-packages/django/template/library.py", line 203, in render
info
    output = self.func(*resolved_args, **resolved_kwargs)
info
  File "/usr/local/lib/python3.7/site-packages/webpack_loader/templatetags/webpack_loader.py", line 22, in render_bundle
info
    attrs=attrs, is_preload=is_preload)
info
  File "/usr/local/lib/python3.7/site-packages/webpack_loader/utils.py", line 63, in get_as_tags
info
    for chunk in bundle:
info
  File "/usr/local/lib/python3.7/site-packages/webpack_loader/loader.py", line 57, in map_chunk_files_to_url
info
    url = self.get_chunk_url(files[chunk])
info
  File "/usr/local/lib/python3.7/site-packages/webpack_loader/loader.py", line 69, in get_chunk_url
info
    return staticfiles_storage.url(relpath)
info
  File "/usr/local/lib/python3.7/site-packages/django/contrib/staticfiles/storage.py", line 162, in url
info
    return self._url(self.stored_name, name, force)
info
  File "/usr/local/lib/python3.7/site-packages/django/contrib/staticfiles/storage.py", line 141, in _url
info
    hashed_name = hashed_name_func(*args)
info
  File "/usr/local/lib/python3.7/site-packages/django/contrib/staticfiles/storage.py", line 432, in stored_name
info
    raise ValueError("Missing staticfiles manifest entry for '%s'" % clean_name)
info
ValueError: Missing staticfiles manifest entry for 'bundles/client/client-3d22b29d0de463207cb9.js'

@Lungsangg Lungsangg moved this from IN PROGRESS to BLOCKED in Pecha.org Web Dev Dec 2, 2024
@kaldan007 kaldan007 moved this from BLOCKED to TESTING in Pecha.org Web Dev Dec 3, 2024
@kaldan007 kaldan007 assigned drupchen and unassigned Lungsangg Dec 3, 2024
@drupchen drupchen moved this from Backlog to In progress in Pecha.org Roadmap Dec 3, 2024
@drupchen drupchen moved this from In progress to User testing in Pecha.org Roadmap Dec 3, 2024
@drupchen drupchen moved this from User testing to Done in Pecha.org Roadmap Dec 4, 2024
@drupchen drupchen closed this as completed by moving to Done in Pecha.org Roadmap Dec 4, 2024
@github-project-automation github-project-automation bot moved this from TESTING to DONE in Pecha.org Web Dev Dec 4, 2024
@github-project-automation github-project-automation bot moved this from Done to User testing in Pecha.org Roadmap Dec 4, 2024
@drupchen drupchen moved this from DONE to TESTING in Pecha.org Web Dev Dec 4, 2024
@kaldan007 kaldan007 moved this from TESTING to DONE in Pecha.org Web Dev Dec 5, 2024
@drupchen drupchen moved this from DONE to IN PROGRESS in Pecha.org Web Dev Feb 12, 2025
@drupchen drupchen moved this from IN PROGRESS to TO DO in Pecha.org Web Dev Feb 12, 2025
@drupchen
Copy link

still not showing properly.

ex: https://pecha.org/text

@drupchen drupchen reopened this Feb 12, 2025
@github-project-automation github-project-automation bot moved this from User testing to Backlog in Pecha.org Roadmap Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Status: TO DO
Development

No branches or pull requests

2 participants