Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

A página principal da aplicação : Criando Views e Rotas da aplicação

Segue os arquivos de configurações e os erros apresentado em cada arquivo. A aplicação esta apresentando erro: NameError at / name 'perfis' is not defined Request Method: GET Request URL: http://localhost:8000/ Django Version: 1.7.4 Exception Type: NameError Exception Value:name 'perfis' is not defined Exception Location: C:\Caca\Alura\Python\Django\projetoDjango\connectedin\perfis\urls.py in , line 6 Python Executable: C:\Python27\python.exe Python Version: 2.7.13 Python Path:['C:\Caca\Alura\Python\Django\projetoDjango\connectedin', 'C:\WINDOWS\SYSTEM32\python27.zip', 'C:\Python27\DLLs', 'C:\Python27\lib', 'C:\Python27\lib\plat-win', 'C:\Python27\lib\lib-tk', 'C:\Python27', 'C:\Python27\lib\site-packages'] Server time: Tue, 28 Feb 2017 11:48:40 -0300

C:\Caca\Alura\Python\Django\projetoDjango\connectedin\connectedin
settings.py
"""
Django settings for connectedin project.

For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""

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


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'rv6d90$x6mp$np24g=(bzbq+*$efi^@%sv$_wk@f@c$1&&8cll'

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

TEMPLATE_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',
    'perfis'
)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'connectedin.urls'

WSGI_APPLICATION = 'connectedin.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases

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

# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/

STATIC_URL = '/static/'

--
urls.py
from django.conf.urls import patterns, include, url
  [pylint] C0111:Missing module docstring
 django.conf.urls

from django.contrib import admin

urlpatterns = patterns('',
       [pylint] C0103:Invalid constant name "urlpatterns"
       list

# Examples:
    # url(r'^$', 'connectedin.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),
           [pylint] C0330:Wrong continued indentation (add 19 spaces).

    url(r'^', include('perfis.urls'))

)

C:\Caca\Alura\Python\Django\projetoDjango\connectedin\perfis urls.py from django.conf.urls import patterns, include, url [pylint] C0111:Missing module docstring

from django.contrib import admin

urlpatterns = patterns('', [pylint] C0103:Invalid constant name "urlpatterns"

url(r'^admin/', include(admin.site.urls)), url(r'^$', perfis.views.index) [pylint] C0330:Wrong continued indentation (add 19 spaces). [pylint] E0602:Undefined variable 'perfis' )

-- views.py

from django.shortcuts import render [pylint] C0111:Missing module docstring

from django.http import HttpResponse

def index(request): [pylint] C0111:Missing function docstring

return HttpResponse('Bem-vindo ao ConnectedIn')

return render(request, 'index.html')

1 resposta
solução!

Acabei de testar os passos de até onde você chegou com o Django 1.7 e python e tudo funcinou. O que é estranho são mensagens de lint como se algo extra tivesse sido instalado. Você seguiu a risca a infra do curso? Colocou algo diferente?