anguage-js">+ 5
+    $(document).on('autocompleteLightInitialize', '[data-autocomplete-light-function=select2]', function() {
6
+        var element = $(this);
7
+
8
+        // Templating helper
9
+        function template(text, is_html) {
10
+            if (is_html) {
11
+                var $result = $('<span>');
12
+                $result.html(text);
13
+                return $result;
14
+            } else {
15
+                return text;
16
+            }
17
+        }
18
+
19
+        function result_template(item) {
20
+            var text = template(item.text,
21
+                element.attr('data-html') !== undefined || element.attr('data-result-html') !== undefined
22
+            );
23
+
24
+            if (item.create_id) {
25
+                return $('<span></span>').text(text).addClass('dal-create')
26
+            } else {
27
+                return text
28
+            }
29
+        }
30
+
31
+        function selected_template(item) {
32
+            if (item.selected_text !== undefined) {
33
+                return template(item.selected_text,
34
+                    element.attr('data-html') !== undefined || element.attr('data-selected-html') !== undefined
35
+                );
36
+            } else {
37
+                return result_template(item);
38
+            }
39
+            return
40
+        }
41
+
42
+        var ajax = null;
43
+        if ($(this).attr('data-autocomplete-light-url')) {
44
+            ajax = {
45
+                url: $(this).attr('data-autocomplete-light-url'),
46
+                dataType: 'json',
47
+                delay: 250,
48
+
49
+                data: function (params) {
50
+                    var data = {
51
+                        q: params.term, // search term
52
+                        page: params.page,
53
+                        create: element.attr('data-autocomplete-light-create') && !element.attr('data-tags'),
54
+                        forward: yl.getForwards(element)
55
+                    };
56
+
57
+                    return data;
58
+                },
59
+                processResults: function (data, page) {
60
+                    if (element.attr('data-tags')) {
61
+                        $.each(data.results, function(index, value) {
62
+                            value.id = value.text;
63
+                        });
64
+                    }
65
+
66
+                    return data;
67
+                },
68
+                cache: true
69
+            };
70
+        }
71
+
72
+        $(this).select2({
73
+            tokenSeparators: element.attr('data-tags') ? [','] : null,
74
+            debug: true,
75
+            containerCssClass: ':all:',
76
+            placeholder: element.attr('data-placeholder') || '',
77
+            language: element.attr('data-autocomplete-light-language'),
78
+            minimumInputLength: element.attr('data-minimum-input-length') || 0,
79
+            allowClear: ! $(this).is('[required]'),
80
+            templateResult: result_template,
81
+            templateSelection: selected_template,
82
+            ajax: ajax,
83
+            tags: Boolean(element.attr('data-tags')),
84
+        });
85
+
86
+        $(this).on('select2:selecting', function (e) {
87
+            var data = e.params.args.data;
88
+
89
+            if (data.create_id !== true)
90
+                return;
91
+
92
+            e.preventDefault();
93
+
94
+            var select = $(this);
95
+
96
+            $.ajax({
97
+                url: $(this).attr('data-autocomplete-light-url'),
98
+                type: 'POST',
99
+                dataType: 'json',
100
+                data: {
101
+                    text: data.id,
102
+                    forward: yl.getForwards($(this))
103
+                },
104
+                beforeSend: function(xhr, settings) {
105
+                    xhr.setRequestHeader("X-CSRFToken", document.csrftoken);
106
+                },
107
+                success: function(data, textStatus, jqXHR ) {
108
+                    select.append(
109
+                        $('<option>', {value: data.id, text: data.text, selected: true})
110
+                    );
111
+                    select.trigger('change');
112
+                    select.select2('close');
113
+                }
114
+            });
115
+        });
116
+
117
+    });
118
+    window.__dal__initListenerIsSet = true;
119
+    $('[data-autocomplete-light-function=select2]:not([id*="__prefix__"])').each(function() {
120
+        window.__dal__initialize(this);
121
+    });
122
+})(yl.jQuery);

BIN
app/staticfile/img/heartbeat.png


+ 22 - 0
app/staticfile/import_export/action_formats.js

@@ -0,0 +1,22 @@
1
+(function($) {
2
+  $(document).ready(function() {
3
+    var $actionsSelect, $formatsElement;
4
+    if ($('body').hasClass('grp-change-list')) {
5
+        // using grappelli
6
+        $actionsSelect = $('#grp-changelist-form select[name="action"]');
7
+        $formatsElement = $('#grp-changelist-form select[name="file_format"]');
8
+    } else {
9
+        // using default admin
10
+        $actionsSelect = $('#changelist-form select[name="action"]');
11
+        $formatsElement = $('#changelist-form select[name="file_format"]').parent();
12
+    }
13
+    $actionsSelect.change(function() {
14
+      if ($(this).val() === 'export_admin_action') {
15
+        $formatsElement.show();
16
+      } else {
17
+        $formatsElement.hide();
18
+      }
19
+    });
20
+    $actionsSelect.change();
21
+  });
22
+})(django.jQuery);

+ 81 - 0
app/staticfile/import_export/import.css

@@ -0,0 +1,81 @@
1
+.import-preview .errors {
2
+  position: relative;
3
+}
4
+
5
+.validation-error-count {
6
+  display: inline-block;
7
+  background-color: #e40000;
8
+  border-radius: 6px;
9
+  color: white;
10
+  font-size: 0.9em;
11
+  position: relative;
12
+  font-weight: bold;
13
+  margin-top: -2px;
14
+  padding: 0.2em 0.4em;
15
+}
16
+
17
+.validation-error-container {
18
+  position: absolute;
19
+  opacity: 0;
20
+  pointer-events: none;
21
+  background-color: #ffc1c1;
22
+  padding: 14px 15px 10px;
23
+  top: 25px;
24
+  margin: 0 0 20px 0;
25
+  width: 200px;
26
+  z-index: 2;
27
+}
28
+
29
+table.import-preview tr.skip {
30
+  background-color: #d2d2d2;
31
+}
32
+
33
+table.import-preview tr.new {
34
+  background-color: #bdd8b2;
35
+}
36
+
37
+table.import-preview tr.delete {
38
+  background-color: #f9bebf;
39
+}
40
+
41
+table.import-preview tr.update {
42
+  background-color: #fdfdcf;
43
+}
44
+
45
+.import-preview td:hover .validation-error-count {
46
+  z-index: 3;
47
+}
48
+.import-preview td:hover .validation-error-container {
49
+  opacity: 1;
50
+  pointer-events: auto;
51
+}
52
+
53
+.validation-error-list {
54
+  margin: 0;
55
+  padding: 0;
56
+}
57
+
58
+.validation-error-list li {
59
+  list-style: none;
60
+  margin: 0;
61
+}
62
+
63
+.validation-error-list > li > ul {
64
+  margin: 8px 0;
65
+  padding: 0;
66
+}
67
+
68
+.validation-error-list > li > ul > li {
69
+  padding: 0;
70
+  margin: 0 0 10px;
71
+  line-height: 1.28em;
72
+}
73
+
74
+.validation-error-field-label {
75
+  display: block;
76
+  border-bottom: 1px solid #e40000;
77
+  color: #e40000;
78
+  text-transform: uppercase;
79
+  font-weight: bold;
80
+  font-size: 0.85em;
81
+}

+ 15 - 0
app/staticfile/js/main.js

@@ -0,0 +1,15 @@
1
+$(function(){
2
+    $("#currentLocationBtn").click(function(){
3
+        if ("geolocation" in navigator){ //check geolocation available
4
+            //try to get user current location using getCurrentPosition() method
5
+            console.log("current location");
6
+            navigator.geolocation.getCurrentPosition(function(position){
7
+                console.log("xxxx");
8
+                $("#geoText").val(position.coords.latitude+","+position.coords.longitude );
9
+
10
+            });
11
+        }else{
12
+            console.log("Browser doesn't support geolocation!");
13
+        }
14
+    });
15
+});

+ 262 - 0
app/staticfile/vendor/select2/Gruntfile.js

