Forums

http error 500 38 ?

my access-log:

[18/Mar/2015:01:08:51 +0000] "GET /yimi-admin/send-create-menu/ HTTP/1.1" 500 38 "http://guistory.pythonanywhere.com/yimi-admin/menus-list/" "Mozilla/5.0

send-create-menu function:

@login_required(login_url=LOGIN_URL)
def send_create_menu(request):
    if get_appitem(request.user).send_create_menu():
        return_data = {'error': 0}
    else:
        return_data = {"error": 1}
    json_data = json.dumps(return_data)
    return HttpResponse(json_data, content_type="application/json")

get_appitem function:

def get_appitem(self):
            return self.appitem_set.first()

[edited by admin: formatting]

help me

 get_appitem(request.user).send_create_menu():

this looks funny, but hard to say without more information.