cleanup: pep8
This commit is contained in:
@@ -189,7 +189,6 @@ class bam_session:
|
|||||||
os.path.join(session_rootdir, ".bam_tmp.zip"),
|
os.path.join(session_rootdir, ".bam_tmp.zip"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
with open(os.path.join(session_rootdir, ".bam_paths_uuid.json")) as f:
|
with open(os.path.join(session_rootdir, ".bam_paths_uuid.json")) as f:
|
||||||
import json
|
import json
|
||||||
paths_uuid = json.load(f)
|
paths_uuid = json.load(f)
|
||||||
@@ -293,7 +292,6 @@ class bam_commands:
|
|||||||
|
|
||||||
print("Project %r initialized" % proj_dirname)
|
print("Project %r initialized" % proj_dirname)
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create(session_name):
|
def create(session_name):
|
||||||
import os
|
import os
|
||||||
@@ -404,7 +402,6 @@ class bam_commands:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def commit(paths, message):
|
def commit(paths, message):
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
@@ -439,11 +436,9 @@ class bam_commands:
|
|||||||
with open(os.path.join(session_rootdir, ".bam_paths_uuid.json")) as f:
|
with open(os.path.join(session_rootdir, ".bam_paths_uuid.json")) as f:
|
||||||
paths_uuid = json.load(f)
|
paths_uuid = json.load(f)
|
||||||
|
|
||||||
|
|
||||||
with open(os.path.join(session_rootdir, ".bam_deps_remap.json")) as f:
|
with open(os.path.join(session_rootdir, ".bam_deps_remap.json")) as f:
|
||||||
deps_remap = json.load(f)
|
deps_remap = json.load(f)
|
||||||
|
|
||||||
|
|
||||||
paths_add = {}
|
paths_add = {}
|
||||||
paths_modified = {}
|
paths_modified = {}
|
||||||
paths_remove = {}
|
paths_remove = {}
|
||||||
@@ -458,7 +453,6 @@ class bam_commands:
|
|||||||
print("Nothing to commit!")
|
print("Nothing to commit!")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
for fn_rel, fn_abs in list(paths_modified.items()):
|
for fn_rel, fn_abs in list(paths_modified.items()):
|
||||||
# we may want to be more clever here
|
# we may want to be more clever here
|
||||||
deps = deps_remap.get(fn_rel)
|
deps = deps_remap.get(fn_rel)
|
||||||
@@ -555,7 +549,6 @@ class bam_commands:
|
|||||||
# TODO(cam)
|
# TODO(cam)
|
||||||
# if all goes well, rewrite sha1's
|
# if all goes well, rewrite sha1's
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def status(paths):
|
def status(paths):
|
||||||
# TODO(cam) multiple paths
|
# TODO(cam) multiple paths
|
||||||
@@ -565,7 +558,6 @@ class bam_commands:
|
|||||||
session_rootdir = bam_config.find_sessiondir(path, abort=True)
|
session_rootdir = bam_config.find_sessiondir(path, abort=True)
|
||||||
print(session_rootdir)
|
print(session_rootdir)
|
||||||
|
|
||||||
|
|
||||||
paths_add = {}
|
paths_add = {}
|
||||||
paths_modified = {}
|
paths_modified = {}
|
||||||
paths_remove = {}
|
paths_remove = {}
|
||||||
@@ -623,7 +615,6 @@ class bam_commands:
|
|||||||
if file_type != "dir":
|
if file_type != "dir":
|
||||||
print(" %s" % name_short)
|
print(" %s" % name_short)
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def deps(paths, recursive=False):
|
def deps(paths, recursive=False):
|
||||||
import blendfile_path_walker
|
import blendfile_path_walker
|
||||||
@@ -717,7 +708,7 @@ def create_argparse_checkout(subparsers):
|
|||||||
help="Path to checkout on the server",
|
help="Path to checkout on the server",
|
||||||
)
|
)
|
||||||
subparse.add_argument(
|
subparse.add_argument(
|
||||||
"-o", "--output",dest="output", type=str, metavar='DIRNAME',
|
"-o", "--output", dest="output", type=str, metavar='DIRNAME',
|
||||||
help="Local name to checkout the session into (optional, falls back to path name)",
|
help="Local name to checkout the session into (optional, falls back to path name)",
|
||||||
)
|
)
|
||||||
subparse.set_defaults(func=subcommand_checkout_cb)
|
subparse.set_defaults(func=subcommand_checkout_cb)
|
||||||
|
@@ -7,7 +7,6 @@ import os
|
|||||||
MODULE_DIR = os.path.dirname(__file__)
|
MODULE_DIR = os.path.dirname(__file__)
|
||||||
|
|
||||||
with open(os.path.join(MODULE_DIR, 'config.json'), 'r') as config:
|
with open(os.path.join(MODULE_DIR, 'config.json'), 'r') as config:
|
||||||
import json
|
|
||||||
config = json.load(config)
|
config = json.load(config)
|
||||||
|
|
||||||
|
|
||||||
@@ -55,7 +54,7 @@ payload = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
files = {'file': open('buck.mp4', 'rb')}
|
files = {'file': open('buck.mp4', 'rb')}
|
||||||
#files = {'name': ('filename', (open('mytest.txt', 'rb')))}
|
# files = {'name': ('filename', (open('mytest.txt', 'rb')))}
|
||||||
|
|
||||||
r = requests.put(request_url('/file'),
|
r = requests.put(request_url('/file'),
|
||||||
params=payload,
|
params=payload,
|
||||||
@@ -63,4 +62,3 @@ r = requests.put(request_url('/file'),
|
|||||||
files=files)
|
files=files)
|
||||||
|
|
||||||
print(r.text)
|
print(r.text)
|
||||||
|
|
||||||
|
@@ -184,7 +184,8 @@ class Application(tk.Frame):
|
|||||||
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_dir(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")
|
||||||
@@ -213,7 +214,9 @@ class Application(tk.Frame):
|
|||||||
if item_type == "file":
|
if item_type == "file":
|
||||||
but = tk.Label(self.frame, text="(b)", width=3, borderwidth="1", relief="solid")
|
but = tk.Label(self.frame, text="(b)", width=3, borderwidth="1", relief="solid")
|
||||||
but.grid(row=row, column=0)
|
but.grid(row=row, column=0)
|
||||||
def fn(idname=name_short): exec_path_blendfile(idname)
|
|
||||||
|
def fn(idname=name_short):
|
||||||
|
exec_path_blendfile(idname)
|
||||||
self.grid_members.append(but)
|
self.grid_members.append(but)
|
||||||
|
|
||||||
but = tk.Button(self.frame, text=name_short, fg="blue", command=fn)
|
but = tk.Button(self.frame, text=name_short, fg="blue", command=fn)
|
||||||
@@ -231,4 +234,3 @@ root = tk.Tk()
|
|||||||
app = Application(root).pack(side="top", fill="both", expand=True)
|
app = Application(root).pack(side="top", fill="both", expand=True)
|
||||||
root.title("BAM")
|
root.title("BAM")
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
|
|
||||||
|
@@ -55,4 +55,3 @@ def sha1_from_file(fn, block_size=1 << 20):
|
|||||||
break
|
break
|
||||||
sha1.update(data)
|
sha1.update(data)
|
||||||
return sha1.hexdigest()
|
return sha1.hexdigest()
|
||||||
|
|
||||||
|
@@ -245,7 +245,6 @@ def pack(blendfile_src, blendfile_dst, mode='FILE',
|
|||||||
zip_handle.write(src.decode('utf-8'),
|
zip_handle.write(src.decode('utf-8'),
|
||||||
arcname=os.path.relpath(dst, base_dir_dst).decode('utf-8'))
|
arcname=os.path.relpath(dst, base_dir_dst).decode('utf-8'))
|
||||||
|
|
||||||
|
|
||||||
yield report(" %s: %r\n" % (colorize("written", color='green'), blendfile_dst))
|
yield report(" %s: %r\n" % (colorize("written", color='green'), blendfile_dst))
|
||||||
else:
|
else:
|
||||||
raise Exception("%s not a known mode" % mode)
|
raise Exception("%s not a known mode" % mode)
|
||||||
@@ -331,4 +330,3 @@ def main():
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@ def create_from_files(deps):
|
|||||||
for f_abs in iter_files_blend(dirname):
|
for f_abs in iter_files_blend(dirname):
|
||||||
if f_abs.endswith(".png"):
|
if f_abs.endswith(".png"):
|
||||||
f_rel = bpy.path.relpath(f_abs)
|
f_rel = bpy.path.relpath(f_abs)
|
||||||
image = bpy.data.images.load(f)
|
image = bpy.data.images.load(f_rel)
|
||||||
image.use_fake_user = True
|
image.use_fake_user = True
|
||||||
deps.append(f_abs)
|
deps.append(f_abs)
|
||||||
|
|
||||||
@@ -96,4 +96,3 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
sys.exit(returncode)
|
sys.exit(returncode)
|
||||||
|
|
||||||
|
@@ -247,7 +247,6 @@ def bam_run(argv, cwd=None):
|
|||||||
import shlex
|
import shlex
|
||||||
sys.stdout.write("bam %s\n" % " ".join([shlex.quote(c) for c in argv]))
|
sys.stdout.write("bam %s\n" % " ".join([shlex.quote(c) for c in argv]))
|
||||||
|
|
||||||
|
|
||||||
# input('press_key!:')
|
# input('press_key!:')
|
||||||
|
|
||||||
with StdIO() as fakeio:
|
with StdIO() as fakeio:
|
||||||
@@ -299,8 +298,8 @@ def blendfile_template_create(blendfile, create_id, deps):
|
|||||||
returncode_test = 123
|
returncode_test = 123
|
||||||
blendfile_deps_json = os.path.join(TEMP_LOCAL, "blend_template_deps.json")
|
blendfile_deps_json = os.path.join(TEMP_LOCAL, "blend_template_deps.json")
|
||||||
os.makedirs(os.path.dirname(blendfile), exist_ok=True)
|
os.makedirs(os.path.dirname(blendfile), exist_ok=True)
|
||||||
stdout, stderr, returncode = run(
|
cmd = (
|
||||||
("blender",
|
"blender",
|
||||||
"--background",
|
"--background",
|
||||||
"--factory-startup",
|
"--factory-startup",
|
||||||
"-noaudio",
|
"-noaudio",
|
||||||
@@ -311,7 +310,8 @@ def blendfile_template_create(blendfile, create_id, deps):
|
|||||||
blendfile_deps_json,
|
blendfile_deps_json,
|
||||||
create_id,
|
create_id,
|
||||||
str(returncode_test),
|
str(returncode_test),
|
||||||
))
|
)
|
||||||
|
stdout, stderr, returncode = run(cmd)
|
||||||
|
|
||||||
if os.path.exists(blendfile_deps_json):
|
if os.path.exists(blendfile_deps_json):
|
||||||
import json
|
import json
|
||||||
@@ -577,6 +577,7 @@ class BamListTest(BamSessionTestCase):
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
ret = json.loads(stdout)
|
ret = json.loads(stdout)
|
||||||
|
self.assertEqual(2, len(ret))
|
||||||
|
|
||||||
|
|
||||||
class BamCommitTest(BamSessionTestCase):
|
class BamCommitTest(BamSessionTestCase):
|
||||||
@@ -645,8 +646,7 @@ class BamBlendTest(BamSimpleTestCase):
|
|||||||
yield filepath
|
yield filepath
|
||||||
|
|
||||||
for create_id, create_fn in blendfile_templates.__dict__.items():
|
for create_id, create_fn in blendfile_templates.__dict__.items():
|
||||||
if (create_id.startswith("create_") and
|
if (create_id.startswith("create_") and create_fn.__class__.__name__ == "function"):
|
||||||
create_fn.__class__.__name__ == "function"):
|
|
||||||
|
|
||||||
os.makedirs(TEMP_SESSION)
|
os.makedirs(TEMP_SESSION)
|
||||||
|
|
||||||
@@ -694,7 +694,6 @@ class BamDeleteTest(BamSessionTestCase):
|
|||||||
def test_delete(self):
|
def test_delete(self):
|
||||||
session_name = "mysession"
|
session_name = "mysession"
|
||||||
file_name = "testfile.blend"
|
file_name = "testfile.blend"
|
||||||
file_data = b"hello world!\n"
|
|
||||||
proj_path, session_path = self.init_session(session_name)
|
proj_path, session_path = self.init_session(session_name)
|
||||||
|
|
||||||
# now do a real commit
|
# now do a real commit
|
||||||
@@ -717,7 +716,6 @@ class BamDeleteTest(BamSessionTestCase):
|
|||||||
stdout, stderr = bam_run(["checkout", file_name, "--output", "new_out"], proj_path)
|
stdout, stderr = bam_run(["checkout", file_name, "--output", "new_out"], proj_path)
|
||||||
self.assertEqual("", stderr)
|
self.assertEqual("", stderr)
|
||||||
|
|
||||||
|
|
||||||
# now delete the file we just checked out
|
# now delete the file we just checked out
|
||||||
session_path = os.path.join(proj_path, "new_out")
|
session_path = os.path.join(proj_path, "new_out")
|
||||||
os.remove(os.path.join(session_path, file_name))
|
os.remove(os.path.join(session_path, file_name))
|
||||||
@@ -740,4 +738,3 @@ if __name__ == '__main__':
|
|||||||
data = global_setup()
|
data = global_setup()
|
||||||
unittest.main(exit=False)
|
unittest.main(exit=False)
|
||||||
global_teardown(data)
|
global_teardown(data)
|
||||||
|
|
||||||
|
@@ -117,7 +117,6 @@ class DirectoryAPI(Resource):
|
|||||||
path_root_abs = os.path.join(path_root_abs, path)
|
path_root_abs = os.path.join(path_root_abs, path)
|
||||||
parent_path = os.pardir
|
parent_path = os.pardir
|
||||||
|
|
||||||
|
|
||||||
if not os.path.isdir(path_root_abs):
|
if not os.path.isdir(path_root_abs):
|
||||||
return jsonify(message="Path is not a directory %r" % path_root_abs)
|
return jsonify(message="Path is not a directory %r" % path_root_abs)
|
||||||
|
|
||||||
@@ -138,7 +137,7 @@ class DirectoryAPI(Resource):
|
|||||||
}
|
}
|
||||||
|
|
||||||
return jsonify(project_files)
|
return jsonify(project_files)
|
||||||
#return {'message': 'Display files list'}
|
# return {'message': 'Display files list'}
|
||||||
|
|
||||||
|
|
||||||
class FileAPI(Resource):
|
class FileAPI(Resource):
|
||||||
@@ -218,7 +217,6 @@ class FileAPI(Resource):
|
|||||||
yield report("%s: %r\n" % (colorize("failed to extract", color='red'), filepath))
|
yield report("%s: %r\n" % (colorize("failed to extract", color='red'), filepath))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
with open(filepath_zip, 'rb') as f:
|
with open(filepath_zip, 'rb') as f:
|
||||||
f.seek(0, os.SEEK_END)
|
f.seek(0, os.SEEK_END)
|
||||||
f_size = f.tell()
|
f_size = f.tell()
|
||||||
@@ -246,8 +244,12 @@ class FileAPI(Resource):
|
|||||||
file = request.files['file']
|
file = request.files['file']
|
||||||
|
|
||||||
# Get the value of the first (and only) result for the specified project setting
|
# Get the value of the first (and only) result for the specified project setting
|
||||||
svn_password = next((setting.value for setting in project.settings if setting.name == 'svn_password'))
|
svn_password = next((setting.value
|
||||||
svn_default_user = next((setting.value for setting in project.settings if setting.name == 'svn_default_user'))
|
for setting in project.settings
|
||||||
|
if setting.name == 'svn_password'))
|
||||||
|
svn_default_user = next((setting.value
|
||||||
|
for setting in project.settings
|
||||||
|
if setting.name == 'svn_default_user'))
|
||||||
|
|
||||||
# We get the actual username from the http headers
|
# We get the actual username from the http headers
|
||||||
svn_user = auth.username()
|
svn_user = auth.username()
|
||||||
@@ -310,7 +312,7 @@ class FileAPI(Resource):
|
|||||||
# We add each unversioned file to SVN
|
# We add each unversioned file to SVN
|
||||||
if item_status == 'unversioned':
|
if item_status == 'unversioned':
|
||||||
result = local_client.run_command('add',
|
result = local_client.run_command('add',
|
||||||
[file_path,])
|
[file_path, ])
|
||||||
|
|
||||||
with open(os.path.join(extract_tmp_dir, '.bam_paths_ops.json'), 'r') as path_ops:
|
with open(os.path.join(extract_tmp_dir, '.bam_paths_ops.json'), 'r') as path_ops:
|
||||||
path_ops = json.load(path_ops)
|
path_ops = json.load(path_ops)
|
||||||
@@ -322,8 +324,7 @@ class FileAPI(Resource):
|
|||||||
file_path_abs = os.path.join(project.repository_path, file_path)
|
file_path_abs = os.path.join(project.repository_path, file_path)
|
||||||
assert(os.path.exists(file_path_abs))
|
assert(os.path.exists(file_path_abs))
|
||||||
result = local_client.run_command('rm',
|
result = local_client.run_command('rm',
|
||||||
[file_path_abs,])
|
[file_path_abs, ])
|
||||||
|
|
||||||
|
|
||||||
# Commit command
|
# Commit command
|
||||||
result = local_client.run_command('commit',
|
result = local_client.run_command('commit',
|
||||||
@@ -333,7 +334,6 @@ class FileAPI(Resource):
|
|||||||
'--password', svn_password],
|
'--password', svn_password],
|
||||||
combine=True)
|
combine=True)
|
||||||
|
|
||||||
|
|
||||||
return jsonify(message=result)
|
return jsonify(message=result)
|
||||||
else:
|
else:
|
||||||
return jsonify(message='File not allowed')
|
return jsonify(message='File not allowed')
|
||||||
@@ -405,8 +405,6 @@ class FileAPI(Resource):
|
|||||||
del write_dict_as_json
|
del write_dict_as_json
|
||||||
# done writing json!
|
# done writing json!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def allowed_file(filename):
|
def allowed_file(filename):
|
||||||
return '.' in filename and \
|
return '.' in filename and \
|
||||||
@@ -415,4 +413,3 @@ class FileAPI(Resource):
|
|||||||
|
|
||||||
api.add_resource(DirectoryAPI, '/<project_name>/file_list', endpoint='file_list')
|
api.add_resource(DirectoryAPI, '/<project_name>/file_list', endpoint='file_list')
|
||||||
api.add_resource(FileAPI, '/<project_name>/file', endpoint='file')
|
api.add_resource(FileAPI, '/<project_name>/file', endpoint='file')
|
||||||
|
|
||||||
|
@@ -27,12 +27,12 @@ def _list_items(view, context, model, name):
|
|||||||
return Markup(
|
return Markup(
|
||||||
'<div class="select2-container-multi">'
|
'<div class="select2-container-multi">'
|
||||||
'<ul class="select2-choices" style="border:0;cursor:default;background:none;">%s</ul></div>' % (
|
'<ul class="select2-choices" style="border:0;cursor:default;background:none;">%s</ul></div>' % (
|
||||||
''.join( ['<li class="select2-search-choice" style="padding:3px 5px;">'
|
''.join(['<li class="select2-search-choice" style="padding:3px 5px;">'
|
||||||
'<div>'+item.name+'</div></li>' for item in getattr(model,name)] )))
|
'<div>' + item.name + '</div></li>' for item in getattr(model, name)] )))
|
||||||
|
|
||||||
|
|
||||||
def _list_thumbnail(view, context, model, name):
|
def _list_thumbnail(view, context, model, name):
|
||||||
if not getattr(model,name): #model.name only does not work because name is a string
|
if not getattr(model,name): # model.name only does not work because name is a string
|
||||||
return ''
|
return ''
|
||||||
return ''
|
return ''
|
||||||
# return Markup('<img src="%s">' % url_for('static',
|
# return Markup('<img src="%s">' % url_for('static',
|
||||||
@@ -81,19 +81,20 @@ class CKTextAreaField(fields.TextAreaField):
|
|||||||
class CustomModelView(ModelView):
|
class CustomModelView(ModelView):
|
||||||
def is_accessible(self):
|
def is_accessible(self):
|
||||||
return True
|
return True
|
||||||
#return login.current_user.has_role('admin')
|
# return login.current_user.has_role('admin')
|
||||||
|
|
||||||
|
|
||||||
class CustomBaseView(BaseView):
|
class CustomBaseView(BaseView):
|
||||||
def is_accessible(self):
|
def is_accessible(self):
|
||||||
return True
|
return True
|
||||||
#return login.current_user.has_role('admin')
|
# return login.current_user.has_role('admin')
|
||||||
|
|
||||||
|
|
||||||
# Create customized index view class that handles login & registration
|
# Create customized index view class that handles login & registration
|
||||||
class CustomAdminIndexView(admin.AdminIndexView):
|
class CustomAdminIndexView(admin.AdminIndexView):
|
||||||
def is_accessible(self):
|
def is_accessible(self):
|
||||||
return True
|
return True
|
||||||
#return login.current_user.has_role('admin')
|
# return login.current_user.has_role('admin')
|
||||||
|
|
||||||
@expose('/')
|
@expose('/')
|
||||||
def index(self):
|
def index(self):
|
||||||
@@ -108,8 +109,7 @@ class CustomAdminIndexView(admin.AdminIndexView):
|
|||||||
# Create admin
|
# Create admin
|
||||||
backend = Admin(
|
backend = Admin(
|
||||||
app,
|
app,
|
||||||
'BAM',
|
"BAM",
|
||||||
index_view=CustomAdminIndexView(),
|
index_view=CustomAdminIndexView(),
|
||||||
base_template='admin/layout_admin.html'
|
base_template="admin/layout_admin.html"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -10,8 +10,8 @@ from application.modules.admin import _list_thumbnail
|
|||||||
class ProjectView(CustomModelView):
|
class ProjectView(CustomModelView):
|
||||||
column_searchable_list = ('name',)
|
column_searchable_list = ('name',)
|
||||||
column_list = ('name', 'picture', 'creation_date')
|
column_list = ('name', 'picture', 'creation_date')
|
||||||
#column_formatters = { 'picture': _list_thumbnail }
|
# column_formatters = { 'picture': _list_thumbnail }
|
||||||
#form_extra_fields = {'picture': image_upload_field('Header')}
|
# form_extra_fields = {'picture': image_upload_field('Header')}
|
||||||
form_overrides = dict(
|
form_overrides = dict(
|
||||||
status=SelectField,
|
status=SelectField,
|
||||||
)
|
)
|
||||||
|
@@ -9,7 +9,7 @@ class Project(db.Model):
|
|||||||
upload_path = db.Column(db.Text, nullable=False)
|
upload_path = db.Column(db.Text, nullable=False)
|
||||||
picture = db.Column(db.String(80))
|
picture = db.Column(db.String(80))
|
||||||
creation_date = db.Column(db.DateTime(), default=datetime.datetime.now)
|
creation_date = db.Column(db.DateTime(), default=datetime.datetime.now)
|
||||||
status = db.Column(db.String(80)) #active #inactive
|
status = db.Column(db.String(80)) # active #inactive
|
||||||
|
|
||||||
settings = db.relationship('ProjectSetting', backref='project')
|
settings = db.relationship('ProjectSetting', backref='project')
|
||||||
|
|
||||||
|
@@ -70,4 +70,3 @@ if context.is_offline_mode():
|
|||||||
run_migrations_offline()
|
run_migrations_offline()
|
||||||
else:
|
else:
|
||||||
run_migrations_online()
|
run_migrations_online()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user