@@ -0,0 +1,262 @@
1
+const sass = require('node-sass');
2
+
3
+module.exports = function (grunt) {
4
+  // Full list of files that must be included by RequireJS
5
+  includes = [
6
+    'jquery.select2',
7
+    'almond',
8
+
9
+    'jquery-mousewheel' // shimmed for non-full builds
10
+  ];
11
+
12
+  fullIncludes = [
13
+    'jquery',
14
+
15
+    'select2/compat/containerCss',
16
+    'select2/compat/dropdownCss',
17
+
18
+    'select2/compat/initSelection',
19
+    'select2/compat/inputData',
20
+    'select2/compat/matcher',
21
+    'select2/compat/query',
22
+
23
+    'select2/dropdown/attachContainer',
24
+    'select2/dropdown/stopPropagation',
25
+
26
+    'select2/selection/stopPropagation'
27
+  ].concat(includes);
28
+
29
+  var i18nModules = [];
30
+  var i18nPaths = {};
31
+
32
+  var i18nFiles = grunt.file.expand({
33
+    cwd: 'src/js'
34
+  }, 'select2/i18n/*.js');
35
+
36
+  var testFiles = grunt.file.expand('tests/**/*.html');
37
+  var testUrls = testFiles.map(function (filePath) {
38
+    return 'http://localhost:9999/' + filePath;
39
+  });
40
+
41
+  var testBuildNumber = "unknown";
42
+
43
+  if (process.env.TRAVIS_JOB_ID) {
44
+    testBuildNumber = "travis-" + process.env.TRAVIS_JOB_ID;
45
+  } else {
46
+    var currentTime = new Date();
47
+
48
+    testBuildNumber = "manual-" + currentTime.getTime();
49
+  }
50
+
51
+  for (var i = 0; i < i18nFiles.length; i++) {
52
+    var file = i18nFiles[i];
53
+    var name = file.split('.')[0];
54
+
55
+    i18nModules.push({
56
+      name: name
57
+    });
58
+
59
+    i18nPaths[name] = '../../' + name;
60
+  }
61
+
62
+  var minifiedBanner = '/*! Select2 <%= package.version %> | https://github.com/select2/select2/blob/master/LICENSE.md */';
63
+
64
+  grunt.initConfig({
65
+    package: grunt.file.readJSON('package.json'),
66
+
67
+    concat: {
68
+      'dist': {
69
+        options: {
70
+          banner: grunt.file.read('src/js/wrapper.start.js'),
71
+        },
72
+        src: [
73
+          'dist/js/select2.js',
74
+          'src/js/wrapper.end.js'
75
+        ],
76
+        dest: 'dist/js/select2.js'
77
+      },
78
+      'dist.full': {
79
+        options: {
80
+          banner: grunt.file.read('src/js/wrapper.start.js'),
81
+        },
82
+        src: [
83
+          'dist/js/select2.full.js',
84
+          'src/js/wrapper.end.js'
85
+        ],
86
+        dest: 'dist/js/select2.full.js'
87
+      }
88
+    },
89
+
90
+    connect: {
91
+      tests: {
92
+        options: {
93
+          base: '.',
94
+          hostname: '127.0.0.1',
95
+          port: 9999
96
+        }
97
+      }
98
+    },
99
+
100
+    uglify: {
101
+      'dist': {
102
+        src: 'dist/js/select2.js',
103
+        dest: 'dist/js/select2.min.js',
104
+        options: {
105
+          banner: minifiedBanner
106
+        }
107
+      },
108
+      'dist.full': {
109
+        src: 'dist/js/select2.full.js',
110
+        dest: 'dist/js/select2.full.min.js',
111
+        options: {
112
+          banner: minifiedBanner
113
+        }
114
+      }
115
+    },
116
+
117
+    qunit: {
118
+      all: {
119
+        options: {
120
+          urls: testUrls
121
+        }
122
+      }
123
+    },
124
+
125
+    jshint: {
126
+      options: {
127
+        jshintrc: true,
128
+        reporterOutput: ''
129
+      },
130
+      code: {
131
+        src: ['src/js/**/*.js']
132
+      },
133
+      tests: {
134
+        src: ['tests/**/*.js']
135
+      }
136
+    },
137
+
138
+    sass: {
139
+      dist: {
140
+        options: {
141
+          implementation: sass,
142
+          outputStyle: 'compressed'
143
+        },
144
+        files: {
145
+          'dist/css/select2.min.css': [
146
+            'src/scss/core.scss',
147
+            'src/scss/theme/default/layout.css'
148
+          ]
149
+        }
150
+      },
151
+      dev: {
152
+        options: {
153
+          implementation: sass,
154
+          outputStyle: 'nested'
155
+        },
156
+        files: {
157
+          'dist/css/select2.css': [
158
+            'src/scss/core.scss',
159
+            'src/scss/theme/default/layout.css'
160
+          ]
161
+        }
162
+      }
163
+    },
164
+
165
+    requirejs: {
166
+      'dist': {
167
+        options: {
168
+          baseUrl: 'src/js',
169
+          optimize: 'none',
170
+          name: 'select2/core',
171
+          out: 'dist/js/select2.js',
172
+          include: includes,
173
+          namespace: 'S2',
174
+          paths: {
175
+            'almond': require.resolve('almond').slice(0, -3),
176
+            'jquery': 'jquery.shim',
177
+            'jquery-mousewheel': 'jquery.mousewheel.shim'
178
+          },
179
+          wrap: {
180
+            startFile: 'src/js/banner.start.js',
181
+            endFile: 'src/js/banner.end.js'
182
+          }
183
+        }
184
+      },
185
+      'dist.full': {
186
+        options: {
187
+          baseUrl: 'src/js',
188
+          optimize: 'none',
189
+          name: 'select2/core',
190
+          out: 'dist/js/select2.full.js',
191
+          include: fullIncludes,
192
+          namespace: 'S2',
193
+          paths: {
194
+            'almond': require.resolve('almond').slice(0, -3),
195
+            'jquery': 'jquery.shim',
196
+            'jquery-mousewheel': require.resolve('jquery-mousewheel').slice(0, -3)
197
+          },
198
+          wrap: {
199
+            startFile: 'src/js/banner.start.js',
200
+            endFile: 'src/js/banner.end.js'
201
+          }
202
+        }
203
+      },
204
+      'i18n': {
205
+        options: {
206
+          baseUrl: 'src/js/select2/i18n',
207
+          dir: 'dist/js/i18n',
208
+          paths: i18nPaths,
209
+          modules: i18nModules,
210
+          namespace: 'S2',
211
+          wrap: {
212
+            start: minifiedBanner + grunt.file.read('src/js/banner.start.js'),
213
+            end: grunt.file.read('src/js/banner.end.js')
214
+          }
215
+        }
216
+      }
217
+    },
218
+
219
+    watch: {
220
+      js: {
221
+        files: [
222
+          'src/js/select2/**/*.js',
223
+          'tests/**/*.js'
224
+        ],
225
+        tasks: [
226
+          'compile',
227
+          'test',
228
+          'minify'
229
+        ]
230
+      },
231
+      css: {
232
+        files: [
233
+          'src/scss/**/*.scss'
234
+        ],
235
+        tasks: [
236
+          'compile',
237
+          'minify'
238
+        ]
239
+      }
240
+    }
241
+  });
242
+
243
+  grunt.loadNpmTasks('grunt-contrib-concat');
244
+  grunt.loadNpmTasks('grunt-contrib-connect');
245
+  grunt.loadNpmTasks('grunt-contrib-jshint');
246
+  grunt.loadNpmTasks('grunt-contrib-qunit');
247
+  grunt.loadNpmTasks('grunt-contrib-requirejs');
248
+  grunt.loadNpmTasks('grunt-contrib-uglify');
249
+  grunt.loadNpmTasks('grunt-contrib-watch');
250
+
251
+  grunt.loadNpmTasks('grunt-sass');
252
+
253
+  grunt.registerTask('default', ['compile', 'test', 'minify']);
254
+
255
+  grunt.registerTask('compile', [
256
+    'requirejs:dist', 'requirejs:dist.full', 'requirejs:i18n',
257
+    'concat:dist', 'concat:dist.full',
258
+    'sass:dev'
259
+  ]);
260
+  grunt.registerTask('minify', ['uglify', 'sass:dist']);
261
+  grunt.registerTask('test', ['connect:tests', 'qunit', 'jshint']);
262
+};

+ 13 - 0
app/staticfile/vendor/select2/bower.json

@@ -0,0 +1,13 @@
1
+{
2
+    "name": "select2",
3
+    "description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.",
4
+    "main": [
5
+        "dist/js/select2.js",
6
+        "src/scss/core.scss"
7
+    ],
8
+    "license": "MIT",
9
+    "repository": {
10
+        "type": "git",
11
+        "url": "git@github.com:select2/select2.git"
12
+    }
13
+}

+ 19 - 0
app/staticfile/vendor/select2/component.json

@@ -0,0 +1,19 @@
1
+{
2
+  "name": "select2",
3
+  "repo": "select/select2",
4
+  "description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.",
5
+  "version": "4.0.7",
6
+  "demo": "https://select2.org/",
7
+  "keywords": [
8
+    "jquery"
9
+  ],
10
+  "main": "dist/js/select2.js",
11
+  "styles": [
12
+    "dist/css/select2.css"
13
+  ],
14
+  "scripts": [
15
+    "dist/js/select2.js",
16
+    "dist/js/i18n/*.js"
17
+  ],
18
+  "license": "MIT"
19
+}

+ 22 - 0
app/staticfile/vendor/select2/composer.json

@@ -0,0 +1,22 @@
1
+{
2
+  "name": "select2/select2",
3
+  "description": "Select2 is a jQuery based replacement for select boxes.",
4
+  "type": "component",
5
+  "homepage": "https://select2.org/",
6
+  "license": "MIT",
7
+  "extra": {
8
+    "component": {
9
+      "scripts": [
10
+        "dist/js/select2.js"
11
+      ],
12
+      "styles": [
13
+        "dist/css/select2.css"
14
+      ],
15
+      "files": [
16
+        "dist/js/select2.js",
17
+        "dist/js/i18n/*.js",
18
+        "dist/css/select2.css"
19
+      ]
20
+    }
21
+  }
22
+}

+ 484 - 0
app/staticfile/vendor/select2/dist/css/select2.css

