Skip to content

Commit

Permalink
add static files
Browse files Browse the repository at this point in the history
  • Loading branch information
mleist committed Feb 12, 2024
1 parent 32cd5a9 commit 9e78868
Show file tree
Hide file tree
Showing 50 changed files with 5,796 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from import_export.formats.base_formats import XLSX, CSV, JSON


# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

Expand Down Expand Up @@ -67,8 +66,7 @@
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [BASE_DIR / 'templates']
,
'DIRS': [BASE_DIR / 'templates'],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand Down Expand Up @@ -99,7 +97,6 @@
POSTGRES_USER = os.environ.get("POSTGRES_USER")
POSTGRES_PASSWORD = os.environ.get("POSTGRES_PASSWORD")


DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
Expand All @@ -114,7 +111,6 @@
DATABASES["default"]["ATOMIC_REQUESTS"] = True # noqa F405
DATABASES["default"]["CONN_MAX_AGE"] = 60 # noqa F405


# Password validation
# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators

Expand Down Expand Up @@ -189,7 +185,7 @@
'TITLE': 'Title ddd',
'DESCRIPTION': 'Desc ddd',
'VERSION': '0.0.1',
"SWAGGER_UI_FAVICON_HREF": STATIC_URL + "/ava_spot/amp2.ico",
"SWAGGER_UI_FAVICON_HREF": STATIC_URL + "/{{ cookiecutter.project_slug }}/favicon.ico",
}

DJANGO_TABLES2_TABLE_ATTRS = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.table-container th.asc:after {
content: '\0000a0\0025b2';
float: right;
}
.table-container th.desc:after {
content: '\0000a0\0025bc';
float: right;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
table.paleblue {
border-collapse: collapse;
border-color: #CCC;
border: 1px solid #DDD;
}

table.paleblue,
table.paleblue + ul.pagination {
font: normal 11px/14px 'Lucida Grande', Verdana, Helvetica, Arial, sans-serif;
}

table.paleblue a:link,
table.paleblue a:visited,
table.paleblue + ul.pagination > li > a {
color: #5B80B2;
text-decoration: none;
font-weight: bold;
}

table.paleblue a:hover {
color: #036;
}

table.paleblue td,
table.paleblue th {
padding: 5px;
line-height: 13px;
border-bottom: 1px solid #EEE;
border-left: 1px solid #DDD;
text-align: left;
}

table.paleblue thead th:first-child,
table.paleblue thead td:first-child {
border-left: none !important;
}

table.paleblue thead th,
table.paleblue thead td {
background: #FCFCFC url(../img/header-bg.png) left bottom repeat-x;
border-bottom: 1px solid #DDD;
padding: 2px 5px;
font-size: 11px;
vertical-align: middle;
color: #666;
}

table.paleblue thead th > a:link,
table.paleblue thead th > a:visited {
color: #666;
}

table.paleblue thead th.orderable > a {
padding-right: 20px;
background: url(../img/arrow-inactive-up.png) right center no-repeat;
}
table.paleblue thead th.orderable.asc > a {
background-image: url(../img/arrow-active-up.png);
}
table.paleblue thead th.orderable.desc > a {
background-image: url(../img/arrow-active-down.png);
}

table.paleblue tr.odd {
background-color: #EDF3FE;
}

table.paleblue tr.even {
background-color: white;
}

table.paleblue + ul.pagination {
background: white url(../img/pagination-bg.gif) left 180% repeat-x;
overflow: auto;
margin: 0;
padding: 10px;
border: 1px solid #DDD;
list-style: none;
}

table.paleblue + ul.pagination > li {
float: left;
line-height: 22px;
margin-left: 10px;
}

table.paleblue + ul.pagination > li:first-child {
margin-left: 0;
}

table.paleblue + ul.pagination > li.cardinality {
float: right;
color: #8d8d8d;
}

table.paleblue > tbody > tr > td > span.true,
table.paleblue > tbody > tr > td > span.false {
background-position: top left;
background-repeat: no-repeat;
display: inline-block;
height: 10px;
overflow: hidden;
text-indent: -200px;
width: 10px;
}

table.paleblue > tbody > tr > td > .missing {
background: transparent url(../img/missing.png) right center no-repeat;
color: #717171;
padding-right: 20px;
}

table.paleblue > tbody > tr > td > .missing:hover {
color: #333;
}

table.paleblue > tbody > tr > td > span.true {
background-image: url(../img/true.gif);
}

table.paleblue > tbody > tr > td > span.false {
background-image: url(../img/false.gif);
}

div.table-container {
display: inline-block;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(function($) {
$().ready(function () {
$('input.guess_format[type="file"]').change(function () {
var files = this.files;
var dropdowns = $(this.form).find('select.guess_format');
if(files.length > 0) {
var extension = files[0].name.split('.').pop().trim().toLowerCase();
for(var i = 0; i < dropdowns.length; i++) {
var dropdown = dropdowns[i];
dropdown.selectedIndex = 0;
for(var j = 0; j < dropdown.options.length; j++) {
if(extension === dropdown.options[j].text.trim().toLowerCase()) {
dropdown.selectedIndex = j;
break;
}
}
}
}
});
});
})(django.jQuery);
115 changes: 115 additions & 0 deletions {{cookiecutter.project_slug}}/spot/app/static/import_export/import.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
.import-preview .errors {
position: relative;
}

.validation-error-count {
display: inline-block;
background-color: #e40000;
border-radius: 6px;
color: white;
font-size: 0.9em;
position: relative;
font-weight: bold;
margin-top: -2px;
padding: 0.2em 0.4em;
}

.validation-error-container {
position: absolute;
opacity: 0;
pointer-events: none;
background-color: #ffc1c1;
padding: 14px 15px 10px;
top: 25px;
margin: 0 0 20px 0;
width: 200px;
z-index: 2;
}

table.import-preview tr.skip {
background-color: #d2d2d2;
}

table.import-preview tr.new {
background-color: #bdd8b2;
}

table.import-preview tr.delete {
background-color: #f9bebf;
}

table.import-preview tr.update {
background-color: #fdfdcf;
}

.import-preview td:hover .validation-error-count {
z-index: 3;
}
.import-preview td:hover .validation-error-container {
opacity: 1;
pointer-events: auto;
}

.validation-error-list {
margin: 0;
padding: 0;
}

.validation-error-list li {
list-style: none;
margin: 0;
}

.validation-error-list > li > ul {
margin: 8px 0;
padding: 0;
}

.validation-error-list > li > ul > li {
padding: 0;
margin: 0 0 10px;
line-height: 1.28em;
}

.validation-error-field-label {
display: block;
border-bottom: 1px solid #e40000;
color: #e40000;
text-transform: uppercase;
font-weight: bold;
font-size: 0.85em;
}

@media (prefers-color-scheme: dark) {
table.import-preview tr.skip {
background-color: #2d2d2d;
}

table.import-preview tr.new {
background-color: #42274d;
}

table.import-preview tr.delete {
background-color: #064140;
}

table.import-preview tr.update {
background-color: #020230;
}

.validation-error-container {
background-color: #003e3e;
}

/*
these declarations are necessary to forcibly override the
formatting applied by the diff-match-patch python library
*/
table.import-preview td ins {
background-color: #190019 !important;
}

table.import-preview td del {
background-color: #001919 !important;
}
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 9e78868

Please sign in to comment.