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 6885863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:41:16+00:00 2026-05-27T05:41:16+00:00

I have these bits of code and I’ve been at it for hours but

  • 0

I have these bits of code and I’ve been at it for hours but I cannot figure what is wrong.

I keep getting a 500 server response, and it wouldn’t even start debugging in the view definition when I trigger the ajax.

I’m really at a loss, any help would be fantastic!

    $('.cheque_info_edit_button').live('click', function(){

var new_cheque = {
    // cheque number is taken from the cell, not input box for this one.
    cheque_no: $(this).closest('td').closest('tr').find('.inv_prof_cheque_no').text(),
    their_bank: $(this).closest('td').closest('tr').find('.new_their_bank_input_ajax').val(),
    our_bank: $(this).closest('td').closest('tr').find('.new_our_bank_input_ajax').val(),
    cash_in_date: $(this).closest('td').closest('tr').find('.new_cash_in_date_input_ajax').val(),
    cheque_amount: $(this).closest('td').closest('tr').find('.new_cheque_amount_input_ajax').val(),
    info_type: 'edit'
   };

    var cheque_json = JSON.stringify(new_cheque);
    $.ajax({
       type: 'POST',
       url: '/best_choose/invoice/profile/inv_add_or_edit_cheque/',
       data: cheque_json,
       success: function(){
       // do stuff
}

UPDATE: I don’t think syntacticly there are anything wrong with my view, so I took it out and added the traceback, is it something wrong with the csrf token? All of my other ajax functions work

Environment:


Request Method: POST
Request URL: http://127.0.0.1:8000/best_choose/invoice/profile/inv_add_or_edit_cheque/

Django Version: 1.3
Python Version: 2.7.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'SY_SYSTEM.sy_system',
 'django.contrib.humanize']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.middleware.csrf.CsrfResponseMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


 Traceback:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  178.                 response = middleware_method(request, response)
 File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/middleware/csrf.py" in process_response
  287.             response.content, n = _POST_FORM_RE.subn(add_csrf_field, response.content)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/http/__init__.py" in _get_content
  596.         return smart_str(''.join(self._container), self._charset)

Exception Type: TypeError at /best_choose/invoice/profile/inv_add_or_edit_cheque/
Exception Value: sequence item 0: expected string, NoneType found
  • 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-27T05:41:17+00:00Added an answer on May 27, 2026 at 5:41 am

    I saw ur jquery code and there should not be any errors…

    just a wild guess because something similar happened to me before and took me a while to realize it (forgot what the traceback looks like)

    You may want to check your urls file and make sure you’re not using the same url or the wildcard of an existing url pattern.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bunch of these little bits of HTML code repeated over and
I have two separate (but similar) bits of jQuery code. They both work, but
I've heard bits and pieces here and there, but I have yet find a
I have these two pieces of code, wich one is more readable? foreach decimal
Would anyone mind having a look at these bits of code and see if
In my mind these two bits of code should work the same: window.location =
In my javascript I have some bits of code specifically used for debugging which
I have some code (that is working), but I just want to make sure
I have an application that was developed for Linux x86 32 bits. There are
I have these 3 tables + data: items : itemId, itemName data: 1, my

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.