Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

237
Views
Matching query does not exist ERROR: "__.models.__.DoesNotExist: __ matching query does not exist."

I'm trying to send data to my database using Django Models and Views file but I'm continuously getting this error: "raise self.model.DoesNotExist( crm.models.Time_Stamps.DoesNotExist: Time_Stamps matching query does not exist."

I do have 'Time_Stamps' as a Model in models.py file.

How to resolve it?

views.py

def update_counter(request):
    if request.method == 'POST':
        timestamp = Time_Stamps.objects.get()
        counterValue = request.POST['counter']
        #timestamp.Task_ID = counterValue
        timestamp.startTime = request.POST['timestamp']
        print(counterValue)
        print(startTime)
        timestamp.save()
        message = 'update successful'
    return HttpResponse(message)

models.py

class Time_Stamps(models.Model):
    TimeStamp = models.IntegerField(default=0)
    def __str__(self):
        return self.TimeStamp
    class Meta:
        verbose_name_plural = 'TimeStamps'

ERROR

......................
File "C:\Users\kushw\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\models\query.py", line 435, in get
    raise self.model.DoesNotExist(
crm.models.Time_Stamps.DoesNotExist: Time_Stamps matching query does not exist.
[24/Sep/2021 15:44:27] "POST /update_counter/ HTTP/1.1" 500 73227
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!