@@ -0,0 +1,484 @@
1
+.select2-container {
2
+  box-sizing: border-box;
3
+  display: inline-block;
4
+  margin: 0;
5
+  position: relative;
6
+  vertical-align: middle; }
7
+  .select2-container .select2-selection--single {
8
+    box-sizing: border-box;
9
+    cursor: pointer;
10
+    display: block;
11
+    height: 28px;
12
+    user-select: none;
13
+    -webkit-user-select: none; }
14
+    .select2-container .select2-selection--single .select2-selection__rendered {
15
+      display: block;
16
+      padding-left: 8px;
17
+      padding-right: 20px;
18
+      overflow: hidden;
19
+      text-overflow: ellipsis;
20
+      white-space: nowrap; }
21
+    .select2-container .select2-selection--single .select2-selection__clear {
22
+      position: relative; }
23
+  .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
24
+    padding-right: 8px;
25
+    padding-left: 20px; }
26
+  .select2-container .select2-selection--multiple {
27
+    box-sizing: border-box;
28
+    cursor: pointer;
29
+    display: block;
30
+    min-height: 32px;
31
+    user-select: none;
32
+    -webkit-user-select: none; }
33
+    .select2-container .select2-selection--multiple .select2-selection__rendered {
34
+      display: inline-block;
35
+      overflow: hidden;
36
+      padding-left: 8px;
37
+      text-overflow: ellipsis;
38
+      white-space: nowrap; }
39
+  .select2-container .select2-search--inline {
40
+    float: left; }
41
+    .select2-container .select2-search--inline .select2-search__field {
42
+      box-sizing: border-box;
43
+      border: none;
44
+      font-size: 100%;
45
+      margin-top: 5px;
46
+      padding: 0; }
47
+      .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
48
+        -webkit-appearance: none; }
49
+
50
+.select2-dropdown {
51
+  background-color: white;
52
+  border: 1px solid #aaa;
53
+  border-radius: 4px;
54
+  box-sizing: border-box;
55
+  display: block;
56
+  position: absolute;
57
+  left: -100000px;
58
+  width: 100%;
59
+  z-index: 1051; }
60
+
61
+.select2-results {
62
+  display: block; }
63
+
64
+.select2-results__options {
65
+  list-style: none;
66
+  margin: 0;
67
+  padding: 0; }
68
+
69
+.select2-results__option {
70
+  padding: 6px;
71
+  user-select: none;
72
+  -webkit-user-select: none; }
73
+  .select2-results__option[aria-selected] {
74
+    cursor: pointer; }
75
+
76
+.select2-container--open .select2-dropdown {
77
+  left: 0; }
78
+
79
+.select2-container--open .select2-dropdown--above {
80
+  border-bottom: none;
81
+  border-bottom-left-radius: 0;
82
+  border-bottom-right-radius: 0; }
83
+
84
+.select2-container--open .select2-dropdown--below {
85
+  border-top: none;
86
+  border-top-left-radius: 0;
87
+  border-top-right-radius: 0; }
88
+
89
+.select2-search--dropdown {
90
+  display: block;
91
+  padding: 4px; }
92
+  .select2-search--dropdown .select2-search__field {
93
+    padding: 4px;
94
+    width: 100%;
95
+    box-sizing: border-box; }
96
+    .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
97
+      -webkit-appearance: none; }
98
+  .select2-search--dropdown.select2-search--hide {
99
+    display: none; }
100
+
101
+.select2-close-mask {
102
+  border: 0;
103
+  margin: 0;
104
+  padding: 0;
105
+  display: block;
106
+  position: fixed;
107
+  left: 0;
108
+  top: 0;
109
+  min-height: 100%;
110
+  min-width: 100%;
111
+  height: auto;
112
+  width: auto;
113
+  opacity: 0;
114
+  z-index: 99;
115
+  background-color: #fff;
116
+  filter: alpha(opacity=0); }
117
+
118
+.select2-hidden-accessible {
119
+  border: 0 !important;
120
+  clip: rect(0 0 0 0) !important;
121
+  -webkit-clip-path: inset(50%) !important;
122
+  clip-path: inset(50%) !important;
123
+  height: 1px !important;
124
+  overflow: hidden !important;
125
+  padding: 0 !important;
126
+  position: absolute !important;
127
+  width: 1px !important;
128
+  white-space: nowrap !important; }
129
+
130
+.select2-container--default .select2-selection--single {
131
+  background-color: #fff;
132
+  border: 1px solid #aaa;
133
+  border-radius: 4px; }
134
+  .select2-container--default .select2-selection--single .select2-selection__rendered {
135
+    color: #444;
136
+    line-height: 28px; }
137
+  .select2-container--default .select2-selection--single .select2-selection__clear {
138
+    cursor: pointer;
139
+    float: right;
140
+    font-weight: bold; }
141
+  .select2-container--default .select2-selection--single .select2-selection__placeholder {
142
+    color: #999; }
143
+  .select2-container--default .select2-selection--single .select2-selection__arrow {
144
+    height: 26px;
145
+    position: absolute;
146
+    top: 1px;
147
+    right: 1px;
148
+    width: 20px; }
149
+    .select2-container--default .select2-selection--single .select2-selection__arrow b {
150
+      border-color: #888 transparent transparent transparent;
151
+      border-style: solid;
152
+      border-width: 5px 4px 0 4px;
153
+      height: 0;
154
+      left: 50%;
155
+      margin-left: -4px;
156
+      margin-top: -2px;
157
+      position: absolute;
158
+      top: 50%;
159
+      width: 0; }
160
+
161
+.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
162
+  float: left; }
163
+
164
+.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
165
+  left: 1px;
166
+  right: auto; }
167
+
168
+.select2-container--default.select2-container--disabled .select2-selection--single {
169
+  background-color: #eee;
170
+  cursor: default; }
171
+  .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
172
+    display: none; }
173
+
174
+.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
175
+  border-color: transparent transparent #888 transparent;
176
+  border-width: 0 4px 5px 4px; }
177
+
178
+.select2-container--default .select2-selection--multiple {
179
+  background-color: white;
180
+  border: 1px solid #aaa;
181
+  border-radius: 4px;
182
+  cursor: text; }
183
+  .select2-container--default .select2-selection--multiple .select2-selection__rendered {
184
+    box-sizing: border-box;
185
+    list-style: none;
186
+    margin: 0;
187
+    padding: 0 5px;
188
+    width: 100%; }
189
+    .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
190
+      list-style: none; }
191
+  .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
192
+    color: #999;
193
+    margin-top: 5px;
194
+    float: left; }
195
+  .select2-container--default .select2-selection--multiple .select2-selection__clear {
196
+    cursor: pointer;
197
+    float: right;
198
+    font-weight: bold;
199
+    margin-top: 5px;
200
+    margin-right: 10px; }
201
+  .select2-container--default .select2-selection--multiple .select2-selection__choice {
202
+    background-color: #e4e4e4;
203
+    border: 1px solid #aaa;
204
+    border-radius: 4px;
205
+    cursor: default;
206
+    float: left;
207
+    margin-right: 5px;
208
+    margin-top: 5px;
209
+    padding: 0 5px; }
210
+  .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
211
+    color: #999;
212
+    cursor: pointer;
213
+    display: inline-block;
214
+    font-weight: bold;
215
+    margin-right: 2px; }
216
+    .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
217
+      color: #333; }
218
+
219
+.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
220
+  float: right; }
221
+
222
+.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
223
+  margin-left: 5px;
224
+  margin-right: auto; }
225
+
226
+.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
227
+  margin-left: 2px;
228
+  margin-right: auto; }
229
+
230
+.select2-container--default.select2-container--focus .select2-selection--multiple {
231
+  border: solid black 1px;
232
+  outline: 0; }
233
+
234
+.select2-container--default.select2-container--disabled .select2-selection--multiple {
235
+  background-color: #eee;
236
+  cursor: default; }
237
+
238
+.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
239
+  display: none; }
240
+
241
+.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
242
+  border-top-left-radius: 0;
243
+  border-top-right-radius: 0; }
244
+
245
+.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
246
+  border-bottom-left-radius: 0;
247
+  border-bottom-right-radius: 0; }
248
+
249
+.select2-container--default .select2-search--dropdown .select2-search__field {
250
+  border: 1px solid #aaa; }
251
+
252
+.select2-container--default .select2-search--inline .select2-search__field {
253
+  background: transparent;
254
+  border: none;
255
+  outline: 0;
256
+  box-shadow: none;
257
+  -webkit-appearance: textfield; }
258
+
259
+.select2-container--default .select2-results > .select2-results__options {
260
+  max-height: 200px;
261
+  overflow-y: auto; }
262
+
263
+.select2-container--default .select2-results__option[role=group] {
264
+  padding: 0; }
265
+
266
+.select2-container--default .select2-results__option[aria-disabled=true] {
267
+  color: #999; }
268
+
269
+.select2-container--default .select2-results__option[aria-selected=true] {
270
+  background-color: #ddd; }
271
+
272
+.select2-container--default .select2-results__option .select2-results__option {
273
+  padding-left: 1em; }
274
+  .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
275
+    padding-left: 0; }
276
+  .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
277
+    margin-left: -1em;
278
+    padding-left: 2em; }
279
+    .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
280
+      margin-left: -2em;
281
+      padding-left: 3em; }
282
+      .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
283
+        margin-left: -3em;
284
+        padding-left: 4em; }
285
+        .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
286
+          margin-left: -4em;
287
+          padding-left: 5em; }
288
+          .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
289
+            margin-left: -5em;
290
+            padding-left: 6em; }
291
+
292
+.select2-container--default .select2-results__option--highlighted[aria-selected] {
293
+  background-color: #5897fb;
294
+  color: white; }
295
+
296
+.select2-container--default .select2-results__group {
297
+  cursor: default;
298
+  display: block;
299
+  padding: 6px; }
300
+
301
+.select2-container--classic .select2-selection--single {
302
+  background-color: #f7f7f7;
303
+  border: 1px solid #aaa;
304
+  border-radius: 4px;
305
+  outline: 0;
306
+  background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
307
+  background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
308
+  background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
309
+  background-repeat: repeat-x;
310
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
311
+  .select2-container--classic .select2-selection--single:focus {
312
+    border: 1px solid #5897fb; }
313
+  .select2-container--classic .select2-selection--single .select2-selection__rendered {
314
+    color: #444;
315
+    line-height: 28px; }
316
+  .select2-container--classic .select2-selection--single .select2-selection__clear {
317
+    cursor: pointer;
318
+    float: right;
319
+    font-weight: bold;
320
+    margin-right: 10px; }
321
+  .select2-container--classic .select2-selection--single .select2-selection__placeholder {
322
+    color: #999; }
323
+  .select2-container--classic .select2-selection--single .select2-selection__arrow {
324
+    background-color: #ddd;
325
+    border: none;
326
+    border-left: 1px solid #aaa;
327
+    border-top-right-radius: 4px;
328
+    border-bottom-right-radius: 4px;
329
+    height: 26px;
330
+    position: absolute;
331
+    top: 1px;
332
+    right: 1px;
333
+    width: 20px;
334
+    background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
335
+    background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
336
+    background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
337
+    background-repeat: repeat-x;
338
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
339
+    .select2-container--classic .select2-selection--single .select2-selection__arrow b {
340
+      border-color: #888 transparent transparent transparent;
341
+      border-style: solid;
342
+      border-width: 5px 4px 0 4px;
343
+      height: 0;
344
+      left: 50%;
345
+      margin-left: -4px;
346
+      margin-top: -2px;
347
+      position: absolute;
348
+      top: 50%;
349
+      width: 0; }
350
+
351
+.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
352
+  float: left; }
353
+
354
+.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
355
+  border: none;
356
+  border-right: 1px solid #aaa;
357
+  border-radius: 0;
358
+  border-top-left-radius: 4px;
359
+  border-bottom-left-radius: 4px;
360
+  left: 1px;
361
+  right: auto; }
362
+
363
+.select2-container--classic.select2-container--open .select2-selection--single {
364
+  border: 1px solid #5897fb; }
365
+  .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
366
+    background: transparent;
367
+    border: none; }
368
+    .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
369
+      border-color: transparent transparent #888 transparent;
370
+      border-width: 0 4px 5px 4px; }
371
+
372
+.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
373
+  border-top: none;
374
+  border-top-left-radius: 0;
375
+  border-top-right-radius: 0;
376
+  background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
377
+  background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
378
+  background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
379
+  background-repeat: repeat-x;
380
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
381
+
382
+.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
383
+  border-bottom: none;
384
+  border-bottom-left-radius: 0;
385
+  border-bottom-right-radius: 0;
386
+  background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
387
+  background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
388
+  background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
389
+  background-repeat: repeat-x;
390
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
391
+
392
+.select2-container--classic .select2-selection--multiple {
393
+  background-color: white;
394
+  border: 1px solid #aaa;
395
+  border-radius: 4px;
396
+  cursor: text;
397
+  outline: 0; }
398
+  .select2-container--classic .select2-selection--multiple:focus {
399
+    border: 1px solid #5897fb; }
400
+  .select2-container--classic .select2-selection--multiple .select2-selection__rendered {
401
+    list-style: none;
402
+    margin: 0;
403
+    padding: 0 5px; }
404
+  .select2-container--classic .select2-selection--multiple .select2-selection__clear {
405
+    display: none; }
406
+  .select2-container--classic .select2-selection--multiple .select2-selection__choice {
407
+    background-color: #e4e4e4;
408
+    border: 1px solid #aaa;
409
+    border-radius: 4px;
410
+    cursor: default;
411
+    float: left;
412
+    margin-right: 5px;
413
+    margin-top: 5px;
414
+    padding: 0 5px; }
415
+  .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
416
+    color: #888;
417
+    cursor: pointer;
418
+    display: inline-block;
419
+    font-weight: bold;
420
+    margin-right: 2px; }
421
+    .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
422
+      color: #555; }
423
+
424
+.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
425
+  float: right;
426
+  margin-left: 5px;
427
+  margin-right: auto; }
428
+
429
+.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
430
+  margin-left: 2px;
431
+  margin-right: auto; }
432
+
433
+.select2-container--classic.select2-container--open .select2-selection--multiple {
434
+  border: 1px solid #5897fb; }
435
+
436
+.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
437
+  border-top: none;
438
+  border-top-left-radius: 0;
439
+  border-top-right-radius: 0; }
440
+
441
+.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
442
+  border-bottom: none;
443
+  border-bottom-left-radius: 0;
444
+  border-bottom-right-radius: 0; }
445
+
446
+.select2-container--classic .select2-search--dropdown .select2-search__field {
447
+  border: 1px solid #aaa;
448
+  outline: 0; }
449
+
450
+.select2-container--classic .select2-search--inline .select2-search__field {
451
+  outline: 0;
452
+  box-shadow: none; }
453
+
454
+.select2-container--classic .select2-dropdown {
455
+  background-color: white;
456
+  border: 1px solid transparent; }
457
+
458
+.select2-container--classic .select2-dropdown--above {
459
+  border-bottom: none; }
460
+
461
+.select2-container--classic .select2-dropdown--below {
462
+  border-top: none; }
463
+
464
+.select2-container--classic .select2-results > .select2-results__options {
465
+  max-height: 200px;
466
+  overflow-y: auto; }
467
+
468
+.select2-container--classic .select2-results__option[role=group] {
469
+  padding: 0; }
470
+
471
+.select2-container--classic .select2-results__option[aria-disabled=true] {
472
+  color: grey; }
473
+
474
+.select2-container--classic .select2-results__option--highlighted[aria-selected] {
475
+  background-color: #3875d7;
476
+  color: white; }
477
+
478
+.select2-container--classic .select2-results__group {
479
+  cursor: default;
480
+  display: block;
481
+  padding: 6px; }
482
+
483
+.select2-container--classic.select2-container--open .select2-dropdown {
484
+  border-color: #5897fb; }

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 0
app/staticfile/vendor/select2/dist/css/select2.min.css


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/af.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/ar.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/az.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/bg.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/bn.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/bs.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/ca.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/cs.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/da.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/de.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/dsb.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/el.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/en.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/es.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/et.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/eu.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/fa.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/fi.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/fr.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/gl.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/he.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/hi.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/hr.js


Fichier diff supprimé car celui-ci est trop grand
+ 3 - 0
app/staticfile/vendor/select2/dist/js/i18n/hsb.js


+ 0 - 0
app/staticfile/vendor/select2/dist/js/i18n/hu.js


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff

find places · ad01fc0d19 - Gogs: Simplico Git Service
Bladeren bron

find places

tum 4 jaren geleden
bovenliggende
commit
ad01fc0d19
100 gewijzigde bestanden met toevoegingen van 21728 en 7 verwijderingen
  1. BIN
      .DS_Store
  2. 1 2
      Dockerfile
  3. BIN
      app/.DS_Store
  4. BIN
      app/backend/.DS_Store
  5. 0 0
      app/backend/__init__.py
  6. 0 0
      app/backend/__pycache__/__init__.cpython-39.pyc
  7. BIN
      app/backend/__pycache__/admin.cpython-39.pyc
  8. 0 0
      app/backend/__pycache__/apps.cpython-39.pyc
  9. BIN
      app/backend/__pycache__/models.cpython-39.pyc
  10. BIN
      app/backend/__pycache__/urls.cpython-39.pyc
  11. BIN
      app/backend/__pycache__/views.cpython-39.pyc
  12. 35 2
      backend/admin.py
  13. 0 0
      app/backend/apps.py
  14. 0 0
      app/backend/migrations/0001_initial.py
  15. 0 0
      app/backend/migrations/0002_hospital_geolocation.py
  16. 0 0
      app/backend/migrations/0003_alter_hospital_address.py
  17. 0 0
      app/backend/migrations/0004_alter_hospital_location.py
  18. 0 0
      app/backend/migrations/0005_hospital_address_text.py
  19. 0 0
      app/backend/migrations/0006_bed_patient.py
  20. 0 0
      app/backend/migrations/0007_auto_20210718_0249.py
  21. 0 0
      app/backend/migrations/0008_auto_20210718_0659.py
  22. 0 0
      app/backend/migrations/0009_auto_20210718_0702.py
  23. 0 0
      app/backend/migrations/0010_auto_20210718_0713.py
  24. 0 0
      app/backend/migrations/0011_auto_20210718_0722.py
  25. 0 0
      app/backend/migrations/0012_patient_comment.py
  26. 0 0
      app/backend/migrations/0013_patientlog.py
  27. 0 0
      app/backend/migrations/0014_alter_patientlog_bed.py
  28. 0 0
      app/backend/migrations/0015_alter_patientlog_bed.py
  29. 0 0
      app/backend/migrations/0016_auto_20210718_1031.py
  30. 0 0
      app/backend/migrations/0017_ambulance_driver.py
  31. 0 0
      app/backend/migrations/0018_ambulance_color.py
  32. 0 0
      app/backend/migrations/0019_ambulanceticket.py
  33. 0 0
      app/backend/migrations/0020_driver_status.py
  34. 0 0
      app/backend/migrations/0021_auto_20210719_0014.py
  35. 0 0
      app/backend/migrations/0022_auto_20210719_0024.py
  36. 0 0
      app/backend/migrations/0023_place.py
  37. 22 0
      app/backend/migrations/0024_points.py
  38. 28 0
      app/backend/migrations/0025_auto_20210721_1145.py
  39. 23 0
      app/backend/migrations/0026_auto_20210721_1218.py
  40. 23 0
      app/backend/migrations/0027_auto_20210721_1251.py
  41. 18 0
      app/backend/migrations/0028_place_title.py
  42. 20 0
      app/backend/migrations/0029_importfile.py
  43. 0 0
      app/backend/migrations/__init__.py
  44. 0 0
      app/backend/migrations/__pycache__/0001_initial.cpython-39.pyc
  45. 0 0
      app/backend/migrations/__pycache__/0002_hospital_geolocation.cpython-39.pyc
  46. 0 0
      app/backend/migrations/__pycache__/0003_alter_hospital_address.cpython-39.pyc
  47. 0 0
      app/backend/migrations/__pycache__/0004_alter_hospital_location.cpython-39.pyc
  48. 0 0
      app/backend/migrations/__pycache__/0005_hospital_address_text.cpython-39.pyc
  49. 0 0
      app/backend/migrations/__pycache__/0006_bed_patient.cpython-39.pyc
  50. 0 0
      app/backend/migrations/__pycache__/0007_auto_20210718_0246.cpython-39.pyc
  51. 0 0
      app/backend/migrations/__pycache__/0007_auto_20210718_0249.cpython-39.pyc
  52. 0 0
      app/backend/migrations/__pycache__/0008_alter_patient_prefix.cpython-39.pyc
  53. 0 0
      app/backend/migrations/__pycache__/0008_auto_20210718_0659.cpython-39.pyc
  54. 0 0
      app/backend/migrations/__pycache__/0009_auto_20210718_0702.cpython-39.pyc
  55. 0 0
      app/backend/migrations/__pycache__/0010_auto_20210718_0711.cpython-39.pyc
  56. 0 0
      app/backend/migrations/__pycache__/0010_auto_20210718_0713.cpython-39.pyc
  57. 0 0
      app/backend/migrations/__pycache__/0011_auto_20210718_0722.cpython-39.pyc
  58. 0 0
      app/backend/migrations/__pycache__/0012_patient_comment.cpython-39.pyc
  59. 0 0
      app/backend/migrations/__pycache__/0013_patientlog.cpython-39.pyc
  60. 0 0
      app/backend/migrations/__pycache__/0014_alter_patientlog_bed.cpython-39.pyc
  61. 0 0
      app/backend/migrations/__pycache__/0015_alter_patientlog_bed.cpython-39.pyc
  62. 0 0
      app/backend/migrations/__pycache__/0016_auto_20210718_1031.cpython-39.pyc
  63. 0 0
      app/backend/migrations/__pycache__/0017_ambulance_driver.cpython-39.pyc
  64. 0 0
      app/backend/migrations/__pycache__/0018_ambulance_color.cpython-39.pyc
  65. 0 0
      app/backend/migrations/__pycache__/0019_ambulanceticket.cpython-39.pyc
  66. 0 0
      app/backend/migrations/__pycache__/0020_driver_status.cpython-39.pyc
  67. 0 0
      app/backend/migrations/__pycache__/0021_auto_20210719_0014.cpython-39.pyc
  68. 0 0
      app/backend/migrations/__pycache__/0022_auto_20210719_0024.cpython-39.pyc
  69. 0 0
      app/backend/migrations/__pycache__/0023_place.cpython-39.pyc
  70. BIN
      app/backend/migrations/__pycache__/0024_points.cpython-39.pyc
  71. BIN
      app/backend/migrations/__pycache__/0025_auto_20210721_1145.cpython-39.pyc
  72. BIN
      app/backend/migrations/__pycache__/0026_auto_20210721_1218.cpython-39.pyc
  73. BIN
      app/backend/migrations/__pycache__/0027_auto_20210721_1251.cpython-39.pyc
  74. BIN
      app/backend/migrations/__pycache__/0028_place_title.cpython-39.pyc
  75. BIN
      app/backend/migrations/__pycache__/0029_importfile.cpython-39.pyc
  76. 0 0
      app/backend/migrations/__pycache__/__init__.cpython-39.pyc
  77. 96 0
      backend/models.py
  78. 7 0
      app/backend/templates/backend/import_file.html
  79. 8 0
      app/backend/templates/backend/index.html
  80. 0 0
      app/backend/tests.py
  81. 1 0
      backend/urls.py
  82. 11 0
      app/backend/views.py
  83. 0 0
      app/manage.py
  84. 0 0
      app/media/uploads/2021/07/18/67224.jpg
  85. 10715 0
      app/media/uploads/2021/07/22/citizeninfo_health_20200314.csv
  86. 10715 0
      app/media/uploads/2021/07/22/citizeninfo_health_20200314_W9jk8Vu.csv
  87. 1 0
      requirements.txt
  88. 0 0
      app/shaqfindbed/__init__.py
  89. 0 0
      app/shaqfindbed/__pycache__/__init__.cpython-39.pyc
  90. BIN
      app/shaqfindbed/__pycache__/settings.cpython-39.pyc
  91. BIN
      shaqfindbed/__pycache__/urls.cpython-39.pyc
  92. 0 0
      app/shaqfindbed/__pycache__/wsgi.cpython-39.pyc
  93. 0 0
      app/shaqfindbed/asgi.py
  94. 3 2
      shaqfindbed/settings.py
  95. 1 1
      shaqfindbed/urls.py
  96. 0 0
      app/shaqfindbed/wsgi.py
  97. BIN
      app/static/.DS_Store
  98. BIN
      app/static/admin/.DS_Store
  99. 0 0
      app/static/admin/css/autocomplete.css
  100. 0 0
      staticfile/admin/css/base.css

BIN
.DS_Store


+ 1 - 2
Dockerfile

@@ -1,11 +1,10 @@
1 1
 # syntax=docker/dockerfile:1
2 2
 FROM python:3
3 3
 ENV PYTHONUNBUFFERED=1
4
+ADD ./app /code
4 5
 WORKDIR /code
5
-COPY requirements.txt /code/
6 6
 RUN apt-get update && apt-get install -y \
7 7
         gettext \
8 8
         xfonts-thai \
9 9
         gdal-bin libgdal-dev python3-gdal binutils libproj-dev
10 10
 RUN pip install -r requirements.txt
11
-COPY . /code/

BIN
app/.DS_Store


BIN
app/backend/.DS_Store


shaqfindbed/__init__.py → app/backend/__init__.py


backend/__pycache__/__init__.cpython-39.pyc → app/backend/__pycache__/__init__.cpython-39.pyc


BIN
app/backend/__pycache__/admin.cpython-39.pyc


backend/__pycache__/apps.cpython-39.pyc → app/backend/__pycache__/apps.cpython-39.pyc


BIN
app/backend/__pycache__/models.cpython-39.pyc


BIN
app/backend/__pycache__/urls.cpython-39.pyc


BIN
app/backend/__pycache__/views.cpython-39.pyc


+ 35 - 2
backend/admin.py

@@ -1,18 +1,46 @@
1 1
 from django.contrib import admin
2 2
 from django.contrib.gis.admin import OSMGeoAdmin
3
-from .models import Hospital, Patient, Bed, PatientLog, Driver, Ambulance, AmbulanceTicket, Place
3
+from .models import Hospital, Patient, Bed, PatientLog, Driver, Ambulance, AmbulanceTicket, Place, Points, ImportFile
4 4
 from django_google_maps import widgets as map_widgets
5 5
 from django_google_maps import fields as map_fields
6 6
 from django_json_widget.widgets import JSONEditorWidget
7 7
 from django.db import models
8
-
8
+from django.utils.html import format_html
9
+from django.conf import settings
9 10
 
10 11
 #@admin.register(Bed)
11 12
 
13
+@admin.register(ImportFile)
14
+class ImportFileAdmin(admin.ModelAdmin):
15
+    pass
16
+
12 17
 @admin.register(AmbulanceTicket)
13 18
 class AmbulanceTicketAdmin(admin.ModelAdmin):
14 19
     list_display = ('driver', 'ambulance', 'checkin_at', 'checkout_at', 'status')
15 20
 
21
+@admin.register(Points)
22
+class PointAdmin(admin.ModelAdmin):
23
+    readonly_fields = ('distance', 'duration', 'get_map')
24
+    formfield_overrides = {
25
+        map_fields.AddressField: {'widget': map_widgets.GoogleMapsAddressWidget},
26
+        models.JSONField: {'widget': JSONEditorWidget},
27
+    }
28
+
29
+    def get_map(self, obj):
30
+         return format_html( f'''
31
+<br>
32
+<div>
33
+<iframe
34
+  width="100%"
35
+  height="450"
36
+  style="border:0"
37
+  loading="lazy"
38
+  allowfullscreen
39
+  src="https://www.google.com/maps/embed/v1/directions?key={settings.GOOGLE_MAPS_API_KEY}&origin={obj.geolocation.lat},{obj.geolocation.lon}&destination={obj.dest.geolocation.lat},{obj.dest.geolocation.lon}"></iframe></div>''')
40
+
41
+    fields = ('dest', 'address', 'geolocation', 'distance', 'duration', 'directions','get_map' )
42
+    #pass
43
+
16 44
 @admin.register(Place)
17 45
 class PlaceAdmin(admin.ModelAdmin):
18 46
     formfield_overrides = {
@@ -51,7 +79,12 @@ class HospitalAdmin(OSMGeoAdmin):
51 79
 
52 80
 @admin.register(Patient)
53 81
 class PatientAdmin(admin.ModelAdmin):
82
+    readonly_fields = ('nearby_places', )
54 83
     formfield_overrides = {
55 84
         map_fields.AddressField: {'widget': map_widgets.GoogleMapsAddressWidget},
56 85
     }
57 86
     inlines = [PatientLogAdmin,]
87
+
88
+    def nearby_places(self, obj):
89
+        r = obj.nearby()
90
+        return format_html(r)

backend/apps.py → app/backend/apps.py


backend/migrations/0001_initial.py → app/backend/migrations/0001_initial.py


backend/migrations/0002_hospital_geolocation.py → app/backend/migrations/0002_hospital_geolocation.py


backend/migrations/0003_alter_hospital_address.py → app/backend/migrations/0003_alter_hospital_address.py


backend/migrations/0004_alter_hospital_location.py → app/backend/migrations/0004_alter_hospital_location.py


backend/migrations/0005_hospital_address_text.py → app/backend/migrations/0005_hospital_address_text.py


backend/migrations/0006_bed_patient.py → app/backend/migrations/0006_bed_patient.py


backend/migrations/0007_auto_20210718_0249.py → app/backend/migrations/0007_auto_20210718_0249.py


backend/migrations/0008_auto_20210718_0659.py → app/backend/migrations/0008_auto_20210718_0659.py


backend/migrations/0009_auto_20210718_0702.py → app/backend/migrations/0009_auto_20210718_0702.py


backend/migrations/0010_auto_20210718_0713.py → app/backend/migrations/0010_auto_20210718_0713.py


backend/migrations/0011_auto_20210718_0722.py → app/backend/migrations/0011_auto_20210718_0722.py


backend/migrations/0012_patient_comment.py → app/backend/migrations/0012_patient_comment.py


backend/migrations/0013_patientlog.py → app/backend/migrations/0013_patientlog.py


backend/migrations/0014_alter_patientlog_bed.py → app/backend/migrations/0014_alter_patientlog_bed.py


backend/migrations/0015_alter_patientlog_bed.py → app/backend/migrations/0015_alter_patientlog_bed.py


backend/migrations/0016_auto_20210718_1031.py → app/backend/migrations/0016_auto_20210718_1031.py


backend/migrations/0017_ambulance_driver.py → app/backend/migrations/0017_ambulance_driver.py


backend/migrations/0018_ambulance_color.py → app/backend/migrations/0018_ambulance_color.py


backend/migrations/0019_ambulanceticket.py → app/backend/migrations/0019_ambulanceticket.py


backend/migrations/0020_driver_status.py → app/backend/migrations/0020_driver_status.py


backend/migrations/0021_auto_20210719_0014.py → app/backend/migrations/0021_auto_20210719_0014.py


backend/migrations/0022_auto_20210719_0024.py → app/backend/migrations/0022_auto_20210719_0024.py


backend/migrations/0023_place.py → app/backend/migrations/0023_place.py


+ 22 - 0
app/backend/migrations/0024_points.py

@@ -0,0 +1,22 @@
1
+# Generated by Django 3.2.5 on 2021-07-19 08:11
2
+
3
+from django.db import migrations, models
4
+import django.db.models.deletion
5
+
6
+
7
+class Migration(migrations.Migration):
8
+
9
+    dependencies = [
10
+        ('backend', '0023_place'),
11
+    ]
12
+
13
+    operations = [
14
+        migrations.CreateModel(
15
+            name='Points',
16
+            fields=[
17
+                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18
+                ('dest', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dest', to='backend.place')),
19
+                ('src', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='src', to='backend.place')),
20
+            ],
21
+        ),
22
+    ]

+ 28 - 0
app/backend/migrations/0025_auto_20210721_1145.py

@@ -0,0 +1,28 @@
1
+# Generated by Django 3.2.5 on 2021-07-21 04:45
2
+
3
+from django.db import migrations
4
+import django_google_maps.fields
5
+
6
+
7
+class Migration(migrations.Migration):
8
+
9
+    dependencies = [
10
+        ('backend', '0024_points'),
11
+    ]
12
+
13
+    operations = [
14
+        migrations.RemoveField(
15
+            model_name='points',
16
+            name='src',
17
+        ),
18
+        migrations.AddField(
19
+            model_name='points',
20
+            name='address',
21
+            field=django_google_maps.fields.AddressField(max_length=200, null=True),
22
+        ),
23
+        migrations.AddField(
24
+            model_name='points',
25
+            name='geolocation',
26
+            field=django_google_maps.fields.GeoLocationField(max_length=100, null=True),
27
+        ),
28
+    ]

+ 23 - 0
app/backend/migrations/0026_auto_20210721_1218.py

@@ -0,0 +1,23 @@
1
+# Generated by Django 3.2.5 on 2021-07-21 05:18
2
+
3
+from django.db import migrations, models
4
+
5
+
6
+class Migration(migrations.Migration):
7
+
8
+    dependencies = [
9
+        ('backend', '0025_auto_20210721_1145'),
10
+    ]
11
+
12
+    operations = [
13
+        migrations.AddField(
14
+            model_name='points',
15
+            name='distance',
16
+            field=models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True),
17
+        ),
18
+        migrations.AddField(
19
+            model_name='points',
20
+            name='duration',
21
+            field=models.CharField(blank=True, max_length=200, null=True),
22
+        ),
23
+    ]

+ 23 - 0
app/backend/migrations/0027_auto_20210721_1251.py

@@ -0,0 +1,23 @@
1
+# Generated by Django 3.2.5 on 2021-07-21 05:51
2
+
3
+from django.db import migrations, models
4
+
5
+
6
+class Migration(migrations.Migration):
7
+
8
+    dependencies = [
9
+        ('backend', '0026_auto_20210721_1218'),
10
+    ]
11
+
12
+    operations = [
13
+        migrations.AddField(
14
+            model_name='points',
15
+            name='directions',
16
+            field=models.JSONField(blank=True, null=True),
17
+        ),
18
+        migrations.AlterField(
19
+            model_name='points',
20
+            name='distance',
21
+            field=models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True, verbose_name='Distance (km)'),
22
+        ),
23
+    ]

