Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b5ed2e4

Browse files
added docker configuration file and made some changes on files class
1 parent a38e7e5 commit b5ed2e4

File tree

18 files changed

+18
-6
lines changed

18 files changed

+18
-6
lines changed

‎db.sqlite3‎

120 KB
Binary file not shown.

‎docker-compose.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '3'
2+
3+
services:
4+
python:
5+
image: python:3.7.7
6+
volumes:
7+
- .:/python-django-gallery-manager
8+
ports:
9+
- 8090:8090
10+
command: bash -c "cd ./python-django-gallery-manager && pip install -r requirements.txt && python manage.py runserver 0.0.0.0:8090"
7 Bytes
Binary file not shown.
7 Bytes
Binary file not shown.
-6 Bytes
Binary file not shown.
7 Bytes
Binary file not shown.
7 Bytes
Binary file not shown.
7 Bytes
Binary file not shown.

‎gallery/loadFiles.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# -*- coding: utf-8 -*-
22
import os, re
33
import urllib.parse
4+
from django.templatetags.static import static
45

56
class LoadFiles:
67

7-
PATH = "c:/Users/George/Pictures"
8+
# PATH = "c:/Users/George/venv/myProjects/gallery-pic"
9+
PATH = "./tutorial_photos"
810

911
def __init__(self, path_to_scan = None):
1012
self.path_to_scan = path_to_scan if path_to_scan else self.PATH
@@ -40,10 +42,9 @@ def getPhotosFiles(self, dir_name):
4042
dir_name = LoadFiles.decodeUrl(dir_name)
4143
self.path_to_scan = self.path_to_scan + '/' + dir_name
4244
for file in self.scanDirFunc():
43-
file_path = self.path_to_scan + '/' + file
44-
if os.path.isdir(file_path) == True or '.ini' in file:
45+
if os.path.isdir(file) == True or '.ini' in file:
4546
continue
46-
files_content.append(('/static/'+file_path).strip())
47+
files_content.append(static(file.strip()))
4748
return files_content
4849

4950
@staticmethod

‎media/css/custom.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ body {
66
}
77

88
.ex2 {
9-
height: 200px;
9+
height: 370px;
1010
overflow: hidden;
1111
}
1212

1313
.ex3 {
14-
height: 40px;
14+
height: 70px;
1515
overflow: hidden;
1616
}
1717

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /