Django Jquery Post 500 Internal Server Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any
Jquery Post 500 Internal Server Error Php
questions you might have Meta Discuss the workings and policies jquery ajax post 500 internal server error of this site About Us Learn more about Stack Overflow the company Business Learn more jquery ajax post 500 internal server error asp net about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack
Django 500 Internal Server Error Apache
Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up 500 server error, I have no idea what's wrong, ajax, django up vote 2 down vote favorite I have these bits of code and I've been at it for
Django 500 Internal Server Error
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.CommonMi
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss django internal server error the workings and policies of this site About Us Learn more
Csrf_exempt
about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow httpresponse django Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping http://stackoverflow.com/questions/8125987/500-server-error-i-have-no-idea-whats-wrong-ajax-django each other. Join them; it only takes a minute: Sign up Django: Error 500 (INTERNAL SERVER ERROR) when doing ajax call up vote 5 down vote favorite Hi when I'm doing ajax call, I'm getting this in console: POST http://127.0.0.1:8000/registration/check/username/ 500 (INTERNAL SERVER ERROR) Also when I click on this link, I'm getting this: DoesNotExist at /registration/check/username/ User http://stackoverflow.com/questions/12015270/django-error-500-internal-server-error-when-doing-ajax-call matching query does not exist. Request Method: POST Request URL: http://127.0.0.1:8000/registration/check/username/ Django Version: 1.3 Exception Type: DoesNotExist JQuery: function check_username() { $("#id_username").change(function() { var user = $("#id_username").val(); var status = $("#id_username").nextAll(".status").first().empty(); var checking = ' Checking availability...'; var success = ''; var e_length = '
User name have to be longer
'; if (user.length >= 3) { status.append(checking); $.ajax({ url: "/registration/check/username/", type: "POST", data: { username : $("#id_username").val() }, dataType: "text", success: function(msg) { if (msg == '1') { status.append(success); } else { status.append("This username is already in use"); } } }); } else if (user.length <= 3 && user.length != 0) { status.append(e_length); } else { status; } }); } Html: {% block main-menu %}