+ 18 - 0
app/backend/migrations/0028_place_title.py

@@ -0,0 +1,18 @@
1
+# Generated by Django 3.2.5 on 2021-07-21 10:11
2
+
3
+from django.db import migrations, models
4
+
5
+
6
+class Migration(migrations.Migration):
7
+
8
+    dependencies = [
9
+        ('backend', '0027_auto_20210721_1251'),
10
+    ]
11
+
12
+    operations = [
13
+        migrations.AddField(
14
+            model_name='place',
15
+            name='title',
16
+            field=models.CharField(blank=True, max_length=200, null=True),
17
+        ),
18
+    ]

+ 20 - 0
app/backend/migrations/0029_importfile.py

@@ -0,0 +1,20 @@
1
+# Generated by Django 3.2.5 on 2021-07-22 08:04
2
+
3
+from django.db import migrations, models
4
+
5
+
6
+class Migration(migrations.Migration):
7
+
8
+    dependencies = [
9
+        ('backend', '0028_place_title'),
10
+    ]
11
+
12
+    operations = [
13
+        migrations.CreateModel(
14
+            name='ImportFile',
15
+            fields=[
16
+                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
17
+                ('hospital_file', models.FileField(blank=True, upload_to='uploads/%Y/%m/%d/', verbose_name='Hospital (csv)')),
18
+            ],
19
+        ),
20
+    ]

