Help with runserver

57 views
Skip to first unread message

NS

unread,
Nov 19, 2016, 8:00:14 PM11/19/16
to Django users
When I run python manage.py runserver, I get this shown on localhost:8000

{"status": "fail",  "method": "", "error":""}


What happened?

Alex Heyden

unread,
Nov 19, 2016, 9:36:30 PM11/19/16
to django...@googlegroups.com
We'd need to see your settings file and maybe your top-level urls.py to answer it conclusively, but in general terms, some view that's been mapped to root on your project is returning that there JSON response. This is not a default Django behavior, or at least wasn't in 1.10 or earlier.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/24a87f66-8799-489b-acc4-db779eb811df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Asad Jibran Ahmed

unread,
Nov 19, 2016, 11:11:36 PM11/19/16
to django...@googlegroups.com
Do you have debugging turned on (DEBUG=True in settings.py) in Django? If you do, you should see a pretty detailed stack trace and not just this. Also, in the console you should see a stack trace with the details of the error. Do you see those?

--

NS

unread,
Nov 20, 2016, 11:25:15 AM11/20/16
to Django users
DEBUG is set to true, and I don't see any error messages. There is no trace in the console either.


On Saturday, November 19, 2016 at 11:11:36 PM UTC-5, Asad Jibran Ahmed wrote:
Do you have debugging turned on (DEBUG=True in settings.py) in Django? If you do, you should see a pretty detailed stack trace and not just this. Also, in the console you should see a stack trace with the details of the error. Do you see those?
On Sun, Nov 20, 2016 at 4:58 AM, NS <heliotro...@gmail.com> wrote:
When I run python manage.py runserver, I get this shown on localhost:8000

{"status": "fail",  "method": "", "error":""}


What happened?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

NS

unread,
Nov 20, 2016, 11:30:42 AM11/20/16
to Django users
"""
Django settings for mysite project.

Generated by 'django-admin startproject' using Django 1.10.3.

For more information on this file, see

For the full list of settings and their values, see
"""

import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '_____'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'mysite.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

WSGI_APPLICATION = 'mysite.wsgi.application'


# Database

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}


# Password validation

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]


# Internationalization

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)

STATIC_URL = '/static/'


On Saturday, November 19, 2016 at 9:36:30 PM UTC-5, Alex Heyden wrote:
We'd need to see your settings file and maybe your top-level urls.py to answer it conclusively, but in general terms, some view that's been mapped to root on your project is returning that there JSON response. This is not a default Django behavior, or at least wasn't in 1.10 or earlier.
On Sat, Nov 19, 2016 at 7:58 PM, NS <heliotro...@gmail.com> wrote:
When I run python manage.py runserver, I get this shown on localhost:8000

{"status": "fail",  "method": "", "error":""}


What happened?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

Alex Heyden

unread,
Nov 20, 2016, 4:09:26 PM11/20/16
to django...@googlegroups.com
Is there anything at mysite/urls.py?

Also, how sure are you that you're actually hitting the Django server? If you turn off the Django server, do you get the same page? If you navigate to http://localhost:8000/ with runserver running, do you see the GET request in the console?

To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

NS

unread,
Nov 21, 2016, 11:02:36 AM11/21/16
to Django users
Update: I tried using port 8080 and now everything works!

I think that something was using port 8000, but I'm not sure what.

You were right, I tried localhost:8000 without the Django server on and and it had the same message. I did not hit the Django server.
Reply all
Reply to author
Forward
0 new messages