integrate vue cateditor with django
This commit is contained in:
@ -16,6 +16,8 @@ from django.urls import reverse_lazy
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates')
|
||||
FRONTEND_DIR = os.path.join(BASE_DIR, 'cateditor')
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
|
||||
@ -73,6 +75,7 @@ INSTALLED_APPS = [
|
||||
'django_extensions',
|
||||
'account',
|
||||
'lazysignup',
|
||||
'webpack_loader',
|
||||
'procat2',
|
||||
'dashboard',
|
||||
]
|
||||
@ -148,8 +151,10 @@ USE_TZ = True
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/2.1/howto/static-files/
|
||||
STATIC_URL = '/static/'
|
||||
# (STATIC_ROOT set in settings_ansible.py)
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, "static"),
|
||||
os.path.join(FRONTEND_DIR, "dist"),
|
||||
]
|
||||
|
||||
LOGIN_REDIRECT_URL = reverse_lazy('home')
|
||||
@ -171,10 +176,24 @@ if DJDT:
|
||||
)
|
||||
INTERNAL_IPS = ('127.0.0.1',)
|
||||
|
||||
# bring in ansible-defined settings
|
||||
from .settings_ansible import *
|
||||
|
||||
# what settings to expose in templates
|
||||
SETTINGS_EXPORT = [
|
||||
'CUSTOMER_NAME',
|
||||
]
|
||||
|
||||
# can have multiple if we have multiple vue pages.
|
||||
# https://github.com/owais/django-webpack-loader
|
||||
WEBPACK_LOADER = {
|
||||
'DEFAULT': {
|
||||
'CACHE': not DEBUG,
|
||||
#'BUNDLE_DIR_NAME': '/bundles/', # must end with slash
|
||||
'BUNDLE_DIR_NAME': '',
|
||||
# 'POLL_INTERVAL': 0.1,
|
||||
# 'TIMEOUT': None,
|
||||
'STATS_FILE': os.path.join(FRONTEND_DIR, 'webpack-stats.json'),
|
||||
'IGNORE': [r'.+\.hot-update.js', r'.+\.map']
|
||||
}
|
||||
}
|
||||
|
||||
# bring in ansible-defined settings
|
||||
from .settings_ansible import *
|
||||
|
||||
Reference in New Issue
Block a user