backend/migrations/__init__.py → app/backend/migrations/__init__.py


backend/migrations/__pycache__/0001_initial.cpython-39.pyc → app/backend/migrations/__pycache__/0001_initial.cpython-39.pyc


backend/migrations/__pycache__/0002_hospital_geolocation.cpython-39.pyc → app/backend/migrations/__pycache__/0002_hospital_geolocation.cpython-39.pyc


backend/migrations/__pycache__/0003_alter_hospital_address.cpython-39.pyc → app/backend/migrations/__pycache__/0003_alter_hospital_address.cpython-39.pyc


backend/migrations/__pycache__/0004_alter_hospital_location.cpython-39.pyc → app/backend/migrations/__pycache__/0004_alter_hospital_location.cpython-39.pyc


backend/migrations/__pycache__/0005_hospital_address_text.cpython-39.pyc → app/backend/migrations/__pycache__/0005_hospital_address_text.cpython-39.pyc


backend/migrations/__pycache__/0006_bed_patient.cpython-39.pyc → app/backend/migrations/__pycache__/0006_bed_patient.cpython-39.pyc


backend/migrations/__pycache__/0007_auto_20210718_0246.cpython-39.pyc → app/backend/migrations/__pycache__/0007_auto_20210718_0246.cpython-39.pyc


