mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-24 03:02:23 +00:00
Better static files
This commit is contained in:
parent
067a266997
commit
dac4460c68
@ -1,6 +1,7 @@
|
||||
bcrypt
|
||||
Django~=3.0
|
||||
django-allauth
|
||||
django-bootstrap-datepicker-plus
|
||||
django-crispy-forms
|
||||
django-extensions
|
||||
django-filter
|
||||
|
@ -1,121 +0,0 @@
|
||||
@font-face {
|
||||
font-family: 'Glyphicons Halflings';
|
||||
src: url('//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.eot');
|
||||
src: url('//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
|
||||
url('//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff2') format('woff2'),
|
||||
url('//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff') format('woff'),
|
||||
url('//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.ttf') format('truetype'),
|
||||
url('//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
|
||||
}
|
||||
|
||||
.glyphicon {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
display: inline-block;
|
||||
font-family: 'Glyphicons Halflings';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.glyphicon-time:before {
|
||||
content: "\e023";
|
||||
}
|
||||
|
||||
.glyphicon-chevron-left:before {
|
||||
content: "\e079";
|
||||
}
|
||||
|
||||
.glyphicon-chevron-right:before {
|
||||
content: "\e080";
|
||||
}
|
||||
|
||||
.glyphicon-chevron-up:before {
|
||||
content: "\e113";
|
||||
}
|
||||
|
||||
.glyphicon-chevron-down:before {
|
||||
content: "\e114";
|
||||
}
|
||||
|
||||
.glyphicon-calendar:before {
|
||||
content: "\e109";
|
||||
}
|
||||
|
||||
.glyphicon-screenshot:before {
|
||||
content: "\e087";
|
||||
}
|
||||
|
||||
.glyphicon-trash:before {
|
||||
content: "\e020";
|
||||
}
|
||||
|
||||
.glyphicon-remove:before {
|
||||
content: "\e014";
|
||||
}
|
||||
|
||||
.bootstrap-datetimepicker-widget .btn {
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
margin-bottom: 0;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
line-height: 1.42857143;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
-ms-touch-action: manipulation;
|
||||
touch-action: manipulation;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
background-image: none;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.bootstrap-datetimepicker-widget.dropdown-menu {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
display: none;
|
||||
float: left;
|
||||
min-width: 160px;
|
||||
padding: 5px 0;
|
||||
margin: 2px 0 0;
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
list-style: none;
|
||||
background-color: #fff;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip: padding-box;
|
||||
border: 1px solid #ccc;
|
||||
border: 1px solid rgba(0, 0, 0, .15);
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
|
||||
}
|
||||
|
||||
.bootstrap-datetimepicker-widget .list-unstyled {
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.bootstrap-datetimepicker-widget .collapse {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bootstrap-datetimepicker-widget .collapse.in {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* fix for bootstrap4 */
|
||||
.bootstrap-datetimepicker-widget .table-condensed > thead > tr > th,
|
||||
.bootstrap-datetimepicker-widget .table-condensed > tbody > tr > td,
|
||||
.bootstrap-datetimepicker-widget .table-condensed > tfoot > tr > td {
|
||||
padding: 5px;
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
jQuery(function ($) {
|
||||
var datepickerDict = {};
|
||||
var isBootstrap4 = $.fn.collapse.Constructor.VERSION.split('.').shift() == "4";
|
||||
function fixMonthEndDate(e, picker) {
|
||||
e.date && picker.val().length && picker.val(e.date.endOf('month').format('YYYY-MM-DD'));
|
||||
}
|
||||
$("[dp_config]:not([disabled])").each(function (i, element) {
|
||||
var $element = $(element), data = {};
|
||||
try {
|
||||
data = JSON.parse($element.attr('dp_config'));
|
||||
}
|
||||
catch (x) { }
|
||||
if (data.id && data.options) {
|
||||
data.$element = $element.datetimepicker(data.options);
|
||||
data.datepickerdata = $element.data("DateTimePicker");
|
||||
datepickerDict[data.id] = data;
|
||||
data.$element.next('.input-group-addon').on('click', function(){
|
||||
data.datepickerdata.show();
|
||||
});
|
||||
if(isBootstrap4){
|
||||
data.$element.on("dp.show", function (e) {
|
||||
$('.collapse.in').addClass('show');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
$.each(datepickerDict, function (id, to_picker) {
|
||||
if (to_picker.linked_to) {
|
||||
var from_picker = datepickerDict[to_picker.linked_to];
|
||||
from_picker.datepickerdata.maxDate(to_picker.datepickerdata.date() || false);
|
||||
to_picker.datepickerdata.minDate(from_picker.datepickerdata.date() || false);
|
||||
from_picker.$element.on("dp.change", function (e) {
|
||||
to_picker.datepickerdata.minDate(e.date || false);
|
||||
});
|
||||
to_picker.$element.on("dp.change", function (e) {
|
||||
if (to_picker.picker_type == 'MONTH') fixMonthEndDate(e, to_picker.$element);
|
||||
from_picker.datepickerdata.maxDate(e.date || false);
|
||||
});
|
||||
if (to_picker.picker_type == 'MONTH') {
|
||||
to_picker.$element.on("dp.hide", function (e) {
|
||||
fixMonthEndDate(e, to_picker.$element);
|
||||
});
|
||||
fixMonthEndDate({ date: to_picker.datepickerdata.date() }, to_picker.$element);
|
||||
}
|
||||
}
|
||||
});
|
||||
if(isBootstrap4) {
|
||||
$('body').on('show.bs.collapse','.bootstrap-datetimepicker-widget .collapse',function(e){
|
||||
$(e.target).addClass('in');
|
||||
});
|
||||
$('body').on('hidden.bs.collapse','.bootstrap-datetimepicker-widget .collapse',function(e){
|
||||
$(e.target).removeClass('in');
|
||||
});
|
||||
}
|
||||
});
|
@ -50,6 +50,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.staticfiles',
|
||||
'django.forms',
|
||||
|
||||
'bootstrap_datepicker_plus',
|
||||
'django_extensions',
|
||||
'polymorphic',
|
||||
'crispy_forms',
|
||||
@ -168,9 +169,11 @@ FIXTURE_DIRS = [os.path.join(BASE_DIR, "tfjm/fixtures")]
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, "static"),
|
||||
os.path.join(BASE_DIR, "tfjm/static"),
|
||||
]
|
||||
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, "static")
|
||||
|
||||
MEDIA_URL = '/media/'
|
||||
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
|
||||
|
@ -4,7 +4,7 @@ import os
|
||||
DEBUG = False
|
||||
|
||||
# Mandatory !
|
||||
ALLOWED_HOSTS = ['inscription.tfjm.org']
|
||||
ALLOWED_HOSTS = ['inscription.tfjm.org', 'plateforme.tfjm.org']
|
||||
|
||||
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'CHANGE_ME_IN_ENV_SETTINGS')
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
@ -38,8 +38,6 @@ urlpatterns = [
|
||||
|
||||
path('api/', include('api.urls')),
|
||||
|
||||
re_path(r'^{prefix}(?P<path>.*)$'.format(prefix=re.escape(settings.STATIC_URL.lstrip('/'))), serve),
|
||||
|
||||
# Supporting old paths
|
||||
path('inscription/', RedirectView.as_view(pattern_name="member:signup")),
|
||||
path('connexion/', RedirectView.as_view(pattern_name="login")),
|
||||
|
Loading…
Reference in New Issue
Block a user