저는 장고에서 초보자이며 파이썬에서 준 초보자입니다.Django 관리자 페이지가 기본 홈 페이지로 리디렉션됩니다.
내 관리자 페이지 (localhost:8000/admin
)가 누락 된 것 같습니다. 환영으로 돌아갑니다. 관리자 페이지가 아닌 페이지가 작동합니다.
이 메인 urls.py
페이지입니다 : 여기
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'^$', '{{ project_name }}.views.home', name='home'),
# url(r'^{{ project_name }}/', include('{{ project_name }}.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)),
)
는 데이터베이스가 동기화 및 URM이 있습니다
from django.contrib import admin
from urm.models import *
class urm(admin.ModelAdmin):
fields =['blogger']
admin.site.register(urm)
응용 프로그램 설정
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
'django.contrib.admindocs',
'urm',
'south',
)
이 admin입니다 (URM)입니다 제대로 이전되었습니다.
내 자신의 견해를 만드는 법을 이해하는 것을 방해하고 있습니다. 제가 완전히 눈이 멀었다는 이슈를 알고 있습니까? 저는 남쪽과 포스트그레스를 사용하고 있습니다 -하지만 기본적으로 튜토리얼을 따르고 동기화 할 곳을 마이그레이션하고 있습니다 (그렇지 않으면 알아 내지 않은 한)
고마워요!
을 urm' 당신의'수업 시간에 무엇을 모델입니까? 'model = BlahBlah'? – karthikr