fixed untracked files
This commit is contained in:
parent
c297c37b70
commit
3659ffeff7
|
@ -1,4 +1,6 @@
|
|||
.idea/
|
||||
.venv/
|
||||
.media/
|
||||
*/__pycache__/
|
||||
*/*.pyc
|
||||
NewMediaMonitoring/local_settings.py
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -37,6 +37,8 @@ INSTALLED_APPS = [
|
|||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'django_token',
|
||||
'corsheaders',
|
||||
'bootstrap3',
|
||||
'captcha',
|
||||
'dashboard',
|
||||
|
@ -47,11 +49,13 @@ MIDDLEWARE = [
|
|||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'django_token.middleware.TokenMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'NewMediaMonitoring.urls'
|
||||
|
@ -106,6 +110,11 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||
},
|
||||
]
|
||||
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
'django.contrib.auth.backends.ModelBackend',
|
||||
'django_token.backends.TokenBackend'
|
||||
)
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/2.1/topics/i18n/
|
||||
|
||||
|
@ -134,6 +143,10 @@ MEDIA_ROOT = '/var/www/p3/NewMediaMonitoring/media/'
|
|||
AUTH_PROFILE_MODULE = 'djangoadmin.myadmin.UserProfile'
|
||||
"""用户模块扩展完成"""
|
||||
|
||||
CORS_ORIGIN_ALLOW_ALL = True
|
||||
|
||||
CORS_URLS_REGEX = r'^/polls/.*$'
|
||||
|
||||
try:
|
||||
from .local_settings import *
|
||||
except ImportError as e:
|
||||
|
|
|
@ -17,6 +17,7 @@ from django.contrib import admin
|
|||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path('polls/', include('polls.urls')),
|
||||
path('admin/', admin.site.urls),
|
||||
path('', include('dashboard.urls')),
|
||||
path('captcha/', include('captcha.urls')),
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
# install
|
||||
|
||||
pip install git+https://github.com/RobWeber3/django-token.git
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
|
@ -0,0 +1,5 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class PollsConfig(AppConfig):
|
||||
name = 'polls'
|
|
@ -0,0 +1,3 @@
|
|||
from django.db import models
|
||||
|
||||
# Create your models here.
|
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
|
@ -0,0 +1,8 @@
|
|||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.index, name='index'),
|
||||
path('login', views.polls_login, name='polls_login'),
|
||||
]
|
|
@ -2,3 +2,4 @@ Django~=2.2.15
|
|||
django-bootstrap3
|
||||
django-simple-captcha
|
||||
psycopg2-binary
|
||||
django-cors-headers
|
||||
|
|
Loading…
Reference in New Issue