backend/migrations/__pycache__/0007_auto_20210718_0249.cpython-39.pyc → app/backend/migrations/__pycache__/0007_auto_20210718_0249.cpython-39.pyc


backend/migrations/__pycache__/0008_alter_patient_prefix.cpython-39.pyc → app/backend/migrations/__pycache__/0008_alter_patient_prefix.cpython-39.pyc


backend/migrations/__pycache__/0008_auto_20210718_0659.cpython-39.pyc → app/backend/migrations/__pycache__/0008_auto_20210718_0659.cpython-39.pyc


backend/migrations/__pycache__/0009_auto_20210718_0702.cpython-39.pyc → app/backend/migrations/__pycache__/0009_auto_20210718_0702.cpython-39.pyc


backend/migrations/__pycache__/0010_auto_20210718_0711.cpython-39.pyc → app/backend/migrations/__pycache__/0010_auto_20210718_0711.cpython-39.pyc


backend/migrations/__pycache__/0010_auto_20210718_0713.cpython-39.pyc → app/backend/migrations/__pycache__/0010_auto_20210718_0713.cpython-39.pyc


backend/migrations/__pycache__/0011_auto_20210718_0722.cpython-39.pyc → app/backend/migrations/__pycache__/0011_auto_20210718_0722.cpython-39.pyc


backend/migrations/__pycache__/0012_patient_comment.cpython-39.pyc → app/backend/migrations/__pycache__/0012_patient_comment.cpython-39.pyc


backend/migrations/__pycache__/0013_patientlog.cpython-39.pyc → app/backend/migrations/__pycache__/0013_patientlog.cpython-39.pyc


backend/migrations/__pycache__/0014_alter_patientlog_bed.cpython-39.pyc → app/backend/migrations/__pycache__/0014_alter_patientlog_bed.cpython-39.pyc


backend/migrations/__pycache__/0015_alter_patientlog_bed.cpython-39.pyc → app/backend/migrations/__pycache__/0015_alter_patientlog_bed.cpython-39.pyc


backend/migrations/__pycache__/0016_auto_20210718_1031.cpython-39.pyc → app/backend/migrations/__pycache__/0016_auto_20210718_1031.cpython-39.pyc


backend/migrations/__pycache__/0017_ambulance_driver.cpython-39.pyc → app/backend/migrations/__pycache__/0017_ambulance_driver.cpython-39.pyc


backend/migrations/__pycache__/0018_ambulance_color.cpython-39.pyc → app/backend/migrations/__pycache__/0018_ambulance_color.cpython-39.pyc


backend/migrations/__pycache__/0019_ambulanceticket.cpython-39.pyc → app/backend/migrations/__pycache__/0019_ambulanceticket.cpython-39.pyc


backend/migrations/__pycache__/0020_driver_status.cpython-39.pyc → app/backend/migrations/__pycache__/0020_driver_status.cpython-39.pyc


backend/migrations/__pycache__/0021_auto_20210719_0014.cpython-39.pyc → app/backend/migrations/__pycache__/0021_auto_20210719_0014.cpython-39.pyc


backend/migrations/__pycache__/0022_auto_20210719_0024.cpython-39.pyc → app/backend/migrations/__pycache__/0022_auto_20210719_0024.cpython-39.pyc


