update to bootstrap 4
This commit is contained in:
@@ -38,6 +38,7 @@ INSTALLED_APPS = [
|
||||
'rest_framework',
|
||||
'rest_framework.authtoken',
|
||||
'crispy_forms',
|
||||
'widget_tweaks',
|
||||
'billard',
|
||||
]
|
||||
|
||||
@@ -56,7 +57,9 @@ ROOT_URLCONF = 'caromserver.urls'
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [],
|
||||
'DIRS': [
|
||||
os.path.join(BASE_DIR, 'templates')
|
||||
],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
@@ -81,7 +84,6 @@ DATABASES = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
|
||||
|
||||
@@ -100,7 +102,6 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/1.10/topics/i18n/
|
||||
|
||||
@@ -118,6 +119,11 @@ USE_TZ = False
|
||||
# https://docs.djangoproject.com/en/1.10/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'staticfiles')
|
||||
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, 'static'),
|
||||
]
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
# Use Django's standard `django.contrib.auth` permissions,
|
||||
@@ -132,7 +138,7 @@ REST_FRAMEWORK = {
|
||||
),
|
||||
}
|
||||
|
||||
CRISPY_TEMPLATE_PACK = 'bootstrap3'
|
||||
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||
LOGIN_URL = 'login'
|
||||
LOGOUT_URL = 'logout'
|
||||
LOGIN_REDIRECT_URL = 'billard:location_index'
|
||||
@@ -142,7 +148,7 @@ LOGOUT_REDIRECT_URL = 'billard:location_index'
|
||||
ADMINS = (
|
||||
('Robert Einsle', 'robert@einsle.de'),
|
||||
)
|
||||
#EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
# EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
|
||||
EMAIL_HOST = ''
|
||||
@@ -152,8 +158,6 @@ EMAIL_PORT = 25
|
||||
|
||||
URL_LOCATION_PROCESSOR = 'http://127.0.0.1:8000/billard/process_locationdata'
|
||||
|
||||
STATIC_ROOT = "/srv/carom/carom-server/static/"
|
||||
|
||||
try:
|
||||
from local_settings import *
|
||||
except ImportError:
|
||||
|
@@ -22,8 +22,8 @@ urlpatterns = [
|
||||
url(r'^admin/', admin.site.urls),
|
||||
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
||||
url(r'^billard/', include('billard.urls')),
|
||||
url(r'^login/$', auth_views.login),
|
||||
url(r'^logout/$', auth_views.logout),
|
||||
url(r'^login/$', auth_views.login, name='login'),
|
||||
url(r'^logout/$', auth_views.logout, name='logout'),
|
||||
url(r'^', include('django.contrib.auth.urls')),
|
||||
url(r'^$', RedirectView.as_view(url='billard/', permanent=False), name='index')
|
||||
]
|
||||
|
Reference in New Issue
Block a user