clixdev
Advanced tools
+1
-1
| Metadata-Version: 2.1 | ||
| Name: clixdev | ||
| Version: 0.3.8.0 | ||
| Version: 0.3.8.1 | ||
| Summary: https://clix.dev command line tool. | ||
@@ -5,0 +5,0 @@ Author-email: Eris Verne <erisverne7@gmail.com> |
+1
-1
@@ -7,3 +7,3 @@ [build-system] | ||
| name = "clixdev" | ||
| version = "0.3.8.0" | ||
| version = "0.3.8.1" | ||
| authors = [ | ||
@@ -10,0 +10,0 @@ { name="Eris Verne", email="erisverne7@gmail.com" }, |
| Metadata-Version: 2.1 | ||
| Name: clixdev | ||
| Version: 0.3.8.0 | ||
| Version: 0.3.8.1 | ||
| Summary: https://clix.dev command line tool. | ||
@@ -5,0 +5,0 @@ Author-email: Eris Verne <erisverne7@gmail.com> |
@@ -81,11 +81,15 @@ import os | ||
| import clixdev | ||
| if not os.path.exists(clixdev.__path__ + '/projects'): | ||
| os.mkdir(clixdev.__path__ + '/projects') | ||
| os.mkdir(clixdev.__path__ + '/projects/migrations') | ||
| if not os.path.exists(clixdev.__path__ + '/apps/clix'): | ||
| # os.mkdir(clixdev.__path__ + '/apps/clix') | ||
| os.mkdir(clixdev.__path__ + '/apps/clix/migrations') | ||
| f = open(clixdev.__path__ + '/projects' + '/__init__.py', 'w') | ||
| f = open(clixdev.__path__ + '/apps' + '/__init__.py', 'w') | ||
| f.write("") | ||
| f.close() | ||
| f = open(clixdev.__path__ + '/apps/clix' + '/__init__.py', 'w') | ||
| f.write("") | ||
| f.close() | ||
| f = open(clixdev.__path__ + '/projects/migrations' + '/__init__.py', 'w') | ||
| f = open(clixdev.__path__ + '/apps/clix/migrations' + '/__init__.py', 'w') | ||
| f.write("") | ||
@@ -95,15 +99,15 @@ f.close() | ||
| # write urls based on res -> api.clix.dev | ||
| f = open(clixdev.__path__ + '/projects' + '/urls.py', 'w') | ||
| f = open(clixdev.__path__ + '/apps/clix' + '/urls.py', 'w') | ||
| f.write(APP_URLS(res.get('apps')[0])) | ||
| f.close() | ||
| f = open(clixdev.__path__ + '/projects' + '/models.py', 'w') | ||
| f = open(clixdev.__path__ + '/apps/clix' + '/models.py', 'w') | ||
| f.write(MODELS(res.get('apps')[0])) | ||
| f.close() | ||
| f = open(clixdev.__path__ + '/projects' + '/apps.py', 'w') | ||
| f = open(clixdev.__path__ + '/apps/clix' + '/apps.py', 'w') | ||
| f.write("""from django.apps import AppConfig | ||
| class AppConfig(AppConfig): | ||
| name = 'clixdev.projects' | ||
| name = 'clixdev.apps.clix' | ||
| """) | ||
@@ -110,0 +114,0 @@ f.close() |
+10
-11
@@ -25,9 +25,8 @@ def MANAGE(proj_name): | ||
| def URLS(apps): | ||
| routes = [f"from {app['name']} import urls as {app['name']}_urls\n" for app in apps] | ||
| # routes = [f"from {app['name']} import urls as {app['name']}_urls\n" for app in apps] | ||
| # includes = [] | ||
| # for app in apps: | ||
| # includes.append(f"\tpath('{app['base_url']}', include({app['name']}_urls)),\n") | ||
| includes = [] | ||
| for app in apps: | ||
| includes.append(f"\tpath('{app['base_url']}', include({app['name']}_urls)),\n") | ||
| return f"""from clixdev.projects import _urls | ||
| return f"""from clixdev.apps.clix import urls | ||
| from django.contrib import admin | ||
@@ -39,3 +38,3 @@ from django.urls import path, include | ||
| \tpath('admin/', admin.site.urls), | ||
| \tpath('api/', include(_urls)), | ||
| \tpath('api/', include(urls)), | ||
| ] | ||
@@ -82,3 +81,3 @@ """ | ||
| \t'django.contrib.staticfiles', | ||
| \t'clixdev.apps.clix' | ||
| ] | ||
@@ -184,3 +183,3 @@ | ||
| endpoints = app['endpoints'] | ||
| defs = ["import json\nfrom django.http import JsonResponse\nfrom django.views.decorators.csrf import csrf_exempt\n\nfrom clixdev.projects._models import *"] | ||
| defs = ["import json\nfrom django.http import JsonResponse\nfrom django.views.decorators.csrf import csrf_exempt\n\nfrom clixdev.apps.clix.models import *"] | ||
@@ -264,3 +263,3 @@ for endpoint in endpoints: | ||
| _class += f'\tclass Meta:\n\t\tapp_label = "{app_name}"' | ||
| _class += f'\tclass Meta:\n\t\tapp_label = "clix"' | ||
| _class += '\n' | ||
@@ -290,3 +289,3 @@ | ||
| # registers = '\n'.join(['admin.site.register(' + model.get('table_name') + ')' for model in models]) | ||
| return f"""from django.contrib import admin\nfrom clixdev.projects._models import *""" | ||
| return f"""from django.contrib import admin\nfrom clixdev.app.clix.models import *""" | ||
| # removed for beta | ||
@@ -293,0 +292,0 @@ # {registers} |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
26598
0.47%433
0.93%