소개
게시글
질문&답변
2020.08.06
python manage.py runserver 에러
네 전에 문제는 해결했습니다! """ Django settings for my_site_prj project. Generated by 'django-admin startproject' using Django 3.0.8. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ 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 # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '-2(_0+zp&uxbeu*0mzcb4mjc)6_v_%+)frstwrbs%u)0bj$voy' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'blog' , 'django.contrib.admin' , 'django.contrib.auth' , 'django.contrib.contenttypes' , 'django.contrib.sessions' , 'django.contrib.messages' , 'django.contrib.staticfiles' , ] MIDDLEWARE =[ 'blog' , '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 = 'my_site_prj.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' , ] , } , } , ] # Database # https://docs.djangoproject.com/en/3.0/ref/settings/#databases DATABASES = { 'default' : { 'ENGINE' : 'django.db.backends.sqlite3' , 'NAME' : os.path.join(BASE_DIR , 'db.sqlite3' ) , } } # Password validation # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators 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 # https://docs.djangoproject.com/en/3.0/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/3.0/howto/static-files/ STATIC_URL = '/static/' 소스코드입니다..!
- 0
- 3
- 679
질문&답변
2020.08.05
python manage.py makemigrations, python manage.py migrate 오류
네 알려주신 대로 이것저것 해보니 해결됐습니다:)
- 0
- 8
- 418
질문&답변
2020.07.28
python manage.py makemigrations, python manage.py migrate 오류
cmder에 들어가서 cd github\ -> cd django_my_website\ -> venv\Scripts\activate.bat 까지 실행한 후에 명령창에 " c:\Anaconda3\Scripts\activatebase " 이 문장을 실행하라는 말씀이신가요? 그렇게 하면 지정된 경로를 찾을 수 없다고 뜹니다.
- 0
- 8
- 418
질문&답변
2020.07.22
python manage.py makemigrations, python manage.py migrate 오류
말씀해주신대로 따라해서 장고 3.x대 설치가 되었는데도 python manage.py makemigrations 하면 똑같은 오류가 납니다!..
- 0
- 8
- 418
질문&답변
2020.07.21
python manage.py makemigrations, python manage.py migrate 오류
pip list 했는데 이렇게 나옵니다 장고가 설치되어 있는거 아닌가요?ㅠㅠ(사진)
- 0
- 8
- 418