"""
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 1.9.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/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/1.9/howto/deploy...
# 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 = [
'mainApp',
'news',
'webexample',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
MIDDLEWARE_CLASSES = [
'django.middleware.security.SecurityMiddleware',
'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 = '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
# https://docs.djangoproject.com/en/1.9/ref/settings...
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings...
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/1.9/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.9/howto/static...
STATIC_URL = '/static/'
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/news
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
^admin/
^ ^$ [name='index']
^ ^contact/ [name='contact']
^webexample/
^news/
The current path, news, didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
Я не про роутер в Джанго
А про то как эти ссылки выглядят при рендере.
Что например отвечает джанго сервер?
Версии django и окружение такое же?
SELECT t2.*, IIf(t2.ДатаТаб2<t1.mx,t2.ДатаТаб2 & "*","") AS Обновление
FROM [Заполняемая таблица 2] AS t2 INNER JOIN (SELECT ИндексТаб1, max(ДатаТаб1) AS mx FROM [Заполняемая таблица 1] GROUP BY ИндексТаб1) AS t1 ON t2.ИндексТаб2 = t1.ИндексТаб1;
SELECT t2.*, IIf(t2.ДатаТаб2<t1.mx,"1","") AS Обновление
FROM [Заполняемая таблица 2] AS t2 INNER JOIN (SELECT ИндексТаб1, max(ДатаТаб1) AS mx FROM [Заполняемая таблица 1] GROUP BY ИндексТаб1) AS t1 ON t2.ИндексТаб2 = t1.ИндексТаб1;
If [Ôëàæîê12] = True And [Êîìáèíèðîâàííàÿ25] <> "" Then
Option Compare Database
Private Sub Кнопка22_Click()
'Добовление записи в таблицу по нажатию кнопки_
Dim sql As String
If [Флажок12] = True Then
sql = "insert into [Заполняемая таблица 1] ([Версия ПОТаб1],[ИндексТаб1],[ДатаТаб1]) values ('" & [Комбинированная25] & "','" & [ИндексТаб2] & "','" & [ДатаТаб2] & "')"
CurrentDb.Execute sql
End If
End Sub
Private Sub Флажок12_AfterUpdate()
'Активировать поле если установлен checkbox_
If [Флажок12] = True Then
[Комбинированная25].Enabled = True
Else
[Комбинированная25].Enabled = False
End If
End Sub