django1.7 의 admin

1677 단어
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'db.db',                      # Or path to database file if using sqlite3.
        # The following settings are not used with sqlite3:
        'USER': '',
        'PASSWORD': '',
        'HOST': '',                      # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
        'PORT': '',                      # Set to empty string for default.
    }
}

ENGINE과 NAME을 적어서 뒤에 주석이 잘 되어 있어요.
LANGUAGE_CODE = 'zh-cn'

이 코드는 인터페이스 속의 문화를
INSTALLED_APPS = (
    
    # Uncomment the next line to enable the admin:
    'django.contrib.admin',
)

이 줄 코드 앞에 있는 # 번호를 빼는 것을 기억해라
from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'aditu.views.home', name='home'),
    # url(r'^aditu/', include('aditu.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
)

여기에 주석을 빼야 할 세 곳이 있다.

좋은 웹페이지 즐겨찾기