Django Network Error 500 Internal Server Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies django 500 internal server error apache of this site About Us Learn more about Stack Overflow the company 500 internal server error django ajax Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users django post 500 internal server error Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a python cgi 500 internal server error minute: Sign up Django - 500 INTERNAL SERVER ERROR up vote 0 down vote favorite What I am currently trying to do is to create a Error 404 page on my Django Server. In order to see the Error 404 page, you must turn django's debugging to off. So when I change it to "DEBUG = False" I am able to see
Server Error (500) Django
my webpage and see the Error 404 page when going to a page that is not on the server. I went back to my main page and with Firebug realized that I was getting a NetworkError: 500 INTERNAL SERVER ERROR It is preventing me to pull data from Django. However, when I change "DEBUG = False" to "DEBUG = True". Everything works. Any Clue? edit: Full error "NetworkError: 500 INTERNAL SERVER ERROR - http://localhost:8000/static/ext-4.0.2a/resources/css/ext-all.css" edit edit: So I was kinda reserved with what I posted on error side. I'll take a look at the static serving however this is the full error "NetworkError: 500 INTERNAL SERVER ERROR - http://localhost:8000/static/ext-4.0.2a/resources/css/ext- "NetworkError: 500 INTERNAL SERVER ERROR - http://localhost:8000/static/ext-4.0.2a/bootstrap.js" "NetworkError: 500 INTERNAL SERVER ERROR - http://localhost:8000/static/example-data.js" "NetworkError: 500 INTERNAL SERVER ERROR - http://localhost:8000/static/StatusBar.js" "NetworkError: 500 INTERNAL SERVER ERROR - http://localhost:8000/static/LiveSearchGridPanel.js" "NetworkError: 500 INTERNAL SERVER ERROR - http://localhost:8000/static/frontend.js" "NetworkError: 500 INTERNAL SERVER ERROR - http://localhost:8000/static/InspectHostPanel.js" "NetworkError: 500 INTERNAL SERVER ERROR - http://localhost:8000/static/InspectGuestPanel.js" "NetworkError: 500 INTERNAL SERVER ERROR - http://localhost:8000/static/StatusBar.js" "NetworkError: 500 INTERNAL SERVER ERROR - http://localhost:8000/static/LiveSearchGridPanel.js" "NetworkError: 500 INTERNAL SERVER ERROR - http://localhost:8000/static/frontend.js" "NetworkError: 500 INTERNAL SERVER
here for a quick overview of the site Help Center Detailed answers to any questions
Csrf_exempt
you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more 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 Overflow is http://stackoverflow.com/questions/6919215/django-500-internal-server-error a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up jQuery $.post to Django returns “500 Internal Server Error” up vote 6 down vote favorite 1 I am working on the jQuery tutorial (Link) but have been stuck at the section, "RATE http://stackoverflow.com/questions/5941528/jquery-post-to-django-returns-500-internal-server-error ME: USING AJAX" jQuery: $(document).ready(function() { // generate markup $("#rating").append("Please rate: "); for ( var i = 1; i <= 5; i++ ) $("#rating").append("" + i + " "); // add markup to container and apply click handlers to anchors $("#rating a").click(function(e){ // stop normal link click e.preventDefault(); // send request $.post("/vote", {rating: $(this).html()}, function(xml) { // format and output result $("#rating div").html( "Thanks for rating, current average: " + $("average", xml).text() + ", number of votes: " + $("count", xml).text() ); }); }); }); urls.py: urlpatterns = patterns('', (r'^rating/$', 'ajax_rating.views.rating'), (r'^vote/$', 'ajax_rating.views.vote'), ) views.py: @csrf_exempt def vote(request): if request.is_ajax(): rating = request['rating'] f = open('ratings.dat', 'w') votes = json.load(f) votes.append(rating) f.close() dict = {} total_rating = sum(votes) dict['count'] = len(votes) dict['avg'] = total_rating / dict['count'] return HttpResponse(serializers.serialize('xml', dict), 'application/xml') else: return HttpResponse(status=400) Basically, the html offers the user to make a choice between 1 to 5 (anchors with class=rating). Once a choice is click
hi there,i have a small problem. i googled a lot, but couldnot find anything whichhelps me.i have http://grokbase.com/t/gg/django-users/12556w8fky/ajax-call-says-networkerror-500-internal-server-error-http-127-0-0-1-8000-ajax $.ajax call and before that i have included the js file where i havethat csrf-protection code from djangodocs.here is my ajax call: http://dpaste.com/hold/743156/but once i click on the event, i get this error: "NetworkError: 500INTERNAL SERVER ERROR - http://127.0.0.1:8000/ajax/".my urls.py has: url(r'^ajax/', 'home.views.ajax'),and my ajax function is simply:def server error ajax(request):print 'test'i dont have any clues why this is happening. can someone please help me?many many thanks--You received this message because you are subscribed to the Google Groups "Django users" group.To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/1Y1E6RZOc7wJ.To post to this group, send email to django-users@googlegroups.com.To 500 internal server unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.For more options, visit this group at http://groups.google.com/group/django-users?hl=en. reply Tweet Search Discussions Search All Groups django-users 2 responses Oldest Nested Alexandr Aibulatov Your view should return an HttpResponse Object. Your view prints 'test' and returns NoneType Object. Yours view should be like this: from django.http import HttpResponse def ajax(request): return HttpResponse('test', mimetype="text/plain") 2012/5/5 doniyor : -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to Alexandr Aibulatov at May 5, 2012 at 7:50 am ⇧ Your view should return an HttpResponse Object. Your view prints'test' and returns NoneType Object.Yours view should be like this:from django.http import HttpResponsedef ajax(request):return HttpResponse('test', mimetype="text/plain")2012/5/5 doniyor