backend/migrations/__pycache__/0023_place.cpython-39.pyc → app/backend/migrations/__pycache__/0023_place.cpython-39.pyc


BIN
app/backend/migrations/__pycache__/0024_points.cpython-39.pyc


BIN
app/backend/migrations/__pycache__/0025_auto_20210721_1145.cpython-39.pyc


BIN
app/backend/migrations/__pycache__/0026_auto_20210721_1218.cpython-39.pyc


BIN
app/backend/migrations/__pycache__/0027_auto_20210721_1251.cpython-39.pyc


BIN
app/backend/migrations/__pycache__/0028_place_title.cpython-39.pyc


BIN
app/backend/migrations/__pycache__/0029_importfile.cpython-39.pyc


backend/migrations/__pycache__/__init__.cpython-39.pyc → app/backend/migrations/__pycache__/__init__.cpython-39.pyc


+ 96 - 0
backend/models.py

@@ -8,6 +8,13 @@ from smart_selects.db_fields import (
8 8
     ChainedManyToManyField,
9 9
     GroupedForeignKey,
10 10
 )
11
+import googlemaps
12
+from django.contrib.gis.geos import fromstr
13
+
14
+from django.conf import settings
15
+import csv
16
+
17
+gmaps = googlemaps.Client(key=settings.GOOGLE_MAPS_API_KEY)
11 18
 # Create your models here.
