diff options
author | Santo Cariotti <dcariotti24@gmail.com> | 2020-03-28 20:45:14 +0100 |
---|---|---|
committer | Santo Cariotti <dcariotti24@gmail.com> | 2020-03-28 20:45:14 +0100 |
commit | 67ccdd0393c5a424abb8e8a5924612dee6080114 (patch) | |
tree | 7903594facdce1c4a1c8c5474ec48d5aaef76fcc /src | |
parent | 991e1a04e12b2518c3605266334bb8f158db87af (diff) |
fix: filter for app name
Diffstat (limited to 'src')
-rw-r--r-- | src/frest/manage/utils.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/frest/manage/utils.py b/src/frest/manage/utils.py index 4f35937..8ff6dcb 100644 --- a/src/frest/manage/utils.py +++ b/src/frest/manage/utils.py @@ -112,7 +112,12 @@ def create_model_cli(name): def create_app(name): - name = name.lower() + name = name.lower().replace('-', '_') + + if name.isdigit() or name[0].isdigit(): + logging("Name cannot be a number o starts with a number", 2) + return + if len(name) < 2: logging("Name of app must be minimun 2 characters long", 2) return |