Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5847973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:47:40+00:00 2026-05-22T12:47:40+00:00

I am receiving notifications every time, when enter an address that does not exist.

  • 0

I am receiving notifications every time, when enter an address that does not exist.

Traceback (most recent call last):
File “/home/user/opt/local/django/core/handlers/base.py”, line 100, in get_response
File “/web/blog/views.py”, line 33, in post
File “/home/user/local/django/db/models/manager.py”, line 132, in get
File “/home/user/opt/local/django/db/models/query.py”, line 347, in get
DoesNotExist: Post matching query does not exist.

how to solve it

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:47:40+00:00Added an answer on May 22, 2026 at 12:47 pm

    Modify your query to use get_object_or_404, or catch the YourModel.DoesNotExist (3rd paragraph) exception when you’re doing the lookup, and raise a Http404 exception. When you don’t catch the DoesNotExist exception the view raises a 500 error. As a side effect, this sends an exception email to the the ADMINS defined it settings.py.

    Example of both cases:

    from django.shortcuts import get_object_or_404
    
    post_id = 1
    post = get_object_or_404(Post, id=post_id)
    
    # or catch the exception and do something with it
    
    from django.http import Http404
    try:
        post = Post.objects.get(id=post_id)
    except Post.DoesNotExist:
        # id doesnt exist... do extra things here
        raise Http404
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem where I don't receive notifications every time I push them
I am working on an application that is receiving XMPP notifications using the Matrix
I'm still working on my problem that an NSView in NSMenuItem is not receiving
I'm receiving feedback from a developer that The only way visual basic (6) can
Has anybody had the experience of Local Notifications being delivered from an app that
I have an app that subscribes to a specific kind of notifications from the
Possible Duplicate: Receiving power notifications (especially shutdown) on Mac OSX Hi Guys, I'd like
Am attempting to add push notifications to an application that I have created. I
I am trying to send growl notifications from PHP. The receiving computer is OSX
I have a problem recieving notifications from LocationManager after a set period of time:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.