prefer term dir
over folder
This commit is contained in:
@@ -147,7 +147,7 @@ class Application(tk.Frame):
|
|||||||
def calc_label_text():
|
def calc_label_text():
|
||||||
return "Path: " + "/".join(self.path_handle.path)
|
return "Path: " + "/".join(self.path_handle.path)
|
||||||
|
|
||||||
def exec_path_folder(idname, but_path):
|
def exec_path_dir(idname, but_path):
|
||||||
self.path_handle.append_path(idname)
|
self.path_handle.append_path(idname)
|
||||||
print(self.path_handle.path)
|
print(self.path_handle.path)
|
||||||
|
|
||||||
@@ -178,14 +178,14 @@ class Application(tk.Frame):
|
|||||||
# import random
|
# import random
|
||||||
# random.shuffle(items)
|
# random.shuffle(items)
|
||||||
|
|
||||||
for name_short, name_full, item_type in [("..", "", "folder")] + items:
|
for name_short, name_full, item_type in [("..", "", "dir")] + items:
|
||||||
print(name_short, name_full, item_type)
|
print(name_short, name_full, item_type)
|
||||||
if item_type == "folder":
|
if item_type == "dir":
|
||||||
but = tk.Label(self.frame, text="(/)", width=3, borderwidth="1", relief="solid")
|
but = tk.Label(self.frame, text="(/)", width=3, borderwidth="1", relief="solid")
|
||||||
but.grid(row=row, column=0)
|
but.grid(row=row, column=0)
|
||||||
self.grid_members.append(but)
|
self.grid_members.append(but)
|
||||||
|
|
||||||
def fn(idname=name_short, but_path=but_path): exec_path_folder(idname, but_path)
|
def fn(idname=name_short, but_path=but_path): exec_path_dir(idname, but_path)
|
||||||
|
|
||||||
but = tk.Button(self.frame, text=name_short + "/", fg="green", command=fn)
|
but = tk.Button(self.frame, text=name_short + "/", fg="green", command=fn)
|
||||||
but.grid(row=row, column=1, sticky="nw")
|
but.grid(row=row, column=1, sticky="nw")
|
||||||
|
@@ -88,9 +88,9 @@ class FilesListAPI(Resource):
|
|||||||
absolute_path = os.path.join(absolute_path_root, f)
|
absolute_path = os.path.join(absolute_path_root, f)
|
||||||
|
|
||||||
if os.path.isdir(absolute_path):
|
if os.path.isdir(absolute_path):
|
||||||
items_list.append((f, relative_path, 'folder'))
|
items_list.append((f, relative_path, "dir"))
|
||||||
else:
|
else:
|
||||||
items_list.append((f, relative_path, 'file'))
|
items_list.append((f, relative_path, "file"))
|
||||||
|
|
||||||
project_files = dict(
|
project_files = dict(
|
||||||
parent_path=parent_path,
|
parent_path=parent_path,
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
class Config(object):
|
class Config:
|
||||||
DEBUG=True
|
DEBUG = True
|
||||||
|
|
||||||
class Development(Config):
|
class Development(Config):
|
||||||
STORAGE_PATH='/Volumes/PROJECTS/storage'
|
STORAGE_PATH = "/Volumes/PROJECTS/storage"
|
||||||
UPLOAD_FOLDER = '/Volumes/PROJECTS/storage_staging'
|
UPLOAD_FOLDER = "/Volumes/PROJECTS/storage_staging"
|
||||||
ALLOWED_EXTENSIONS = {'txt', 'mp4', 'png', 'jpg', 'jpeg', 'gif', 'blend', 'zip'}
|
ALLOWED_EXTENSIONS = {'txt', 'mp4', 'png', 'jpg', 'jpeg', 'gif', 'blend', 'zip'}
|
||||||
|
Reference in New Issue
Block a user