12 19
 GENDER_CHOICES = (
13 20
     ('นางสาว','นางสาว'),
@@ -122,9 +129,66 @@ class Patient(models.Model):
122 129
     comment  = models.TextField(blank=True, null=True)
123 130
     #test
124 131
     def __str__(self):
132
+        #self.nearby()
125 133
         return f"{self.first_name} {self.last_name}"
126 134
 
135
+
136
+    def nearby(self):
137
+        r = gmaps.places_nearby(location=(self.geolocation.lat, self.geolocation.lon), type="hospital", radius=10000)
138
+        bd = ""
139
+        for r0 in r['results']:
140
+            openh = "-"
141
+            if 'opening_hours' in r0:
142
+                openh = r0['opening_hours']['open_now']
143
+            else:
144
+                openh = "-"
145
+
146
+            bd += f"<tr><td>{r0['name']}</td><td>{openh}</td><td>{r0['vicinity']}</td></tr>"
147
+
148
+        rt = f'''
149
+<br>
150
+        <table><thead><tr><th>Name</th><th>Opening Hours</th><th>Vicinity</th></tr></thead>
151
+        <tbody>
152
+            {bd}
153
+        </tbody>
154
+        </table>
155
+        '''
156
+        return rt
157
+
158
+
159
+
160
+class ImportFile(models.Model):
161
+    hospital_file  = models.FileField(upload_to="uploads/%Y/%m/%d/", blank=True, verbose_name="Hospital (csv)")
162
+
163
+    def save(self, *args, **kwargs):
164
+        super(ImportFile, self).save(*args, **kwargs)
165
+
166
+        with self.hospital_file.open('r') as csv_file:
167
+            csv_reader = csv.reader(csv_file, delimiter=',')
168
+            Hospital.objects.all().delete()
169
+            line_count = 0
170
+
171
+            for r in csv_reader:
172
+                if line_count > 0:
173
+                    print(r)
174
+                    print(f"{r[7]},{r[6]}")
175
+                    try:
176
+                        gp = map_fields.GeoPt(lat=float(r[6]), lon=float(r[7]))
177
+
178
+                        location = fromstr(f'POINT({r[7]} {r[6]})', srid=4326)
179
+                        print(location)
180
+                        h = Hospital(title=r[3], address_text=r[5], geolocation=gp, address=r[3])
181
+                        h.save()
182
+                    except Exception as e:
183
+                        print(e)
184
+
185
+                line_count += 1
186
+
187
+
188
+
127 189
 class Place(models.Model):
190
+    #title  = models.Char
191
+    title = models.CharField(max_length=200, blank=True, null=True)
128 192
     address = map_fields.AddressField(max_length=200)
129 193
     geolocation = map_fields.GeoLocationField(max_length=100)
130 194
 
@@ -133,6 +197,36 @@ class Place(models.Model):
133 197
 
134 198
     more_info  = models.JSONField(null=True, blank=True)
135 199
 
200
+    def __str__(self):
201
+        return f"{self.address} ({self.geolocation})"
202
+class Points(models.Model):
203
+    #src  = models.ForeignKey(Place, on_delete=models.SET_NULL, null=True, blank=False, related_name='src')
204
+    dest  = models.ForeignKey(Place, on_delete=models.SET_NULL, null=True, blank=False, related_name='dest')
205
+    address = map_fields.AddressField(max_length=200, null=True)
206
+    geolocation = map_fields.GeoLocationField(max_length=100, null=True)
207
+
208
+    distance = models.DecimalField(null=True, blank=True, decimal_places=2, max_digits=7, verbose_name="Distance (km)")
209
+    duration = models.CharField(max_length=200, null=True, blank=True)
210
+
211
+    directions  = models.JSONField(null=True, blank=True)
212
+
213
+    def save(self, *args, **kwargs):
214
+        geocode_result = gmaps.geocode('1600 Amphitheatre Parkway, Mountain View, CA')
215
+        print(geocode_result)
216
+        print(self.geolocation)
217
+        origin = [(self.geolocation.lat, self.geolocation.lon)]
218
+        dest = [(self.dest.geolocation.lat, self.dest.geolocation.lon)]
219
+        dst = gmaps.distance_matrix(origin, dest)
220
+        dirs = gmaps.directions(origin[0], dest[0])
221
+        self.directions = dirs
222
+        print(dirs)
223
+        self.distance = dst['rows'][0]['elements'][0]['distance']['value'] / 1000
224
+        self.duration = dst['rows'][0]['elements'][0]['duration']['text']
225
+        print(dst)
226
+        super(Points, self).save(*args, **kwargs)
227
+
228
+
229
+
136 230
 class Hospital(models.Model):
137 231
     title = models.CharField(max_length=200)
138 232
     location = models.PointField(blank=True, null=True)
@@ -190,3 +284,5 @@ class PatientLog(models.Model):
190 284
     updated_at = models.DateTimeField(auto_now=True)
191 285
 
192 286
 
287
+
288
+

+ 7 - 0
app/backend/templates/backend/import_file.html

@@ -0,0 +1,7 @@
1
+{% extends "base.html" %}
2
+
3
+{% block title %}My amazing blog{% endblock %}
4
+
5
+{% block content %}
6
+Import File
7
+{% endblock %}

+ 8 - 0
app/backend/templates/backend/index.html

@@ -0,0 +1,8 @@
1
+{% extends "base.html" %}
2
+
3
+{% block title %}My amazing blog{% endblock %}
4
+
5
+{% block content %}
6
+Hello world
7
+<a href="{% url "import_file" %}">Import</a>
8
+{% endblock %}

backend/tests.py → app/backend/tests.py


+ 1 - 0
backend/urls.py

@@ -4,4 +4,5 @@ from . import views
4 4
 
5 5
 urlpatterns = [
6 6
     path('', views.index, name='index'),
7
+    path('import_file', views.import_file, name='import_file'),
7 8
 ]

+ 11 - 0
app/backend/views.py

@@ -0,0 +1,11 @@
1
+from django.shortcuts import render
2
+
3
+# Create your views here.
4
+from django.http import HttpResponse
5
+
6
+
7
+def index(request):
8
+    return render(request, 'backend/index.html')
9
+
10
+def import_file(request):
11
+    return render(request, 'backend/import_file.html')

manage.py → app/manage.py


uploads/2021/07/18/67224.jpg → app/media/uploads/2021/07/18/67224.jpg


File diff suppressed because it is too large
+ 10715 - 0
app/media/uploads/2021/07/22/citizeninfo_health_20200314.csv


File diff suppressed because it is too large
+ 10715 - 0
app/media/uploads/2021/07/22/citizeninfo_health_20200314_W9jk8Vu.csv


+ 1 - 0
requirements.txt

@@ -5,3 +5,4 @@ django-smart-selects
5 5
 django-colorfield
6 6
 googlemaps
7 7
 django-json-widget
8
+django-import-export

backend/__init__.py → app/shaqfindbed/__init__.py


shaqfindbed/__pycache__/__init__.cpython-39.pyc → app/shaqfindbed/__pycache__/__init__.cpython-39.pyc


BIN
app/shaqfindbed/__pycache__/settings.cpython-39.pyc


BIN
shaqfindbed/__pycache__/urls.cpython-39.pyc


shaqfindbed/__pycache__/wsgi.cpython-39.pyc → app/shaqfindbed/__pycache__/wsgi.cpython-39.pyc


shaqfindbed/asgi.py → app/shaqfindbed/asgi.py


+ 3 - 2
shaqfindbed/settings.py

@@ -33,12 +33,13 @@ ALLOWED_HOSTS = []
33 33
 # Application definition
34 34
 
35 35
 INSTALLED_APPS = [
36
+    'django.contrib.staticfiles',
36 37
     'django.contrib.admin',
37 38
     'django.contrib.auth',
38 39
     'django.contrib.contenttypes',
39 40
     'django.contrib.sessions',
40 41
     'django.contrib.messages',
41
-    'django.contrib.staticfiles',
42
+    'import_export',
42 43
     'django_google_maps',
43 44
     'django.contrib.gis',
44 45
     'smart_selects',
@@ -62,7 +63,7 @@ ROOT_URLCONF = 'shaqfindbed.urls'
62 63
 TEMPLATES = [
63 64
     {
64 65
         'BACKEND': 'django.template.backends.django.DjangoTemplates',
65
-        'DIRS': [],
66
+        'DIRS': [os.path.join(BASE_DIR, 'templates')],
66 67
         'APP_DIRS': True,
67 68
         'OPTIONS': {
68 69
             'context_processors': [

+ 1 - 1
shaqfindbed/urls.py

@@ -23,7 +23,7 @@ urlpatterns = [
23 23
     path('backend/', include('backend.urls')),
24 24
     path('admin/', admin.site.urls),
25 25
     url(r'^chaining/', include('smart_selects.urls')),
26
-]
26
+] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
27 27
 
28 28
 if settings.DEBUG:
29 29
     urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

shaqfindbed/wsgi.py → app/shaqfindbed/wsgi.py


BIN
app/static/.DS_Store


BIN
app/static/admin/.DS_Store


staticfile/admin/css/autocomplete.css → app/static/admin/css/autocomplete.css


+ 0 - 0
staticfile/admin/css/base.css


Some files were not shown because too many files changed in this diff

tum/occp_server - Gogs: Simplico Git Service

Nessuna descrizione

LICENSE 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. Apache License
  2. Version 2.0, January 2004
  3. http://www.apache.org/licenses/
  4. TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
  5. 1. Definitions.
  6. "License" shall mean the terms and conditions for use, reproduction,
  7. and distribution as defined by Sections 1 through 9 of this document.
  8. "Licensor" shall mean the copyright owner or entity authorized by
  9. the copyright owner that is granting the License.
  10. "Legal Entity" shall mean the union of the acting entity and all
  11. other entities that control, are controlled by, or are under common
  12. control with that entity. For the purposes of this definition,
  13. "control" means (i) the power, direct or indirect, to cause the
  14. direction or management of such entity, whether by contract or
  15. otherwise, or (ii) ownership of fifty percent (50%) or more of the
  16. outstanding shares, or (iii) beneficial ownership of such entity.
  17. "You" (or "Your") shall mean an individual or Legal Entity
  18. exercising permissions granted by this License.
  19. "Source" form shall mean the preferred form for making modifications,
  20. including but not limited to software source code, documentation
  21. source, and configuration files.
  22. "Object" form shall mean any form resulting from mechanical
  23. transformation or translation of a Source form, including but
  24. not limited to compiled object code, generated documentation,
  25. and conversions to other media types.
  26. "Work" shall mean the work of authorship, whether in Source or
  27. Object form, made available under the License, as indicated by a
  28. copyright notice that is included in or attached to the work
  29. (an example is provided in the Appendix below).
  30. "Derivative Works" shall mean any work, whether in Source or Object
  31. form, that is based on (or derived from) the Work and for which the
  32. editorial revisions, annotations, elaborations, or other modifications
  33. represent, as a whole, an original work of authorship. For the purposes
  34. of this License, Derivative Works shall not include works that remain
  35. separable from, or merely link (or bind by name) to the interfaces of,
  36. the Work and Derivative Works thereof.
  37. "Contribution" shall mean any work of authorship, including
  38. the original version of the Work and any modifications or additions
  39. to that Work or Derivative Works thereof, that is intentionally
  40. submitted to Licensor for inclusion in the Work by the copyright owner
  41. or by an individual or Legal Entity authorized to submit on behalf of
  42. the copyright owner. For the purposes of this definition, "submitted"
  43. means any form of electronic, verbal, or written communication sent
  44. to the Licensor or its representatives, including but not limited to
  45. communication on electronic mailing lists, source code control systems,
  46. and issue tracking systems that are managed by, or on behalf of, the
  47. Licensor for the purpose of discussing and improving the Work, but
  48. excluding communication that is conspicuously marked or otherwise
  49. designated in writing by the copyright owner as "Not a Contribution."
  50. "Contributor" shall mean Licensor and any individual or Legal Entity
  51. on behalf of whom a Contribution has been received by Licensor and
  52. subsequently incorporated within the Work.
  53. 2. Grant of Copyright License. Subject to the terms and conditions of
  54. this License, each Contributor hereby grants to You a perpetual,
  55. worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  56. copyright license to reproduce, prepare Derivative Works of,
  57. publicly display, publicly perform, sublicense, and distribute the
  58. Work and such Derivative Works in Source or Object form.
  59. 3. Grant of Patent License. Subject to the terms and conditions of
  60. this License, each Contributor hereby grants to You a perpetual,
  61. worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  62. (except as stated in this section) patent license to make, have made,
  63. use, offer to sell, sell, import, and otherwise transfer the Work,
  64. where such license applies only to those patent claims licensable
  65. by such Contributor that are necessarily infringed by their
  66. Contribution(s) alone or by combination of their Contribution(s)
  67. with the Work to which such Contribution(s) was submitted. If You
  68. institute patent litigation against any entity (including a
  69. cross-claim or counterclaim in a lawsuit) alleging that the Work
  70. or a Contribution incorporated within the Work constitutes direct
  71. or contributory patent infringement, then any patent licenses
  72. granted to You under this License for that Work shall terminate
  73. as of the date such litigation is filed.
  74. 4. Redistribution. You may reproduce and distribute copies of the
  75. Work or Derivative Works thereof in any medium, with or without
  76. modifications, and in Source or Object form, provided that You
  77. meet the following conditions:
  78. (a) You must give any other recipients of the Work or
  79. Derivative Works a copy of this License; and
  80. (b) You must cause any modified files to carry prominent notices
  81. stating that You changed the files; and
  82. (c) You must retain, in the Source form of any Derivative Works
  83. that You distribute, all copyright, patent, trademark, and
  84. attribution notices from the Source form of the Work,
  85. excluding those notices that do not pertain to any part of
  86. the Derivative Works; and
  87. (d) If the Work includes a "NOTICE" text file as part of its
  88. distribution, then any Derivative Works that You distribute must
  89. include a readable copy of the attribution notices contained
  90. within such NOTICE file, excluding those notices that do not
  91. pertain to any part of the Derivative Works, in at least one
  92. of the following places: within a NOTICE text file distributed
  93. as part of the Derivative Works; within the Source form or
  94. documentation, if provided along with the Derivative Works; or,
  95. within a display generated by the Derivative Works, if and
  96. wherever such third-party notices normally appear. The contents
  97. of the NOTICE file are for informational purposes only and
  98. do not modify the License. You may add Your own attribution
  99. notices within Derivative Works that You distribute, alongside
  100. or as an addendum to the NOTICE text from the Work, provided
  101. that such additional attribution notices cannot be construed
  102. as modifying the License.
  103. You may add Your own copyright statement to Your modifications and
  104. may provide additional or different license terms and conditions
  105. for use, reproduction, or distribution of Your modifications, or
  106. for any such Derivative Works as a whole, provided Your use,
  107. reproduction, and distribution of the Work otherwise complies with
  108. the conditions stated in this License.
  109. 5. Submission of Contributions. Unless You explicitly state otherwise,
  110. any Contribution intentionally submitted for inclusion in the Work
  111. by You to the Licensor shall be under the terms and conditions of
  112. this License, without any additional terms or conditions.
  113. Notwithstanding the above, nothing herein shall supersede or modify
  114. the terms of any separate license agreement you may have executed
  115. with Licensor regarding such Contributions.
  116. 6. Trademarks. This License does not grant permission to use the trade
  117. names, trademarks, service marks, or product names of the Licensor,
  118. except as required for reasonable and customary use in describing the
  119. origin of the Work and reproducing the content of the NOTICE file.
  120. 7. Disclaimer of Warranty. Unless required by applicable law or
  121. agreed to in writing, Licensor provides the Work (and each
  122. Contributor provides its Contributions) on an "AS IS" BASIS,
  123. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  124. implied, including, without limitation, any warranties or conditions
  125. of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
  126. PARTICULAR PURPOSE. You are solely responsible for determining the
  127. appropriateness of using or redistributing the Work and assume any
  128. risks associated with Your exercise of permissions under this License.
  129. 8. Limitation of Liability. In no event and under no legal theory,
  130. whether in tort (including negligence), contract, or otherwise,
  131. unless required by applicable law (such as deliberate and grossly
  132. negligent acts) or agreed to in writing, shall any Contributor be
  133. liable to You for damages, including any direct, indirect, special,
  134. incidental, or consequential damages of any character arising as a
  135. result of this License or out of the use or inability to use the
  136. Work (including but not limited to damages for loss of goodwill,
  137. work stoppage, computer failure or malfunction, or any and all
  138. other commercial damages or losses), even if such Contributor
  139. has been advised of the possibility of such damages.
  140. 9. Accepting Warranty or Additional Liability. While redistributing
  141. the Work or Derivative Works thereof, You may choose to offer,
  142. and charge a fee for, acceptance of support, warranty, indemnity,
  143. or other liability obligations and/or rights consistent with this
  144. License. However, in accepting such obligations, You may act only
  145. on Your own behalf and on Your sole responsibility, not on behalf
  146. of any other Contributor, and only if You agree to indemnify,
  147. defend, and hold each Contributor harmless for any liability
  148. incurred by, or claims asserted against, such Contributor by reason
  149. of your accepting any such warranty or additional liability.
  150. END OF TERMS AND CONDITIONS
  151. APPENDIX: How to apply the Apache License to your work.
  152. To apply the Apache License to your work, attach the following
  153. boilerplate notice, with the fields enclosed by brackets "[]"
  154. replaced with your own identifying information. (Don't include
  155. the brackets!) The text should be enclosed in the appropriate
  156. comment syntax for the file format. We also recommend that a
  157. file or class name and description of purpose be included on the
  158. same "printed page" as the copyright notice for easier
  159. identification within third-party archives.
  160. Copyright 2020-2024 SAP SE or an SAP affiliate company
  161. Licensed under the Apache License, Version 2.0 (the "License");
  162. you may not use this file except in compliance with the License.
  163. You may obtain a copy of the License at
  164. http://www.apache.org/licenses/LICENSE-2.0
  165. Unless required by applicable law or agreed to in writing, software
  166. distributed under the License is distributed on an "AS IS" BASIS,
  167. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  168. See the License for the specific language governing permissions and
  169. limitations under the License.