├── django_visual ├── ide │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── apps.py │ ├── templates │ │ ├── create_project.html │ │ ├── base.html │ │ ├── index.html │ │ └── open_project.html │ ├── urls.py │ ├── create_project.py │ ├── run.py │ ├── views.py │ └── open_project.py ├── conf │ ├── app_template │ │ └── app_name │ │ │ ├── __init__.py-tpl │ │ │ ├── migrations │ │ │ └── __init__.py-tpl │ │ │ ├── models.py-tpl │ │ │ ├── tests.py-tpl │ │ │ ├── views.py-tpl │ │ │ ├── admin.py-tpl │ │ │ └── apps.py-tpl │ ├── project_template_app │ │ └── project_name │ │ │ ├── app │ │ │ ├── __init__.py │ │ │ ├── models.py │ │ │ ├── admin.py │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ ├── apps.py │ │ │ ├── views.py │ │ │ └── templates │ │ │ │ └── index.html │ │ │ ├── project_name │ │ │ ├── __init__.py-tpl │ │ │ ├── wsgi.py-tpl │ │ │ ├── urls.py-tpl │ │ │ └── settings.py-tpl │ │ │ ├── readme.txt │ │ │ └── manage.py-tpl │ ├── project_template_cms │ │ └── project_name │ │ │ ├── cms │ │ │ ├── __init__.py │ │ │ ├── migrations │ │ │ │ ├── __init__.py │ │ │ │ └── 0001_initial.py │ │ │ ├── tests.py │ │ │ ├── apps.py │ │ │ ├── admin.py │ │ │ ├── templates │ │ │ │ ├── item_detail.html │ │ │ │ ├── flatpages │ │ │ │ │ └── default.html │ │ │ │ ├── index.html │ │ │ │ ├── item_list.html │ │ │ │ └── base.html │ │ │ ├── urls.py │ │ │ ├── models.py │ │ │ └── views.py │ │ │ ├── project_name │ │ │ ├── __init__.py │ │ │ ├── wsgi.py │ │ │ ├── urls.py │ │ │ └── settings.py │ │ │ └── manage.py │ ├── project_template_blog │ │ └── project_name │ │ │ ├── blog │ │ │ ├── __init__.py │ │ │ ├── migrations │ │ │ │ ├── __init__.py │ │ │ │ └── 0001_initial.py │ │ │ ├── tests.py │ │ │ ├── apps.py │ │ │ ├── admin.py │ │ │ ├── urls.py │ │ │ ├── models.py │ │ │ ├── views.py │ │ │ └── templates │ │ │ │ ├── index.html │ │ │ │ └── base.html │ │ │ ├── project_name │ │ │ ├── __init__.py-tpl │ │ │ ├── wsgi.py-tpl │ │ │ ├── urls.py-tpl │ │ │ └── settings.py-tpl │ │ │ ├── db.sqlite3 │ │ │ ├── readme.txt │ │ │ └── manage.py-tpl │ ├── __init__.py │ └── project_template_empty │ │ └── project_name │ │ ├── project_name │ │ ├── __init__.py-tpl │ │ ├── wsgi.py-tpl │ │ ├── urls.py-tpl │ │ └── settings.py-tpl │ │ ├── readme.txt │ │ └── manage.py-tpl ├── django_visual │ ├── __init__.py │ ├── wsgi.py │ ├── urls.py │ └── settings.py ├── static │ ├── imgs │ │ ├── vdj.png │ │ ├── i │ │ │ ├── file.png │ │ │ └── folder.png │ │ ├── mvt_pattern.png │ │ └── project_structure.png │ ├── js │ │ ├── editor_code.js │ │ ├── ide.js │ │ ├── ace.theme-monokai.1.4.4.js │ │ ├── editor_sqlite3.js │ │ ├── split.min.js │ │ ├── split.1.3.5.min.js │ │ ├── ace.mode-python.1.4.4.js │ │ └── popper.1.14.7.min.js │ └── css │ │ ├── ide.css │ │ └── jstree.3.2.1.style.min.css └── manage.py ├── runtime.txt ├── _config.yml ├── AUTHORS ├── requirements.txt ├── Procfile ├── visual_django_project.png ├── visual_django_welcome.png ├── visual_django_sql_viewer.png ├── visual_django_create_project.png ├── GNUmakefile ├── acknowledgements.txt ├── README.md ├── .gitignore └── LICENSE /django_visual/ide/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | python-2.7.17 2 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-leap-day -------------------------------------------------------------------------------- /django_visual/ide/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Volodymyr Sergeyev 2 | -------------------------------------------------------------------------------- /django_visual/conf/app_template/app_name/__init__.py-tpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django_visual/django_visual/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = '0.10.0' -------------------------------------------------------------------------------- /django_visual/conf/app_template/app_name/migrations/__init__.py-tpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/app/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==1.11.29 2 | gunicorn 3 | django-heroku 4 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/blog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django_visual/conf/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | New Project templates sits here 3 | """ -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/project_name/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn --pythonpath="$PWD/django_visual" django_visual.wsgi 2 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/project_name/__init__.py-tpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/blog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/project_name/__init__.py-tpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_empty/project_name/project_name/__init__.py-tpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django_visual/ide/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.db import models 4 | -------------------------------------------------------------------------------- /visual_django_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsergeyev/django-visual/HEAD/visual_django_project.png -------------------------------------------------------------------------------- /visual_django_welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsergeyev/django-visual/HEAD/visual_django_welcome.png -------------------------------------------------------------------------------- /visual_django_sql_viewer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsergeyev/django-visual/HEAD/visual_django_sql_viewer.png -------------------------------------------------------------------------------- /visual_django_create_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsergeyev/django-visual/HEAD/visual_django_create_project.png -------------------------------------------------------------------------------- /django_visual/conf/project_template_empty/project_name/readme.txt: -------------------------------------------------------------------------------- 1 | Template for Empty project 2 | ========================= 3 | -------------------------------------------------------------------------------- /django_visual/static/imgs/vdj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsergeyev/django-visual/HEAD/django_visual/static/imgs/vdj.png -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/app/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.db import models 4 | -------------------------------------------------------------------------------- /django_visual/ide/tests.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.test import TestCase 4 | 5 | # Create your tests here. 6 | -------------------------------------------------------------------------------- /django_visual/static/imgs/i/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsergeyev/django-visual/HEAD/django_visual/static/imgs/i/file.png -------------------------------------------------------------------------------- /django_visual/ide/admin.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.contrib import admin 4 | 5 | # Register your models here. 6 | -------------------------------------------------------------------------------- /django_visual/static/imgs/i/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsergeyev/django-visual/HEAD/django_visual/static/imgs/i/folder.png -------------------------------------------------------------------------------- /django_visual/static/imgs/mvt_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsergeyev/django-visual/HEAD/django_visual/static/imgs/mvt_pattern.png -------------------------------------------------------------------------------- /django_visual/conf/app_template/app_name/models.py-tpl: -------------------------------------------------------------------------------- 1 | {{ unicode_literals }}from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /django_visual/conf/app_template/app_name/tests.py-tpl: -------------------------------------------------------------------------------- 1 | {{ unicode_literals }}from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /django_visual/conf/app_template/app_name/views.py-tpl: -------------------------------------------------------------------------------- 1 | {{ unicode_literals }}from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /django_visual/static/imgs/project_structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsergeyev/django-visual/HEAD/django_visual/static/imgs/project_structure.png -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/app/admin.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.contrib import admin 4 | 5 | from .models import * 6 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/app/tests.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.test import TestCase 4 | 5 | # Create your tests here. 6 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/blog/tests.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.test import TestCase 4 | 5 | # Create your tests here. 6 | -------------------------------------------------------------------------------- /django_visual/conf/app_template/app_name/admin.py-tpl: -------------------------------------------------------------------------------- 1 | {{ unicode_literals }}from django.contrib import admin 2 | 3 | from .models import * 4 | 5 | # Register your models here. 6 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsergeyev/django-visual/HEAD/django_visual/conf/project_template_blog/project_name/db.sqlite3 -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/readme.txt: -------------------------------------------------------------------------------- 1 | Template for Blog project 2 | ========================= 3 | 4 | http://127.0.0.1:8000/admin/login/ 5 | 6 | admin / superuser -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/blog/apps.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.apps import AppConfig 4 | 5 | 6 | class BlogConfig(AppConfig): 7 | name = 'blog' 8 | -------------------------------------------------------------------------------- /django_visual/ide/apps.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.apps import AppConfig 5 | 6 | 7 | class IdeConfig(AppConfig): 8 | name = 'ide' 9 | -------------------------------------------------------------------------------- /django_visual/conf/app_template/app_name/apps.py-tpl: -------------------------------------------------------------------------------- 1 | {{ unicode_literals }}from django.apps import AppConfig 2 | 3 | 4 | class {{ camel_case_app_name }}Config(AppConfig): 5 | name = '{{ app_name }}' 6 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/app/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | 3 | from . import views 4 | 5 | urlpatterns = [ 6 | url(r'^$', views.index, name='index'), 7 | ] 8 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/blog/admin.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.contrib import admin 4 | 5 | from .models import * 6 | 7 | admin.site.register(BlogPost) 8 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/blog/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | 3 | from . import views 4 | 5 | urlpatterns = [ 6 | url(r'^$', views.index, name='index'), 7 | ] 8 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/readme.txt: -------------------------------------------------------------------------------- 1 | Template for 1-Page Application project 2 | ======================================= 3 | 4 | http://127.0.0.1:8000/admin/login/ 5 | 6 | admin / superuser -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/tests.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.test import TestCase 5 | 6 | # Create your tests here. 7 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/app/apps.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.apps import AppConfig as BaseAppConfig 4 | 5 | 6 | class AppConfig(BaseAppConfig): 7 | name = 'app' 8 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/apps.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.apps import AppConfig 5 | 6 | 7 | class CmsConfig(AppConfig): 8 | name = 'cms' 9 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/admin.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.contrib import admin 5 | 6 | from .models import * 7 | 8 | admin.site.register(Item) 9 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/templates/item_detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block navbar %} 4 | 5 | {% endblock %} 6 | 7 | {% block content %} 8 |

{{item.title}}

9 | 10 | {{item.description}} 11 | {% endblock %} -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/app/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.shortcuts import render 4 | 5 | 6 | def index(request): 7 | """ 8 | Main page 9 | """ 10 | 11 | context = { 12 | } 13 | return render(request, 'index.html', context) 14 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/templates/flatpages/default.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} 4 | {{flatpage.title}} 5 | {% endblock %} 6 | 7 | {% block content %} 8 |

{{flatpage.title}}

9 | 10 |

11 | {{flatpage.content}} 12 |

13 | {% endblock %} -------------------------------------------------------------------------------- /GNUmakefile: -------------------------------------------------------------------------------- 1 | default: gunicorn 2 | 3 | migrate: 4 | python3 ./django_visual/manage.py makemigrations && python3 ./django_visual/manage.py migrate 5 | 6 | gunicorn: migrate 7 | gunicorn --pythonpath="$(PWD)/django_visual" django_visual.wsgi 8 | 9 | runserver: migrate 10 | python3 ./django_visual/manage.py runserver 11 | 12 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/blog/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.db import models 4 | 5 | 6 | class BlogPost(models.Model): 7 | """ 8 | Entry in blog 9 | """ 10 | title = models.CharField(max_length=200) 11 | pub_date = models.DateTimeField(auto_now_add=True) 12 | text = models.TextField() 13 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | 3 | from . import views 4 | 5 | urlpatterns = [ 6 | url(r'^$', views.index, name='index'), 7 | url(r'^item/(?P[0-9]+)/$', views.item_detail, name='item_detail'), 8 | url('items/', views.item_list, name='item_list'), 9 | ] 10 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/blog/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.shortcuts import render 4 | 5 | from .models import BlogPost 6 | 7 | 8 | def index(request): 9 | """ 10 | Main page 11 | """ 12 | 13 | posts = BlogPost.objects.all() 14 | 15 | context = { 16 | "posts": posts 17 | } 18 | return render(request, 'index.html', context) 19 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models 5 | 6 | 7 | class Item(models.Model): 8 | """ 9 | Content item 10 | """ 11 | title = models.CharField(max_length=200) 12 | pub_date = models.DateTimeField(auto_now_add=True) 13 | description = models.TextField() 14 | 15 | def __str__(self): 16 | return self.title 17 | -------------------------------------------------------------------------------- /acknowledgements.txt: -------------------------------------------------------------------------------- 1 | Thank you for a people how load batteries 2 | ========================== 3 | 4 | Django team - https://www.djangoproject.com 5 | 6 | Bootstrap team - https://getbootstrap.com 7 | 8 | Ace editor - https://ace.c9.io 9 | 10 | Ivan Bozhanov and JSTree team - https://www.jstree.com 11 | 12 | Greece acropolis icon - http://www.iconka.com 13 | 14 | Icons: 15 | * https://ionicons.com 16 | * Stefan Taubert, https://stefantaubert.com -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block navbar %} 4 | 5 | {% endblock %} 6 | 7 | {% block content %} 8 | {% for item in items %} 9 |
10 |
11 |

{{post.title}}

12 |
13 |
14 | {{post.description}} 15 |
16 |
17 |
18 | {% empty %} 19 | No items 20 | {% endfor %} 21 | {% endblock %} -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/templates/item_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block navbar %} 4 | 5 | {% endblock %} 6 | 7 | {% block content %} 8 | {% for item in items %} 9 |
10 |
11 |

{{item.title}}

12 |
13 |
14 | {{item.description}} 15 |
16 |
17 |
18 | {% empty %} 19 | No items 20 | {% endfor %} 21 | {% endblock %} -------------------------------------------------------------------------------- /django_visual/django_visual/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for django_visual project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_visual.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/project_name/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for project_name project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project_name.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/project_name/wsgi.py-tpl: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for {{ project_name }} project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/project_name/wsgi.py-tpl: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for {{ project_name }} project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_empty/project_name/project_name/wsgi.py-tpl: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for {{ project_name }} project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/blog/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | 5 | {% for post in posts %} 6 |
7 |
8 |

{{post.title}}

9 |
10 |
11 | {{post.text}} 12 |
13 |
14 |
15 | {% empty %} 16 |
17 |
18 |

Ups... no posts found

19 |
20 |
21 | Open Admin panel and post something to this blog. Username: admin/superuser 22 |
23 |
24 | {% endfor %} 25 | {% endblock %} -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/blog/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.20 on 2019-06-05 11:10 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='BlogPost', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('title', models.CharField(max_length=200)), 21 | ('pub_date', models.DateTimeField(auto_now_add=True)), 22 | ('text', models.TextField()), 23 | ], 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.20 on 2019-06-18 12:22 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='Item', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('title', models.CharField(max_length=200)), 21 | ('pub_date', models.DateTimeField(auto_now_add=True)), 22 | ('description', models.TextField()), 23 | ], 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.shortcuts import render 5 | 6 | from .models import Item 7 | 8 | 9 | def index(request): 10 | """ 11 | Main page 12 | """ 13 | 14 | items = Item.objects.all() 15 | 16 | context = { 17 | "items": items 18 | } 19 | return render(request, 'index.html', context) 20 | 21 | 22 | def item_detail(request, item_id): 23 | """ 24 | Detail page 25 | """ 26 | item = Item.objects.get(pk=item_id) 27 | context = { 28 | "item": item 29 | } 30 | return render(request, 'item_detail.html', context) 31 | 32 | 33 | def item_list(request): 34 | """ 35 | List of items 36 | """ 37 | items = Item.objects.all() 38 | 39 | context = { 40 | "items": items 41 | } 42 | return render(request, 'item_list.html', context) 43 | -------------------------------------------------------------------------------- /django_visual/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_visual.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError: 10 | # The above import may fail for some other reason. Ensure that the 11 | # issue is really that Django is missing to avoid masking other 12 | # exceptions on Python 2. 13 | try: 14 | import django 15 | except ImportError: 16 | raise ImportError( 17 | "Couldn't import Django. Are you sure it's installed and " 18 | "available on your PYTHONPATH environment variable? Did you " 19 | "forget to activate a virtual environment?" 20 | ) 21 | raise 22 | execute_from_command_line(sys.argv) 23 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project_name.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError: 10 | # The above import may fail for some other reason. Ensure that the 11 | # issue is really that Django is missing to avoid masking other 12 | # exceptions on Python 2. 13 | try: 14 | import django 15 | except ImportError: 16 | raise ImportError( 17 | "Couldn't import Django. Are you sure it's installed and " 18 | "available on your PYTHONPATH environment variable? Did you " 19 | "forget to activate a virtual environment?" 20 | ) 21 | raise 22 | execute_from_command_line(sys.argv) 23 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/manage.py-tpl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError: 10 | # The above import may fail for some other reason. Ensure that the 11 | # issue is really that Django is missing to avoid masking other 12 | # exceptions on Python 2. 13 | try: 14 | import django 15 | except ImportError: 16 | raise ImportError( 17 | "Couldn't import Django. Are you sure it's installed and " 18 | "available on your PYTHONPATH environment variable? Did you " 19 | "forget to activate a virtual environment?" 20 | ) 21 | raise 22 | execute_from_command_line(sys.argv) 23 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_empty/project_name/project_name/urls.py-tpl: -------------------------------------------------------------------------------- 1 | """{{ project_name }} URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/{{ docs_version }}/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.conf.urls import url, include 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls import url, include 17 | from django.contrib import admin 18 | 19 | 20 | urlpatterns = [ 21 | url(r'^admin/', admin.site.urls), 22 | ] 23 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/manage.py-tpl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError: 10 | # The above import may fail for some other reason. Ensure that the 11 | # issue is really that Django is missing to avoid masking other 12 | # exceptions on Python 2. 13 | try: 14 | import django 15 | except ImportError: 16 | raise ImportError( 17 | "Couldn't import Django. Are you sure it's installed and " 18 | "available on your PYTHONPATH environment variable? Did you " 19 | "forget to activate a virtual environment?" 20 | ) 21 | raise 22 | execute_from_command_line(sys.argv) 23 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_empty/project_name/manage.py-tpl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError: 10 | # The above import may fail for some other reason. Ensure that the 11 | # issue is really that Django is missing to avoid masking other 12 | # exceptions on Python 2. 13 | try: 14 | import django 15 | except ImportError: 16 | raise ImportError( 17 | "Couldn't import Django. Are you sure it's installed and " 18 | "available on your PYTHONPATH environment variable? Did you " 19 | "forget to activate a virtual environment?" 20 | ) 21 | raise 22 | execute_from_command_line(sys.argv) 23 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/project_name/urls.py-tpl: -------------------------------------------------------------------------------- 1 | """{{ project_name }} URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/{{ docs_version }}/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.conf.urls import url, include 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls import url, include 17 | from django.contrib import admin 18 | 19 | 20 | urlpatterns = [ 21 | url(r'^admin/', admin.site.urls), 22 | url(r'^', include('app.urls')), 23 | ] 24 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/project_name/urls.py-tpl: -------------------------------------------------------------------------------- 1 | """{{ project_name }} URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/{{ docs_version }}/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.conf.urls import url, include 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls import url, include 17 | from django.contrib import admin 18 | 19 | 20 | urlpatterns = [ 21 | url(r'^admin/', admin.site.urls), 22 | url(r'^', include('blog.urls')), 23 | ] 24 | -------------------------------------------------------------------------------- /django_visual/ide/templates/create_project.html: -------------------------------------------------------------------------------- 1 | {% extends 'index.html' %} 2 | 3 | {% block body_inner_title %}Create new project{% endblock %} 4 | 5 | {% block body_inner %} 6 | {% if error %} 7 | 10 | {% endif %} 11 | 12 |
13 | {% csrf_token %} 14 | 15 |
16 | 17 | 18 |
    19 |
  • Project name: please use only numbers, letters and underscores.
  • 20 |
  • Project will be created in {{projects_home}}
  • 21 |
22 |
23 | 24 | 25 | Cancel 26 |
27 | {% endblock %} -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/project_name/urls.py: -------------------------------------------------------------------------------- 1 | """project_name URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/1.11/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.conf.urls import url, include 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls import url, include 17 | from django.contrib import admin 18 | 19 | urlpatterns = [ 20 | url(r'^admin/', admin.site.urls), 21 | url('pages/', include('django.contrib.flatpages.urls')), 22 | 23 | url(r'^', include('cms.urls')), 24 | ] 25 | -------------------------------------------------------------------------------- /django_visual/static/js/editor_code.js: -------------------------------------------------------------------------------- 1 | // Visual Django IDE - Utils to work with code files 2 | 3 | function load_file(path, el) { 4 | var content = ""; 5 | var tid = el; 6 | 7 | $.get("/ide/open_file/", {"path": path}, function(data) { 8 | //console.log(data); 9 | $("#code-editor-" + el).text(data); 10 | 11 | var PythonMode = ace.require("ace/mode/python").Mode; 12 | var editor = ace.edit("code-editor-" + el); 13 | 14 | editor.setTheme("ace/theme/monokai"); 15 | editor.session.setMode(new PythonMode()); 16 | editor.setFontSize(14); 17 | 18 | editor.getSession().on("change", function () { 19 | $("#active_editor").val(editor.getSession().getValue()); 20 | 21 | var label = $("#tab-" + tid + " span").text(); 22 | 23 | if (!label.endsWith(" * ")) { 24 | $("#tab-" + tid + " span").text(label + " * "); 25 | $("#tab-" + tid + " span").after( 26 | ' ' 27 | ); 28 | } 29 | 30 | }); 31 | }); 32 | } -------------------------------------------------------------------------------- /django_visual/django_visual/urls.py: -------------------------------------------------------------------------------- 1 | """django_visual URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/1.11/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.conf.urls import url, include 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls import url, include 17 | from django.contrib.staticfiles.urls import staticfiles_urlpatterns 18 | 19 | from ide import views 20 | 21 | 22 | urlpatterns = [ 23 | # url(r'^admin/', admin.site.urls), 24 | url(r'^ide/', include('ide.urls')), 25 | url(r'^$', views.index, name='index') 26 | ] 27 | 28 | urlpatterns += staticfiles_urlpatterns() 29 | -------------------------------------------------------------------------------- /django_visual/ide/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | 3 | from . import views 4 | 5 | urlpatterns = [ 6 | url('create_project/', views.create_project, name='create_project'), 7 | 8 | url('open_project/(?P\w+)/run_project/', views.run_project, name='run_project'), 9 | url('open_project/(?P\w+)/stop_project/', views.stop_project, name='stop_project'), 10 | url('open_project/(?P\w+)/create_application/', views.create_application, name='create_application'), 11 | url('open_project/(?P\w+)/remove_application/', views.remove_application, name='remove_application'), 12 | url('open_project/(?P\w+)/add_application/', views.add_application, name='add_application'), 13 | url('open_project/(?P\w+)/add_model/', views.add_model, name='add_model'), 14 | url('open_project/(?P\w+)/', views.open_project, name='open_project'), 15 | 16 | url('open_file/', views.open_file, name='open_file'), 17 | url('save_file/', views.save_file, name='save_file'), 18 | 19 | url('welcome/', views.index, name='index'), 20 | ] 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Visual Django 2 | 3 | Inspired by Borland Delphi. 4 | 5 | Visual tools to work with Django projects (https://www.djangoproject.com) 6 | 7 | ## IDE 8 | 9 | IDE offers capabilities and visual tools for: 10 | 11 | * New Project Templates 12 | * Empty project 13 | * Blog project 14 | * Content Web Site 15 | * 1-Page Application 16 | 17 | * Project Navigator 18 | * Django Project properties (settings) 19 | * Applications editor 20 | * URLs designer 21 | 22 | * Models Designer 23 | * App -> Models View & Edit 24 | * Human UI for Model fields with help 25 | 26 | * View -> Template Visual Editor 27 | * like TForm in Delphi 28 | * Queries editor for view 29 | * Output variables (what View returns) 30 | * Template visual editor (inputs, sections - header, detail, list, footer) 31 | 32 | * Database Viewer 33 | 34 | * Package Visual Django as an executable with PyInstaller 35 | https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Executable-From-Django 36 | 37 | 38 | ## Hints 39 | 40 | * Explore project files in Project Navigator 41 | * Look on project's Applications 42 | * Database by default is SQLITE3 43 | * Run project with green button 44 | 45 | ## Have a question? 46 | 47 | Email me: vova.sergeyev@gmail.com 48 | 49 | Create issue on Github 50 | 51 | ## Thank you! 52 | -------------------------------------------------------------------------------- /django_visual/ide/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | Visual Django IDE 25 | 26 | {% block head %} 27 | {% endblock %} 28 | 29 | 30 | 31 | {% block body %} 32 | 35 | 36 |
37 |
38 |
39 |   40 |
41 |
42 | {% block content %}{% endblock %} 43 |
44 |
45 |   46 |
47 |
48 |
49 | {% endblock %} 50 | 51 | 52 | -------------------------------------------------------------------------------- /django_visual/ide/create_project.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import os 4 | 5 | from django.core.management.templates import TemplateCommand 6 | from django.core.management.utils import get_random_secret_key 7 | from django.conf import settings 8 | 9 | 10 | def copy_project_template(template_name, project_name): 11 | """ 12 | Copies template of new projexct 13 | """ 14 | projects_home = settings.PROJECTS_HOME 15 | 16 | if not os.path.isdir(projects_home): 17 | # let create it first 18 | os.mkdir(projects_home) 19 | 20 | project_tpl = os.path.join( 21 | settings.TEMPLATES_HOME, 22 | 'project_template_{}'.format(template_name) 23 | ) 24 | 25 | options = { 26 | 'verbosity': 0, 27 | 'extensions': ['py'], 28 | 'files': [], 29 | 'secret_key': get_random_secret_key(), 30 | 'template': project_tpl, 31 | } 32 | 33 | cmd = TemplateCommand() 34 | 35 | cmd.validate_name(project_name, "project") 36 | 37 | cmd.handle('project', project_name, projects_home, **options) 38 | 39 | 40 | def copy_application_template(project_home, app_name): 41 | """ 42 | Copies template of new application 43 | """ 44 | 45 | app_tpl = os.path.join( 46 | settings.TEMPLATES_HOME, 47 | 'app_template' 48 | ) 49 | 50 | options = { 51 | 'verbosity': 2, 52 | 'extensions': ['py'], 53 | 'files': [], 54 | 'template': app_tpl, 55 | } 56 | 57 | cmd = TemplateCommand() 58 | 59 | cmd.validate_name(app_name, "app") 60 | 61 | cmd.handle('app', app_name, project_home, **options) 62 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/blog/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 30 | 31 |
32 |
33 |
34 |

Blog posts

35 | {% block content %} 36 | 37 | {% endblock %} 38 |
39 |
40 |
41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | 106 | projects/ 107 | 108 | .DS_Store -------------------------------------------------------------------------------- /django_visual/ide/run.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import subprocess 4 | from multiprocessing import Process 5 | 6 | from django.conf import settings 7 | 8 | 9 | def worker(project_id, project_home): 10 | """ 11 | Runs manage.py dev. server 12 | """ 13 | 14 | manage_py = os.path.join(project_home, "manage.py") 15 | log_file = os.path.join(settings.TOP_DIR, 'project_run.log') 16 | 17 | with open(log_file, 'w') as f: 18 | f.write("Starting development server at http://127.0.0.1:8001/\n") 19 | 20 | try: 21 | command = "{} {} makemigrations --noinput --settings {}.settings && {} {} migrate --noinput --settings {}.settings && {} {} runserver --settings {}.settings 8001".format( 22 | sys.executable, # makemigrations 23 | manage_py, 24 | project_id, 25 | sys.executable, # migrate 26 | manage_py, 27 | project_id, 28 | sys.executable, # runserver 29 | manage_py, 30 | project_id 31 | ) 32 | 33 | proc = subprocess.Popen(command, shell=True, 34 | stdin=subprocess.PIPE, 35 | stdout=subprocess.PIPE, 36 | stderr=subprocess.PIPE 37 | ) 38 | except Exception, e: 39 | with open(log_file, 'a') as f: 40 | f.write(str(e) + "\n") 41 | 42 | while True: 43 | line = proc.stdout.readline() 44 | if not line: 45 | break 46 | 47 | with open(log_file, 'a') as f: 48 | f.write(line + "\n") 49 | 50 | with open(log_file, 'a') as f: 51 | err = proc.stderr.read() 52 | f.write(err + "\n\n") 53 | f.write("Development server stoped") 54 | 55 | 56 | def run_manage(project_id, project_home): 57 | p = Process(target=worker, args=(project_id, project_home)) 58 | p.start() 59 | return p.pid 60 | -------------------------------------------------------------------------------- /django_visual/static/js/ide.js: -------------------------------------------------------------------------------- 1 | // Visual Django IDE - Utils to work with IDE UI 2 | 3 | function project_tree_open_file(label, path) { 4 | var is_open_already = false; 5 | 6 | $("#center_column_tabs a.nav-link").each(function() { 7 | if ( $(this).attr("data-path") == path ) { 8 | is_open_already = true; 9 | $(this).tab("show"); 10 | } 11 | }); 12 | 13 | if (is_open_already) 14 | return; 15 | 16 | var ts = + new Date(); 17 | 18 | $('').appendTo("#center_column_tabs"); 23 | 24 | $('
' 25 | + '
' 26 | + '
').appendTo('#center_column_tabs_content'); 27 | 28 | $('#tab-' + ts).tab('show'); 29 | 30 | if (label.endsWith(".sqlite3")) { 31 | load_db(path, 'code-editor-' + ts); 32 | 33 | } else if (label.endsWith("models.py")) { 34 | // TODO: open model designer? 35 | load_file(path, ts); 36 | 37 | } else { 38 | load_file(path, ts); 39 | }; 40 | } 41 | 42 | function project_tree_save_file(path) { 43 | var content = $("#active_editor").val(); 44 | 45 | $.post("/ide/save_file/", {"path": path, "content": content}, function(data) { 46 | console.log(data); 47 | }); 48 | } 49 | 50 | function create_application(app_name) { 51 | $.post("create_application/", {"app_name": app_name}, function(data) { 52 | console.log(data); 53 | document.location.reload(); 54 | }); 55 | } 56 | 57 | function add_application(app_name) { 58 | $.post("add_application/", {"app_name": app_name}, function(data) { 59 | console.log(data); 60 | }); 61 | } 62 | 63 | function remove_application(app_name) { 64 | $.post("remove_application/", {"app_name": app_name}, function(data) { 65 | console.log(data); 66 | }); 67 | } 68 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/cms/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 43 | 44 |
45 | 46 |
47 |
48 |

CMS

49 |

Something short and leading about the collection below—its contents, the creator, etc. Make it short and sweet, but not too short so folks don't simply skip over it entirely.

50 |
51 |
52 | 53 |
54 |
55 | 56 |
57 | {% block content %} 58 | {% endblock %} 59 |
60 |
61 |
62 | 63 |
64 | 65 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /django_visual/static/js/ace.theme-monokai.1.4.4.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/monokai",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-monokai",t.cssText=".ace-monokai .ace_gutter {background: #2F3129;color: #8F908A}.ace-monokai .ace_print-margin {width: 1px;background: #555651}.ace-monokai {background-color: #272822;color: #F8F8F2}.ace-monokai .ace_cursor {color: #F8F8F0}.ace-monokai .ace_marker-layer .ace_selection {background: #49483E}.ace-monokai.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #272822;}.ace-monokai .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-monokai .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #49483E}.ace-monokai .ace_marker-layer .ace_active-line {background: #202020}.ace-monokai .ace_gutter-active-line {background-color: #272727}.ace-monokai .ace_marker-layer .ace_selected-word {border: 1px solid #49483E}.ace-monokai .ace_invisible {color: #52524d}.ace-monokai .ace_entity.ace_name.ace_tag,.ace-monokai .ace_keyword,.ace-monokai .ace_meta.ace_tag,.ace-monokai .ace_storage {color: #F92672}.ace-monokai .ace_punctuation,.ace-monokai .ace_punctuation.ace_tag {color: #fff}.ace-monokai .ace_constant.ace_character,.ace-monokai .ace_constant.ace_language,.ace-monokai .ace_constant.ace_numeric,.ace-monokai .ace_constant.ace_other {color: #AE81FF}.ace-monokai .ace_invalid {color: #F8F8F0;background-color: #F92672}.ace-monokai .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #AE81FF}.ace-monokai .ace_support.ace_constant,.ace-monokai .ace_support.ace_function {color: #66D9EF}.ace-monokai .ace_fold {background-color: #A6E22E;border-color: #F8F8F2}.ace-monokai .ace_storage.ace_type,.ace-monokai .ace_support.ace_class,.ace-monokai .ace_support.ace_type {font-style: italic;color: #66D9EF}.ace-monokai .ace_entity.ace_name.ace_function,.ace-monokai .ace_entity.ace_other,.ace-monokai .ace_entity.ace_other.ace_attribute-name,.ace-monokai .ace_variable {color: #A6E22E}.ace-monokai .ace_variable.ace_parameter {font-style: italic;color: #FD971F}.ace-monokai .ace_string {color: #E6DB74}.ace-monokai .ace_comment {color: #75715E}.ace-monokai .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() { 2 | window.require(["ace/theme/monokai"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /django_visual/static/js/editor_sqlite3.js: -------------------------------------------------------------------------------- 1 | // Visual Django IDE - Utils to work with SQLITE3 files 2 | 3 | function load_db(path, el) { 4 | var content = []; 5 | 6 | var xhr = new XMLHttpRequest(); 7 | 8 | xhr.open('GET', '/ide/open_file/?path=' + path, true); 9 | xhr.responseType = 'arraybuffer'; 10 | 11 | xhr.onload = function(e) { 12 | var data = new Uint8Array(this.response); 13 | var db = new SQL.Database(new Uint8Array(data)); 14 | var tables = db.prepare("SELECT * FROM sqlite_master WHERE type='table' ORDER BY name"); 15 | 16 | while (tables.step()) { 17 | var rowObj = tables.getAsObject(); 18 | var name = rowObj.name; 19 | 20 | var sel = db.exec("SELECT * FROM '" + name + "'"); 21 | 22 | content.push([name, sel]); 23 | } 24 | 25 | console.log(content); 26 | render_db(content, el); 27 | }; 28 | 29 | xhr.onerror = function(e) { 30 | console.log("** An error occurred during file open"); 31 | $("#" + el).text("** An error occurred during file open"); 32 | }; 33 | 34 | xhr.send(); 35 | } 36 | 37 | function render_db(data, el) { 38 | $('
' 39 | + '
').appendTo("#" + el); 40 | 41 | data.forEach(function (item, index) { 42 | var name = item[0]; //table name 43 | var select_wrapper = item[1]; 44 | var select; // 0 element in select_wrapper, select * from table 45 | var count = 0; 46 | 47 | // console.log(item); 48 | 49 | if (select_wrapper.length) { 50 | select = select_wrapper[0]; 51 | count = select.values.length; 52 | } 53 | 54 | $('' + name + ' (' + count + ' )').appendTo("#" + el + '-tables'); 57 | 58 | var data_table = "
"; 59 | 60 | if (count > 0) { 61 | select.columns.forEach(function (val) { 62 | data_table += ""; 63 | }); 64 | data_table += ""; 65 | 66 | select.values.forEach(function (val) { 67 | data_table += ""; 68 | 69 | val.forEach(function (x) { 70 | data_table += ""; 71 | }); 72 | 73 | data_table += ""; 74 | }); 75 | data_table += "
" + val + "
" + x + "
"; 76 | 77 | } else { 78 | data_table += "No items in selected table"; 79 | } 80 | 81 | $('
' 83 | + data_table + '
').appendTo("#" + el + '-data'); 84 | }); 85 | 86 | $('#' + el + '-tables0').tab('show'); 87 | } 88 | -------------------------------------------------------------------------------- /django_visual/static/css/ide.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | height: 100%; 3 | } 4 | 5 | .full-height { 6 | /*height: calc(100vh - 48px);*/ /* Full height minus navbar */ 7 | height: 100%; 8 | /*overflow: hidden;*/ 9 | } 10 | 11 | .code-editor { 12 | position: absolute; 13 | width: 100%; 14 | height: calc(100vh - 48px - 50px); /* Full height minus navbar and tab */ 15 | } 16 | 17 | .table.table-ellipsis tbody td { 18 | max-width: 150px; 19 | overflow: hidden; 20 | text-overflow: ellipsis; 21 | white-space: nowrap 22 | } 23 | 24 | .split {-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;overflow-y: auto;overflow-x: hidden;} 25 | .gutter {background-color: transparent;background-repeat: no-repeat;background-position: 50%;} 26 | .gutter.gutter-horizontal {cursor: col-resize;background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg=='); } 27 | .gutter.gutter-vertical {cursor: row-resize;background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII='); } 28 | .split.split-horizontal, .gutter.gutter-horizontal { height: 100%;float: left;} 29 | .split.split-vertical, .gutter.gutter-vertical { width: 100%;} 30 | 31 | #navigator_column { 32 | padding-top: 55px; 33 | } 34 | 35 | #center_column { 36 | padding-top: 55px; 37 | } 38 | 39 | #properties_column { 40 | padding-top: 55px; 41 | } 42 | 43 | li.jstree-open > a .jstree-icon {background:url("/static/imgs/i/folder.png") 0px 0px no-repeat !important;} 44 | li.jstree-closed > a .jstree-icon {background:url("/static/imgs/i/folder.png") 0px 0px no-repeat !important;} 45 | li.jstree-leaf > a .jstree-icon {background:url("/static/imgs/i/file.png") 0px 0px no-repeat !important;} 46 | 47 | .glyphicon { 48 | position: relative; 49 | top: 1px; 50 | display: inline-block; 51 | width: 16px; 52 | height: 16px; 53 | } 54 | 55 | .glyphicon:hover { 56 | -webkit-filter: invert(50%); 57 | filter: invert(50%); 58 | } 59 | 60 | .glyphicon-close { 61 | background: url("/static/imgs/i/close.svg"); 62 | background-size: 16px; 63 | } 64 | 65 | .glyphicon-save { 66 | background: url("/static/imgs/i/save.svg"); 67 | background-size: 16px; 68 | } 69 | 70 | .glyphicon-edit { 71 | background: url("/static/imgs/i/edit.svg"); 72 | background-size: 16px; 73 | } 74 | 75 | i.open-file { 76 | cursor: pointer; 77 | } 78 | 79 | .nav-link { 80 | padding: .3rem .5rem; 81 | } 82 | 83 | .bg-blue { 84 | background-color: #374d70 !important; 85 | color: #fff !important; 86 | border-bottom: 0px none !important; 87 | } 88 | 89 | .bg-blue.active { 90 | background-color: #fffd75 !important; 91 | color: #000 !important; 92 | } 93 | 94 | .bg-blue a { 95 | color: #fff !important; 96 | } 97 | 98 | .bg-blue a.active { 99 | color: #fff !important; 100 | } 101 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_empty/project_name/project_name/settings.py-tpl: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for {{ project_name }} project. 3 | 4 | Generated by 'django-admin startproject' using Django {{ django_version }}. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/{{ docs_version }}/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = '{{ secret_key }}' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | ] 41 | 42 | MIDDLEWARE = [ 43 | 'django.middleware.security.SecurityMiddleware', 44 | 'django.contrib.sessions.middleware.SessionMiddleware', 45 | 'django.middleware.common.CommonMiddleware', 46 | 'django.middleware.csrf.CsrfViewMiddleware', 47 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 48 | 'django.contrib.messages.middleware.MessageMiddleware', 49 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 50 | ] 51 | 52 | ROOT_URLCONF = '{{ project_name }}.urls' 53 | 54 | TEMPLATES = [ 55 | { 56 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 57 | 'DIRS': [], 58 | 'APP_DIRS': True, 59 | 'OPTIONS': { 60 | 'context_processors': [ 61 | 'django.template.context_processors.debug', 62 | 'django.template.context_processors.request', 63 | 'django.contrib.auth.context_processors.auth', 64 | 'django.contrib.messages.context_processors.messages', 65 | ], 66 | }, 67 | }, 68 | ] 69 | 70 | WSGI_APPLICATION = '{{ project_name }}.wsgi.application' 71 | 72 | 73 | # Database 74 | # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#databases 75 | 76 | DATABASES = { 77 | 'default': { 78 | 'ENGINE': 'django.db.backends.sqlite3', 79 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 80 | } 81 | } 82 | 83 | 84 | # Password validation 85 | # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#auth-password-validators 86 | 87 | AUTH_PASSWORD_VALIDATORS = [ 88 | { 89 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 90 | }, 91 | { 92 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 93 | }, 94 | { 95 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 96 | }, 97 | { 98 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 99 | }, 100 | ] 101 | 102 | 103 | # Internationalization 104 | # https://docs.djangoproject.com/en/{{ docs_version }}/topics/i18n/ 105 | 106 | LANGUAGE_CODE = 'en-us' 107 | 108 | TIME_ZONE = 'UTC' 109 | 110 | USE_I18N = True 111 | 112 | USE_L10N = True 113 | 114 | USE_TZ = True 115 | 116 | 117 | # Static files (CSS, JavaScript, Images) 118 | # https://docs.djangoproject.com/en/{{ docs_version }}/howto/static-files/ 119 | 120 | STATIC_URL = '/static/' 121 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/project_name/settings.py-tpl: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for {{ project_name }} project. 3 | 4 | Generated by 'django-admin startproject' using Django {{ django_version }}. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/{{ docs_version }}/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = '{{ secret_key }}' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'app', 41 | ] 42 | 43 | MIDDLEWARE = [ 44 | 'django.middleware.security.SecurityMiddleware', 45 | 'django.contrib.sessions.middleware.SessionMiddleware', 46 | 'django.middleware.common.CommonMiddleware', 47 | 'django.middleware.csrf.CsrfViewMiddleware', 48 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 49 | 'django.contrib.messages.middleware.MessageMiddleware', 50 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 51 | ] 52 | 53 | ROOT_URLCONF = '{{ project_name }}.urls' 54 | 55 | TEMPLATES = [ 56 | { 57 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 58 | 'DIRS': [], 59 | 'APP_DIRS': True, 60 | 'OPTIONS': { 61 | 'context_processors': [ 62 | 'django.template.context_processors.debug', 63 | 'django.template.context_processors.request', 64 | 'django.contrib.auth.context_processors.auth', 65 | 'django.contrib.messages.context_processors.messages', 66 | ], 67 | }, 68 | }, 69 | ] 70 | 71 | WSGI_APPLICATION = '{{ project_name }}.wsgi.application' 72 | 73 | 74 | # Database 75 | # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#databases 76 | 77 | DATABASES = { 78 | 'default': { 79 | 'ENGINE': 'django.db.backends.sqlite3', 80 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 81 | } 82 | } 83 | 84 | 85 | # Password validation 86 | # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#auth-password-validators 87 | 88 | AUTH_PASSWORD_VALIDATORS = [ 89 | { 90 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 91 | }, 92 | { 93 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 94 | }, 95 | { 96 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 97 | }, 98 | { 99 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 100 | }, 101 | ] 102 | 103 | 104 | # Internationalization 105 | # https://docs.djangoproject.com/en/{{ docs_version }}/topics/i18n/ 106 | 107 | LANGUAGE_CODE = 'en-us' 108 | 109 | TIME_ZONE = 'UTC' 110 | 111 | USE_I18N = True 112 | 113 | USE_L10N = True 114 | 115 | USE_TZ = True 116 | 117 | 118 | # Static files (CSS, JavaScript, Images) 119 | # https://docs.djangoproject.com/en/{{ docs_version }}/howto/static-files/ 120 | 121 | STATIC_URL = '/static/' 122 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_blog/project_name/project_name/settings.py-tpl: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for {{ project_name }} project. 3 | 4 | Generated by 'django-admin startproject' using Django {{ django_version }}. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/{{ docs_version }}/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = '{{ secret_key }}' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'blog', 41 | ] 42 | 43 | MIDDLEWARE = [ 44 | 'django.middleware.security.SecurityMiddleware', 45 | 'django.contrib.sessions.middleware.SessionMiddleware', 46 | 'django.middleware.common.CommonMiddleware', 47 | 'django.middleware.csrf.CsrfViewMiddleware', 48 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 49 | 'django.contrib.messages.middleware.MessageMiddleware', 50 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 51 | ] 52 | 53 | ROOT_URLCONF = '{{ project_name }}.urls' 54 | 55 | TEMPLATES = [ 56 | { 57 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 58 | 'DIRS': [], 59 | 'APP_DIRS': True, 60 | 'OPTIONS': { 61 | 'context_processors': [ 62 | 'django.template.context_processors.debug', 63 | 'django.template.context_processors.request', 64 | 'django.contrib.auth.context_processors.auth', 65 | 'django.contrib.messages.context_processors.messages', 66 | ], 67 | }, 68 | }, 69 | ] 70 | 71 | WSGI_APPLICATION = '{{ project_name }}.wsgi.application' 72 | 73 | 74 | # Database 75 | # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#databases 76 | 77 | DATABASES = { 78 | 'default': { 79 | 'ENGINE': 'django.db.backends.sqlite3', 80 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 81 | } 82 | } 83 | 84 | 85 | # Password validation 86 | # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#auth-password-validators 87 | 88 | AUTH_PASSWORD_VALIDATORS = [ 89 | { 90 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 91 | }, 92 | { 93 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 94 | }, 95 | { 96 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 97 | }, 98 | { 99 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 100 | }, 101 | ] 102 | 103 | 104 | # Internationalization 105 | # https://docs.djangoproject.com/en/{{ docs_version }}/topics/i18n/ 106 | 107 | LANGUAGE_CODE = 'en-us' 108 | 109 | TIME_ZONE = 'UTC' 110 | 111 | USE_I18N = True 112 | 113 | USE_L10N = True 114 | 115 | USE_TZ = True 116 | 117 | 118 | # Static files (CSS, JavaScript, Images) 119 | # https://docs.djangoproject.com/en/{{ docs_version }}/howto/static-files/ 120 | 121 | STATIC_URL = '/static/' 122 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_cms/project_name/project_name/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for project_name project. 3 | 4 | Generated by 'django-admin startproject' using Django 1.11.20. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/1.11/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = 'lu8=^qm8ix(p4+3mlp8=sdwe6yt899c5f23pd$&ma+z)&b22(=' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'django.contrib.sites', 41 | 'django.contrib.flatpages', 42 | 'cms', 43 | ] 44 | 45 | MIDDLEWARE = [ 46 | 'django.middleware.security.SecurityMiddleware', 47 | 'django.contrib.sessions.middleware.SessionMiddleware', 48 | 'django.middleware.common.CommonMiddleware', 49 | 'django.middleware.csrf.CsrfViewMiddleware', 50 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 51 | 'django.contrib.messages.middleware.MessageMiddleware', 52 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 53 | 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', 54 | ] 55 | 56 | ROOT_URLCONF = 'project_name.urls' 57 | 58 | TEMPLATES = [ 59 | { 60 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 61 | 'DIRS': [], 62 | 'APP_DIRS': True, 63 | 'OPTIONS': { 64 | 'context_processors': [ 65 | 'django.template.context_processors.debug', 66 | 'django.template.context_processors.request', 67 | 'django.contrib.auth.context_processors.auth', 68 | 'django.contrib.messages.context_processors.messages', 69 | ], 70 | }, 71 | }, 72 | ] 73 | 74 | WSGI_APPLICATION = 'project_name.wsgi.application' 75 | 76 | 77 | # Database 78 | # https://docs.djangoproject.com/en/1.11/ref/settings/#databases 79 | 80 | DATABASES = { 81 | 'default': { 82 | 'ENGINE': 'django.db.backends.sqlite3', 83 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 84 | } 85 | } 86 | 87 | 88 | # Password validation 89 | # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators 90 | 91 | AUTH_PASSWORD_VALIDATORS = [ 92 | { 93 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 94 | }, 95 | { 96 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 97 | }, 98 | { 99 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 100 | }, 101 | { 102 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 103 | }, 104 | ] 105 | 106 | 107 | # Internationalization 108 | # https://docs.djangoproject.com/en/1.11/topics/i18n/ 109 | 110 | LANGUAGE_CODE = 'en-us' 111 | 112 | TIME_ZONE = 'UTC' 113 | 114 | USE_I18N = True 115 | 116 | USE_L10N = True 117 | 118 | USE_TZ = True 119 | 120 | 121 | # Static files (CSS, JavaScript, Images) 122 | # https://docs.djangoproject.com/en/1.11/howto/static-files/ 123 | 124 | STATIC_URL = '/static/' 125 | -------------------------------------------------------------------------------- /django_visual/django_visual/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for django_visual project. 3 | 4 | Generated by 'django-admin startproject' using Django 1.11.20. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/1.11/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # import django_heroku 16 | 17 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 18 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 19 | TOP_DIR = os.path.abspath(os.path.join(BASE_DIR, os.pardir)) 20 | 21 | # Quick-start development settings - unsuitable for production 22 | # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ 23 | 24 | # SECURITY WARNING: keep the secret key used in production secret! 25 | SECRET_KEY = 't@-^$$tlw0gav=lp38^l_8g-(xo88&td-(f4*_uc=_6c#pcsa=' 26 | 27 | # SECURITY WARNING: don't run with debug turned on in production! 28 | DEBUG = True 29 | 30 | ALLOWED_HOSTS = [] 31 | 32 | # Application definition 33 | 34 | INSTALLED_APPS = [ 35 | 'django.contrib.staticfiles', 36 | 'ide', 37 | ] 38 | 39 | MIDDLEWARE = [ 40 | ] 41 | 42 | ROOT_URLCONF = 'django_visual.urls' 43 | 44 | TEMPLATES = [ 45 | { 46 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 47 | 'DIRS': [], 48 | 'APP_DIRS': True, 49 | 'OPTIONS': { 50 | 'context_processors': [ 51 | 'django.template.context_processors.debug', 52 | 'django.template.context_processors.request', 53 | ], 54 | }, 55 | }, 56 | ] 57 | 58 | TEMPLATE_CONTEXT_PROCESSORS = ( 59 | 'django.template.context_processors.debug', 60 | 'django.template.context_processors.request', 61 | ) 62 | 63 | TEMPLATE_LOADERS = ( 64 | 'django.template.loaders.filesystem.Loader', 65 | 'django.template.loaders.app_directories.Loader', 66 | ) 67 | 68 | WSGI_APPLICATION = 'django_visual.wsgi.application' 69 | 70 | 71 | DATABASES = { 72 | 'default': { 73 | 'ENGINE': 'django.db.backends.sqlite3', 74 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 75 | } 76 | } 77 | 78 | 79 | AUTH_PASSWORD_VALIDATORS = [ 80 | ] 81 | 82 | 83 | # Internationalization 84 | # https://docs.djangoproject.com/en/1.11/topics/i18n/ 85 | 86 | LANGUAGE_CODE = 'en-us' 87 | 88 | TIME_ZONE = 'UTC' 89 | 90 | USE_I18N = True 91 | 92 | USE_L10N = True 93 | 94 | USE_TZ = True 95 | 96 | 97 | # Static files (CSS, JavaScript, Images) 98 | # https://docs.djangoproject.com/en/1.11/howto/static-files/ 99 | 100 | STATIC_URL = '/static/' 101 | 102 | # STATIC_ROOT = os.path.join(BASE_DIR, "static") 103 | 104 | STATICFILES_DIRS = [ 105 | os.path.join(BASE_DIR, "static"), 106 | ] 107 | 108 | PROJECTS_HOME = os.path.join(TOP_DIR, 'projects') 109 | TEMPLATES_HOME = os.path.join(BASE_DIR, 'conf') 110 | 111 | PROJECTS_TEMPLATES = [ 112 | ("empty", "Empty Project", "New Django project with default configuration.
Same as running 'django-admin startproject' from terminal."), 113 | ("blog", "Blog", "Blog project starts with main page and blog posts list on it.
Admin panel included to edit blog entries."), 114 | ("cms", "Web Site", "Starting point for content site. Includes main page,
items list and item detail page. Preconfigured with
'Contact Us' and 'About' pages as well as admin panel."), 115 | ("app", "1-Page Application", "One page web application project.
Preconfigured index page template based on Bootstrap 4.") 116 | ] 117 | 118 | PROJECT_NAMES = ['shiny', 'crazy', 'frog', 'squirrel', 'nut', 'bold', 119 | 'hamster', 'blog', 'site', 'red', 'dead', 'last', 'first', 'super', 'cool', 120 | 'brilliant', 'py', 'web', 'app', 'hello' 121 | ] 122 | 123 | # STATIC_URL = '/static/' 124 | 125 | # STATIC_ROOT = os.path.join(BASE_DIR, "static") 126 | 127 | # django_heroku.settings(locals()) 128 | -------------------------------------------------------------------------------- /django_visual/static/js/split.min.js: -------------------------------------------------------------------------------- 1 | /*! Split.js - v1.3.5 */ 2 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Split=t()}(this,function(){"use strict";var e=window,t=e.document,n="addEventListener",i="removeEventListener",r="getBoundingClientRect",s=function(){return!1},o=e.attachEvent&&!e[n],a=["","-webkit-","-moz-","-o-"].filter(function(e){var n=t.createElement("div");return n.style.cssText="width:"+e+"calc(9px)",!!n.style.length}).shift()+"calc",l=function(e){return"string"==typeof e||e instanceof String?t.querySelector(e):e};return function(u,c){function z(e,t,n){var i=A(y,t,n);Object.keys(i).forEach(function(t){return e.style[t]=i[t]})}function h(e,t){var n=B(y,t);Object.keys(n).forEach(function(t){return e.style[t]=n[t]})}function f(e){var t=E[this.a],n=E[this.b],i=t.size+n.size;t.size=e/this.size*i,n.size=i-e/this.size*i,z(t.element,t.size,this.aGutterSize),z(n.element,n.size,this.bGutterSize)}function m(e){var t;this.dragging&&((t="touches"in e?e.touches[0][b]-this.start:e[b]-this.start)<=E[this.a].minSize+M+this.aGutterSize?t=E[this.a].minSize+this.aGutterSize:t>=this.size-(E[this.b].minSize+M+this.bGutterSize)&&(t=this.size-(E[this.b].minSize+this.bGutterSize)),f.call(this,t),c.onDrag&&c.onDrag())}function g(){var e=E[this.a].element,t=E[this.b].element;this.size=e[r]()[y]+t[r]()[y]+this.aGutterSize+this.bGutterSize,this.start=e[r]()[G]}function d(){var t=this,n=E[t.a].element,r=E[t.b].element;t.dragging&&c.onDragEnd&&c.onDragEnd(),t.dragging=!1,e[i]("mouseup",t.stop),e[i]("touchend",t.stop),e[i]("touchcancel",t.stop),t.parent[i]("mousemove",t.move),t.parent[i]("touchmove",t.move),delete t.stop,delete t.move,n[i]("selectstart",s),n[i]("dragstart",s),r[i]("selectstart",s),r[i]("dragstart",s),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",t.gutter.style.cursor="",t.parent.style.cursor=""}function S(t){var i=this,r=E[i.a].element,o=E[i.b].element;!i.dragging&&c.onDragStart&&c.onDragStart(),t.preventDefault(),i.dragging=!0,i.move=m.bind(i),i.stop=d.bind(i),e[n]("mouseup",i.stop),e[n]("touchend",i.stop),e[n]("touchcancel",i.stop),i.parent[n]("mousemove",i.move),i.parent[n]("touchmove",i.move),r[n]("selectstart",s),r[n]("dragstart",s),o[n]("selectstart",s),o[n]("dragstart",s),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",i.gutter.style.cursor=j,i.parent.style.cursor=j,g.call(i)}function v(e){e.forEach(function(t,n){if(n>0){var i=F[n-1],r=E[i.a],s=E[i.b];r.size=e[n-1],s.size=t,z(r.element,r.size,i.aGutterSize),z(s.element,s.size,i.bGutterSize)}})}function p(){F.forEach(function(e){e.parent.removeChild(e.gutter),E[e.a].element.style[y]="",E[e.b].element.style[y]=""})}void 0===c&&(c={});var y,b,G,E,w=l(u[0]).parentNode,D=e.getComputedStyle(w).flexDirection,U=c.sizes||u.map(function(){return 100/u.length}),k=void 0!==c.minSize?c.minSize:100,x=Array.isArray(k)?k:u.map(function(){return k}),L=void 0!==c.gutterSize?c.gutterSize:10,M=void 0!==c.snapOffset?c.snapOffset:30,O=c.direction||"horizontal",j=c.cursor||("horizontal"===O?"ew-resize":"ns-resize"),C=c.gutter||function(e,n){var i=t.createElement("div");return i.className="gutter gutter-"+n,i},A=c.elementStyle||function(e,t,n){var i={};return"string"==typeof t||t instanceof String?i[e]=t:i[e]=o?t+"%":a+"("+t+"% - "+n+"px)",i},B=c.gutterStyle||function(e,t){return n={},n[e]=t+"px",n;var n};"horizontal"===O?(y="width","clientWidth",b="clientX",G="left","paddingLeft"):"vertical"===O&&(y="height","clientHeight",b="clientY",G="top","paddingTop");var F=[];return E=u.map(function(e,t){var i,s={element:l(e),size:U[t],minSize:x[t]};if(t>0&&(i={a:t-1,b:t,dragging:!1,isFirst:1===t,isLast:t===u.length-1,direction:O,parent:w},i.aGutterSize=L,i.bGutterSize=L,i.isFirst&&(i.aGutterSize=L/2),i.isLast&&(i.bGutterSize=L/2),"row-reverse"===D||"column-reverse"===D)){var a=i.a;i.a=i.b,i.b=a}if(!o&&t>0){var c=C(t,O);h(c,L),c[n]("mousedown",S.bind(i)),c[n]("touchstart",S.bind(i)),w.insertBefore(c,s.element),i.gutter=c}0===t||t===u.length-1?z(s.element,s.size,L/2):z(s.element,s.size,L);var f=s.element[r]()[y];return f0&&F.push(i),s}),o?{setSizes:v,destroy:p}:{setSizes:v,getSizes:function(){return E.map(function(e){return e.size})},collapse:function(e){if(e===F.length){var t=F[e-1];g.call(t),o||f.call(t,t.size-t.bGutterSize)}else{var n=F[e];g.call(n),o||f.call(n,n.aGutterSize)}},destroy:p}}}); 3 | -------------------------------------------------------------------------------- /django_visual/static/js/split.1.3.5.min.js: -------------------------------------------------------------------------------- 1 | /*! Split.js - v1.3.5 */ 2 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Split=t()}(this,function(){"use strict";var e=window,t=e.document,n="addEventListener",i="removeEventListener",r="getBoundingClientRect",s=function(){return!1},o=e.attachEvent&&!e[n],a=["","-webkit-","-moz-","-o-"].filter(function(e){var n=t.createElement("div");return n.style.cssText="width:"+e+"calc(9px)",!!n.style.length}).shift()+"calc",l=function(e){return"string"==typeof e||e instanceof String?t.querySelector(e):e};return function(u,c){function z(e,t,n){var i=A(y,t,n);Object.keys(i).forEach(function(t){return e.style[t]=i[t]})}function h(e,t){var n=B(y,t);Object.keys(n).forEach(function(t){return e.style[t]=n[t]})}function f(e){var t=E[this.a],n=E[this.b],i=t.size+n.size;t.size=e/this.size*i,n.size=i-e/this.size*i,z(t.element,t.size,this.aGutterSize),z(n.element,n.size,this.bGutterSize)}function m(e){var t;this.dragging&&((t="touches"in e?e.touches[0][b]-this.start:e[b]-this.start)<=E[this.a].minSize+M+this.aGutterSize?t=E[this.a].minSize+this.aGutterSize:t>=this.size-(E[this.b].minSize+M+this.bGutterSize)&&(t=this.size-(E[this.b].minSize+this.bGutterSize)),f.call(this,t),c.onDrag&&c.onDrag())}function g(){var e=E[this.a].element,t=E[this.b].element;this.size=e[r]()[y]+t[r]()[y]+this.aGutterSize+this.bGutterSize,this.start=e[r]()[G]}function d(){var t=this,n=E[t.a].element,r=E[t.b].element;t.dragging&&c.onDragEnd&&c.onDragEnd(),t.dragging=!1,e[i]("mouseup",t.stop),e[i]("touchend",t.stop),e[i]("touchcancel",t.stop),t.parent[i]("mousemove",t.move),t.parent[i]("touchmove",t.move),delete t.stop,delete t.move,n[i]("selectstart",s),n[i]("dragstart",s),r[i]("selectstart",s),r[i]("dragstart",s),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",t.gutter.style.cursor="",t.parent.style.cursor=""}function S(t){var i=this,r=E[i.a].element,o=E[i.b].element;!i.dragging&&c.onDragStart&&c.onDragStart(),t.preventDefault(),i.dragging=!0,i.move=m.bind(i),i.stop=d.bind(i),e[n]("mouseup",i.stop),e[n]("touchend",i.stop),e[n]("touchcancel",i.stop),i.parent[n]("mousemove",i.move),i.parent[n]("touchmove",i.move),r[n]("selectstart",s),r[n]("dragstart",s),o[n]("selectstart",s),o[n]("dragstart",s),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",i.gutter.style.cursor=j,i.parent.style.cursor=j,g.call(i)}function v(e){e.forEach(function(t,n){if(n>0){var i=F[n-1],r=E[i.a],s=E[i.b];r.size=e[n-1],s.size=t,z(r.element,r.size,i.aGutterSize),z(s.element,s.size,i.bGutterSize)}})}function p(){F.forEach(function(e){e.parent.removeChild(e.gutter),E[e.a].element.style[y]="",E[e.b].element.style[y]=""})}void 0===c&&(c={});var y,b,G,E,w=l(u[0]).parentNode,D=e.getComputedStyle(w).flexDirection,U=c.sizes||u.map(function(){return 100/u.length}),k=void 0!==c.minSize?c.minSize:100,x=Array.isArray(k)?k:u.map(function(){return k}),L=void 0!==c.gutterSize?c.gutterSize:10,M=void 0!==c.snapOffset?c.snapOffset:30,O=c.direction||"horizontal",j=c.cursor||("horizontal"===O?"ew-resize":"ns-resize"),C=c.gutter||function(e,n){var i=t.createElement("div");return i.className="gutter gutter-"+n,i},A=c.elementStyle||function(e,t,n){var i={};return"string"==typeof t||t instanceof String?i[e]=t:i[e]=o?t+"%":a+"("+t+"% - "+n+"px)",i},B=c.gutterStyle||function(e,t){return n={},n[e]=t+"px",n;var n};"horizontal"===O?(y="width","clientWidth",b="clientX",G="left","paddingLeft"):"vertical"===O&&(y="height","clientHeight",b="clientY",G="top","paddingTop");var F=[];return E=u.map(function(e,t){var i,s={element:l(e),size:U[t],minSize:x[t]};if(t>0&&(i={a:t-1,b:t,dragging:!1,isFirst:1===t,isLast:t===u.length-1,direction:O,parent:w},i.aGutterSize=L,i.bGutterSize=L,i.isFirst&&(i.aGutterSize=L/2),i.isLast&&(i.bGutterSize=L/2),"row-reverse"===D||"column-reverse"===D)){var a=i.a;i.a=i.b,i.b=a}if(!o&&t>0){var c=C(t,O);h(c,L),c[n]("mousedown",S.bind(i)),c[n]("touchstart",S.bind(i)),w.insertBefore(c,s.element),i.gutter=c}0===t||t===u.length-1?z(s.element,s.size,L/2):z(s.element,s.size,L);var f=s.element[r]()[y];return f0&&F.push(i),s}),o?{setSizes:v,destroy:p}:{setSizes:v,getSizes:function(){return E.map(function(e){return e.size})},collapse:function(e){if(e===F.length){var t=F[e-1];g.call(t),o||f.call(t,t.size-t.bGutterSize)}else{var n=F[e];g.call(n),o||f.call(n,n.aGutterSize)}},destroy:p}}}); 3 | -------------------------------------------------------------------------------- /django_visual/conf/project_template_app/project_name/app/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 78 | 79 | 80 | 81 | 90 | 91 |
92 |
93 | 114 | 115 |
116 |
117 |

Dashboard

118 | 119 |
120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 |
#HeaderHeaderHeaderHeader
1,001Loremipsumdolorsit
1,002ametconsecteturadipiscingelit
1,003IntegernecodioPraesent
154 |
155 |
156 |
157 |
158 |
159 | 160 | 161 | -------------------------------------------------------------------------------- /django_visual/ide/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import os 4 | from os.path import join, isdir 5 | import random 6 | import sys 7 | import subprocess 8 | from sys import stdout, stdin, stderr 9 | 10 | from django.shortcuts import render, redirect 11 | from django.http import HttpResponse 12 | from django.core.management.base import CommandError 13 | from django.conf import settings, Settings 14 | 15 | from create_project import ( 16 | copy_project_template, 17 | copy_application_template 18 | ) 19 | 20 | from open_project import ( 21 | project_context, 22 | project_settings, 23 | edit_installed_apps, 24 | application_add_model, 25 | application_edit_model 26 | ) 27 | 28 | from run import run_manage 29 | 30 | 31 | def index(request): 32 | """ 33 | IDE welcome 34 | Open or Create Project 35 | """ 36 | 37 | projects_home = settings.PROJECTS_HOME 38 | projects = [] 39 | try: 40 | nodes = os.listdir(projects_home) 41 | except OSError as e: 42 | # Projects dir may not exist, let create it 43 | os.mkdir(projects_home) 44 | nodes = [] 45 | 46 | for node in nodes: 47 | if isdir(join(projects_home, node)): 48 | projects.append(node) 49 | 50 | context = { 51 | "projects": projects, 52 | "templates": settings.PROJECTS_TEMPLATES 53 | } 54 | return render(request, 'index.html', context) 55 | 56 | 57 | def create_project(request): 58 | """ 59 | Create new Django project 60 | """ 61 | 62 | names = settings.PROJECT_NAMES 63 | projects_home = settings.PROJECTS_HOME 64 | 65 | context = { 66 | "template": request.GET.get("template", "blog"), 67 | "title": random.choice(names) + "_" + random.choice(names), 68 | "projects_home": projects_home, 69 | 'error': '' 70 | } 71 | 72 | if request.method == "POST": 73 | template = request.POST.get("template") 74 | title = request.POST.get("title") 75 | 76 | try: 77 | copy_project_template(template, title) 78 | except CommandError, e: 79 | context['title'] = title 80 | context['error'] = str(e) 81 | return render(request, 'create_project.html', context) 82 | 83 | return redirect('open_project', project_id=title) 84 | 85 | return render(request, 'create_project.html', context) 86 | 87 | 88 | def open_project(request, project_id): 89 | """ 90 | Load project structure into IDE. 91 | """ 92 | project_home = join(settings.PROJECTS_HOME, project_id) 93 | 94 | context = project_context(project_id, project_home) 95 | 96 | context["project_id"] = project_id 97 | 98 | return render(request, 'open_project.html', context) 99 | 100 | 101 | def create_application(request, project_id): 102 | """ 103 | Creates new application for given project 104 | """ 105 | project_home = join(settings.PROJECTS_HOME, project_id) 106 | 107 | if request.method == "POST": 108 | app_name = request.POST.get("app_name") 109 | copy_application_template(project_home, app_name) 110 | 111 | pr_settings = project_settings(project_id, project_home) 112 | apps = pr_settings.INSTALLED_APPS 113 | apps.append(app_name) 114 | 115 | edit_installed_apps(project_id, project_home, apps) 116 | 117 | return HttpResponse("OK") 118 | else: 119 | return HttpResponse("POST 'app_name' of new application to create") 120 | 121 | 122 | def add_application(request, project_id): 123 | """ 124 | Add existing application to INSTALLED_APPS 125 | """ 126 | project_home = join(settings.PROJECTS_HOME, project_id) 127 | 128 | if request.method == "POST": 129 | app_name = request.POST.get("app_name") 130 | pr_settings = project_settings(project_id, project_home) 131 | apps = pr_settings.INSTALLED_APPS 132 | apps.append(app_name) 133 | 134 | edit_installed_apps(project_id, project_home, apps) 135 | 136 | return HttpResponse("OK") 137 | else: 138 | return HttpResponse("POST 'app_name' of new application to add") 139 | 140 | 141 | def remove_application(request, project_id): 142 | """ 143 | Remove existing application from INSTALLED_APPS 144 | """ 145 | project_home = join(settings.PROJECTS_HOME, project_id) 146 | 147 | if request.method == "POST": 148 | app_name = request.POST.get("app_name") 149 | pr_settings = project_settings(project_id, project_home) 150 | apps = pr_settings.INSTALLED_APPS 151 | apps.remove(app_name) 152 | 153 | edit_installed_apps(project_id, project_home, apps) 154 | 155 | return HttpResponse("OK") 156 | else: 157 | return HttpResponse("POST 'app_name' of new application to remove") 158 | 159 | 160 | def add_model(request, project_id): 161 | """ 162 | Creates new model in application specified in POST data 163 | """ 164 | project_home = join(settings.PROJECTS_HOME, project_id) 165 | 166 | if request.method == "POST": 167 | application_add_model(project_id, project_home, request.POST) 168 | 169 | return redirect("open_project", project_id=project_id) 170 | 171 | def open_file(request): 172 | """ 173 | Retrieves file content into IDE to edit. 174 | """ 175 | 176 | path = request.GET.get("path", "") 177 | 178 | if not path: 179 | return HttpResponse("") 180 | 181 | with open(path, 'r') as f: 182 | content = f.read() 183 | 184 | return HttpResponse(content, content_type='application/octet-stream') 185 | 186 | 187 | def save_file(request): 188 | """ 189 | Saves file in IDE editor. 190 | """ 191 | 192 | if request.method == "POST": 193 | path = request.POST.get("path", "") 194 | content = request.POST.get("content", "") 195 | 196 | with open(path, 'w') as f: 197 | f.write(content) 198 | 199 | return HttpResponse("File saved") 200 | 201 | return HttpResponse("POST 'path' and 'content' of file to save") 202 | 203 | 204 | def run_project(request, project_id): 205 | """ 206 | Run given project manage.py runserver 8001 207 | """ 208 | project_home = join(settings.PROJECTS_HOME, project_id) 209 | # TODO: makemigrations && migrate 210 | if request.method == "POST": 211 | pid = run_manage(project_id, project_home) 212 | return HttpResponse(pid) 213 | 214 | pid = request.GET.get("pid", "") 215 | if pid: 216 | fh = open(join(settings.TOP_DIR, 'project_run.log'), 'r') 217 | data = fh.read() 218 | return HttpResponse(data) 219 | 220 | 221 | def stop_project(request, project_id): 222 | """ 223 | Kills running python with manage.py inside for project 224 | """ 225 | 226 | if request.method == "POST": 227 | pid = request.POST.get("pid", "") 228 | if pid: 229 | try: 230 | os.kill(int(pid), 9) 231 | return HttpResponse("OK") 232 | except OSError, e: 233 | return HttpResponse(str(e)) 234 | 235 | return HttpResponse("") 236 | -------------------------------------------------------------------------------- /django_visual/ide/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block head %} 4 | 5 | {% endblock %} 6 | 7 | {% block body %} 8 |
9 | 25 | 26 | 47 | 48 |
49 | 50 | 55 |
56 |
57 |
58 | 59 | {% block body_inner %} 60 | 66 | 67 |
68 |
69 | {% for item in projects %} 70 |
71 |
72 | VDj 73 |
74 |
75 | Open "{{item}}" 76 |
77 |
78 | {% empty %} 79 |

No projects

80 | {% endfor %} 81 |
82 | 83 |
84 | 85 | {% for item in templates %} 86 |
87 |
88 | VDj 89 |
90 |
91 |

{{item.1}}

92 |

{{item.2|safe}}

93 | Create 94 |
95 |
96 | {% empty %} 97 |

No templates

98 | {% endfor %} 99 | 100 |
101 |
102 | {% endblock %} 103 | 104 |
105 |
106 |
107 |
108 | 109 |
110 | 115 |
116 |

117 | Django is a Python-based free and open-source web framework, which follows the model-template-view (MTV) architectural pattern. 118 |

119 | 120 |

121 | MVT Pattern 122 |

123 |

124 | A model is the single, definitive source of information about your data. It contains the essential fields and behaviors of the data you’re storing. Generally, each model maps to a single database table. 125 |

126 |

127 | A view is simply a Python function that takes a Web request and returns a Web response. This response can be the HTML contents of a Web page, or a redirect, or a 404 error, or an image. 128 |

129 |

130 | Read more... 131 |

132 |
133 | 134 |
135 |
136 | 137 | 156 | {% endblock %} 157 | -------------------------------------------------------------------------------- /django_visual/ide/open_project.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import os 4 | import glob 5 | import sys 6 | import inspect 7 | import imp 8 | from importlib import import_module 9 | import collections 10 | 11 | # from django.conf import settings 12 | from django.apps.registry import Apps 13 | 14 | from django.apps import apps 15 | 16 | EXCLUDED_EXTENSIONS = ('.pyc', '.pyo', '.pyd', '.py.class', '.DS_Store') 17 | 18 | 19 | def project_context(project_id, project_home): 20 | """ 21 | Parses Django project 22 | """ 23 | 24 | pr_settings = project_settings(project_id, project_home) 25 | 26 | old_path = sys.path 27 | old_app_configs = apps.app_configs 28 | 29 | sys.path.append(project_home) 30 | 31 | apps.ready = False 32 | apps.app_configs = {} 33 | has_apps_error = "" 34 | try: 35 | apps.populate(installed_apps=pr_settings.INSTALLED_APPS) 36 | except ImportError as e: 37 | has_apps_error = str(e) 38 | 39 | all_models = apps.all_models 40 | 41 | project_apps = collections.OrderedDict() 42 | 43 | for app in pr_settings.INSTALLED_APPS: 44 | project_apps[app] = [] 45 | 46 | for app, models in all_models.iteritems(): 47 | for model_label, model in models.iteritems(): 48 | fields = [] 49 | for field in model._meta.get_fields(include_parents=False): 50 | fields.append({"name": field.name, "class": field.get_internal_type()}) 51 | 52 | if app in project_apps: 53 | model_path = inspect.getsourcefile(model) 54 | model_rel_path = model_path.replace(project_home, "") 55 | 56 | project_apps[app].append({ 57 | "name": model.__name__, 58 | "path": model_path, 59 | "rel_path": model_rel_path, 60 | "fields": fields, 61 | }) 62 | 63 | # print all_models 64 | # print project_apps 65 | 66 | # import pdb; pdb.set_trace() 67 | 68 | # restore original environment 69 | sys.path = old_path 70 | apps.app_configs = old_app_configs 71 | 72 | # old_path = sys.path 73 | # sys.path.append(project_home) 74 | # Doesn't work for includes() 75 | # imp.load_source('{}_urls'.join(project_id), os.path.join( 76 | # project_home, 77 | # project_id, 78 | # "urls.py" 79 | # )) 80 | # sys.path = old_path 81 | 82 | project_settings_file = os.path.join(project_home, project_id, "settings.py") 83 | project_urls_file = os.path.join(project_home, project_id, "urls.py") 84 | project_urls = parse_urls(project_urls_file) 85 | 86 | project_tree = build_project_tree(project_id, project_home) 87 | 88 | context = { 89 | "project_id": project_id, 90 | "project_home": project_home, 91 | "project_apps": project_apps, 92 | "project_databases": pr_settings.DATABASES, 93 | "project_settings_file": project_settings_file, 94 | "project_urls": project_urls, # project_urls.urlpatterns 95 | "project_urls_file": project_urls_file, 96 | "project_tree": project_tree, 97 | "has_apps_error": has_apps_error 98 | } 99 | 100 | return context 101 | 102 | 103 | def project_settings(project_id, project_home): 104 | """ 105 | Loads and returns project settings module 106 | """ 107 | 108 | # https://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path 109 | return imp.load_source('{}_settings'.join(project_id), os.path.join( 110 | project_home, 111 | project_id, 112 | "settings.py" 113 | )) 114 | 115 | 116 | def parse_urls(source): 117 | """ 118 | Parses project/application urls.py 119 | Extracts url() entries 120 | """ 121 | 122 | START_MARKER = "urlpatterns = [" 123 | END_MARKER = "]" 124 | 125 | grep_urls = False 126 | res = [] 127 | 128 | with open(source, 'r') as f: 129 | for line in f: 130 | if grep_urls: 131 | if 'url(' in line: 132 | res.append(line) 133 | 134 | if START_MARKER in line: 135 | grep_urls = True 136 | 137 | if END_MARKER in line: 138 | grep_urls = False 139 | 140 | return res 141 | 142 | 143 | def edit_installed_apps(project_id, project_home, new_installed_apps): 144 | """ 145 | Replaces INSTALLED_APPS in project settings.py with new list 146 | """ 147 | 148 | # TODO: implement it with ast / nodes transforms 149 | 150 | START_MARKER = "INSTALLED_APPS = [" 151 | END_MARKER = "]" 152 | 153 | path = os.path.join( 154 | project_home, 155 | project_id, 156 | "settings.py" 157 | ) 158 | 159 | is_apps = False 160 | is_changed = False 161 | new_source = [] 162 | 163 | with open(path, 'r') as f: 164 | for line in f: 165 | if START_MARKER in line: 166 | is_apps = True 167 | 168 | if is_apps and END_MARKER in line: 169 | is_apps = False 170 | 171 | if is_apps and is_changed: 172 | pass 173 | 174 | if is_apps and not is_changed: 175 | new_source.append("{}\n".format(START_MARKER)) 176 | for app in new_installed_apps: 177 | new_source.append(" '{}',\n".format(app)) 178 | is_changed = True 179 | 180 | if not is_apps: 181 | new_source.append(line) 182 | 183 | with open(path, 'w') as f: 184 | f.write("".join(new_source)) 185 | 186 | return "ok" 187 | 188 | 189 | def build_project_tree(project_id, path): 190 | """ 191 | Crawl ovel project dir and build dirs/files tree 192 | """ 193 | def build_tree(path): 194 | res = {} 195 | for node in glob.glob(os.path.join(path, "*")): 196 | label = node.replace(path, '') 197 | if os.path.isdir(node): 198 | res[label] = build_tree(node) 199 | else: 200 | if not label.lower().endswith(EXCLUDED_EXTENSIONS): 201 | res[label] = node 202 | return res 203 | 204 | res = {project_id: {}} 205 | res[project_id] = build_tree(path) 206 | 207 | return res 208 | 209 | 210 | def application_add_model(project_id, project_home, data): 211 | """ 212 | Adds new model into application from POST data 213 | """ 214 | 215 | application = data.get("application", "") 216 | new_model_name = data.get("new_model_name", "") 217 | fields = zip( 218 | data.getlist('new_model_field_id'), 219 | data.getlist('new_model_field_type'), 220 | data.getlist('new_model_field_options') 221 | ) 222 | 223 | if not application: 224 | return 225 | 226 | path = os.path.join(project_home, application, "models.py") 227 | with open(path, "a") as f: 228 | f.write("\n") 229 | f.write("\nclass {}(models.Model):".format(new_model_name)) 230 | if data.get("new_model_field_id", ""): 231 | for field_id, field_type, field_options in fields: 232 | f.write("\n {} = models.{}({})".format(field_id, field_type, field_options)) 233 | else: # model with id only 234 | f.write("\n pass") 235 | f.write("\n") 236 | 237 | path_admin = os.path.join(project_home, application, "admin.py") 238 | with open(path_admin, "a") as f: 239 | f.write("\n") 240 | f.write("\nadmin.site.register({})".format(new_model_name)) 241 | f.write("\n") 242 | 243 | # import pdb; pdb.set_trace() 244 | 245 | 246 | def application_edit_model(project_id, project_home, data): 247 | """ 248 | Put changes in model into application from POST data 249 | """ 250 | -------------------------------------------------------------------------------- /django_visual/static/js/ace.mode-python.1.4.4.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"variable.language":"self|cls","constant.language":t,keyword:e},"identifier"),i="[uU]?",s="[rR]",o="[fF]",u="(?:[rR][fF]|[fF][rR])",a="(?:(?:[1-9]\\d*)|(?:0))",f="(?:0[oO]?[0-7]+)",l="(?:0[xX][\\dA-Fa-f]+)",c="(?:0[bB][01]+)",h="(?:"+a+"|"+f+"|"+l+"|"+c+")",p="(?:[eE][+-]?\\d+)",d="(?:\\.\\d+)",v="(?:\\d+)",m="(?:(?:"+v+"?"+d+")|(?:"+v+"\\.))",g="(?:(?:"+m+"|"+v+")"+p+")",y="(?:"+g+"|"+m+")",b="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"string",regex:s+'"{3}',next:"rawqqstring3"},{token:"string",regex:s+'"(?=.)',next:"rawqqstring"},{token:"string",regex:s+"'{3}",next:"rawqstring3"},{token:"string",regex:s+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:u+'"{3}',next:"rfqqstring3"},{token:"string",regex:u+'"(?=.)',next:"rfqqstring"},{token:"string",regex:u+"'{3}",next:"rfqstring3"},{token:"string",regex:u+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'(.)*'"},{token:"string",regex:'"(.)*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+y+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:y},{token:"constant.numeric",regex:h+"[lL]\\b"},{token:"constant.numeric",regex:h+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};r.inherits(s,i),t.PythonHighlightRules=s}),define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.prototype)}),define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./python_highlight_rules").PythonHighlightRules,o=e("./folding/pythonic").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o("\\:"),this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/python"}.call(a.prototype),t.Mode=a}); (function() { 2 | window.require(["ace/mode/python"], function(m) { 3 | if (typeof module == "object" && typeof exports == "object" && module) { 4 | module.exports = m; 5 | } 6 | }); 7 | })(); 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /django_visual/static/js/popper.1.14.7.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) Federico Zivolo 2019 3 | Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). 4 | */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=e.ownerDocument.defaultView,n=o.getComputedStyle(e,null);return t?n[t]:n}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll|overlay)/.test(r+s+p)?e:n(o(e))}function r(e){return 11===e?pe:10===e?se:pe||se}function p(e){if(!e)return document.documentElement;for(var o=r(10)?document.body:null,n=e.offsetParent||null;n===o&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TH','TD','TABLE'].indexOf(n.nodeName)&&'static'===t(n,'position')?p(n):n:e?e.ownerDocument.documentElement:document.documentElement}function s(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||p(e.firstElementChild)===e)}function d(e){return null===e.parentNode?e:d(e.parentNode)}function a(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=o?e:t,i=o?t:e,r=document.createRange();r.setStart(n,0),r.setEnd(i,0);var l=r.commonAncestorContainer;if(e!==l&&t!==l||n.contains(i))return s(l)?l:p(l);var f=d(e);return f.host?a(f.host,t):a(e,d(t).host)}function l(e){var t=1=o.clientWidth&&n>=o.clientHeight}),l=0a[e]&&!t.escapeWithReference&&(n=Q(f[o],a[e]-('right'===e?f.width:f.height))),le({},o,n)}};return l.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';f=fe({},f,m[t](e))}),e.offsets.popper=f,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,n=t.reference,i=e.placement.split('-')[0],r=Z,p=-1!==['top','bottom'].indexOf(i),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]r(n[s])&&(e.offsets.popper[d]=r(n[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var n;if(!K(e.instance.modifiers,'arrow','keepTogether'))return e;var i=o.element;if('string'==typeof i){if(i=e.instance.popper.querySelector(i),!i)return e;}else if(!e.instance.popper.contains(i))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase(),h=a?'left':'top',c=a?'bottom':'right',u=S(i)[l];d[c]-us[c]&&(e.offsets.popper[m]+=d[m]+u-s[c]),e.offsets.popper=g(e.offsets.popper);var b=d[m]+d[l]/2-u/2,w=t(e.instance.popper),y=parseFloat(w['margin'+f],10),E=parseFloat(w['border'+f+'Width'],10),v=b-e.offsets.popper[m]-y-E;return v=ee(Q(s[l]-u,v),0),e.arrowElement=i,e.offsets.arrow=(n={},le(n,m,$(v)),le(n,h,''),n),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=v(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split('-')[0],i=T(n),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case ge.FLIP:p=[n,i];break;case ge.CLOCKWISE:p=G(n);break;case ge.COUNTERCLOCKWISE:p=G(n,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(n!==s||p.length===d+1)return e;n=e.placement.split('-')[0],i=T(n);var a=e.offsets.popper,l=e.offsets.reference,f=Z,m='left'===n&&f(a.right)>f(l.left)||'right'===n&&f(a.left)f(l.top)||'bottom'===n&&f(a.top)f(o.right),g=f(a.top)f(o.bottom),b='left'===n&&h||'right'===n&&c||'top'===n&&g||'bottom'===n&&u,w=-1!==['top','bottom'].indexOf(n),y=!!t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&g||!w&&'end'===r&&u);(m||b||y)&&(e.flipped=!0,(m||b)&&(n=p[d+1]),y&&(r=z(r)),e.placement=n+(r?'-'+r:''),e.offsets.popper=fe({},e.offsets.popper,D(e.instance.popper,e.offsets.reference,e.placement)),e=P(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],n=e.offsets,i=n.popper,r=n.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return i[p?'left':'top']=r[o]-(s?i[p?'width':'height']:0),e.placement=T(t),e.offsets.popper=g(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!K(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=C(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottomo.right||t.top>o.bottom||t.rightwindow.devicePixelRatio||!me),c='bottom'===o?'top':'bottom',g='right'===n?'left':'right',b=H('transform');if(d='bottom'==c?'HTML'===l.nodeName?-l.clientHeight+h.bottom:-f.height+h.bottom:h.top,s='right'==g?'HTML'===l.nodeName?-l.clientWidth+h.right:-f.width+h.right:h.left,a&&b)m[b]='translate3d('+s+'px, '+d+'px, 0)',m[c]=0,m[g]=0,m.willChange='transform';else{var w='bottom'==c?-1:1,y='right'==g?-1:1;m[c]=d*w,m[g]=s*y,m.willChange=c+', '+g}var E={"x-placement":e.placement};return e.attributes=fe({},E,e.attributes),e.styles=fe({},m,e.styles),e.arrowStyles=fe({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return j(e.instance.popper,e.styles),V(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&j(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,o,n,i){var r=L(i,t,e,o.positionFixed),p=O(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),j(t,{position:o.positionFixed?'fixed':'absolute'}),o},gpuAcceleration:void 0}}},ue}); 5 | //# sourceMappingURL=popper.min.js.map 6 | -------------------------------------------------------------------------------- /django_visual/static/css/jstree.3.2.1.style.min.css: -------------------------------------------------------------------------------- 1 | .jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none;display:inline}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 #fff;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default .jstree-anchor,.jstree-default .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default .jstree-hovered{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-clicked{background:#beebff;border-radius:2px;box-shadow:inset 0 0 1px #999}.jstree-default .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default .jstree-disabled{background:0 0;color:#666}.jstree-default .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-default .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}.jstree-default>.jstree-striped{min-width:100%;display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-default>.jstree-wholerow-ul .jstree-hovered,.jstree-default>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-default .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default .jstree-wholerow-clicked{background:#beebff;background:-webkit-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:linear-gradient(to bottom,#beebff 0,#a8e4ff 100%)}.jstree-default .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default .jstree-anchor{line-height:24px;height:24px}.jstree-default .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default.jstree-rtl .jstree-node{margin-right:24px}.jstree-default .jstree-wholerow{height:24px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-image:url(32px.png)}.jstree-default .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default .jstree-last{background:0 0}.jstree-default .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default .jstree-themeicon{background-position:-260px -4px}.jstree-default>.jstree-no-dots .jstree-node,.jstree-default>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default .jstree-disabled{background:0 0}.jstree-default .jstree-disabled.jstree-hovered{background:0 0}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-checkbox{background-position:-164px -4px}.jstree-default .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default .jstree-checked>.jstree-checkbox{background-position:-228px -4px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default .jstree-checked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default>.jstree-striped{background-size:auto 48px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default .jstree-file{background:url(32px.png) -100px -68px no-repeat}.jstree-default .jstree-folder{background:url(32px.png) -260px -4px no-repeat}.jstree-default>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default{line-height:24px;padding:0 4px}#jstree-dnd.jstree-default .jstree-ok,#jstree-dnd.jstree-default .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default i{background:0 0;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-default .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-default .jstree-er{background-position:-36px -68px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-small .jstree-wholerow{height:18px}.jstree-default-small .jstree-node,.jstree-default-small .jstree-icon{background-image:url(32px.png)}.jstree-default-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-small .jstree-last{background:0 0}.jstree-default-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-small .jstree-themeicon{background-position:-263px -7px}.jstree-default-small>.jstree-no-dots .jstree-node,.jstree-default-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-small .jstree-disabled{background:0 0}.jstree-default-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-small .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-small>.jstree-striped{background-size:auto 36px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-small .jstree-file{background:url(32px.png) -103px -71px no-repeat}.jstree-default-small .jstree-folder{background:url(32px.png) -263px -7px no-repeat}.jstree-default-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-default-small .jstree-ok,#jstree-dnd.jstree-default-small .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-default-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-default-small .jstree-er{background-position:-39px -71px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-large .jstree-wholerow{height:32px}.jstree-default-large .jstree-node,.jstree-default-large .jstree-icon{background-image:url(32px.png)}.jstree-default-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-large .jstree-last{background:0 0}.jstree-default-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-large .jstree-themeicon{background-position:-256px 0}.jstree-default-large>.jstree-no-dots .jstree-node,.jstree-default-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-large .jstree-disabled{background:0 0}.jstree-default-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-large .jstree-checkbox{background-position:-160px 0}.jstree-default-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-large .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-large>.jstree-striped{background-size:auto 64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}.jstree-default-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-large .jstree-file{background:url(32px.png) -96px -64px no-repeat}.jstree-default-large .jstree-folder{background:url(32px.png) -256px 0 no-repeat}.jstree-default-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-default-large .jstree-ok,#jstree-dnd.jstree-default-large .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-default-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-default-large .jstree-er{background-position:-32px -64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(40px.png);background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(40px.png);background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-default-responsive .jstree-icon{background-image:url(40px.png)}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px}.jstree-default-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-responsive .jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-size:120px 240px}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-default-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-default-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-default-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-responsive .jstree-checked>.jstree-checkbox,.jstree-default-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-default-responsive>.jstree-striped{background:0 0}.jstree-default-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,.7);border-bottom:1px solid rgba(64,64,64,.2);background:#ebebeb;height:40px}.jstree-default-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-default-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666}.jstree-default-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666;border-top:0}.jstree-default-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-node>.jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-image:url(40px.png);background-size:120px 240px}.jstree-default-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-responsive .jstree-last{background:0 0}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-responsive .jstree-file{background:url(40px.png) 0 -160px no-repeat;background-size:120px 240px}.jstree-default-responsive .jstree-folder{background:url(40px.png) -40px -40px no-repeat;background-size:120px 240px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}} -------------------------------------------------------------------------------- /django_visual/ide/templates/open_project.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block head %} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {% endblock %} 19 | 20 | {% block body %} 21 |
22 | 97 | 98 | 145 | 146 |
147 | 148 | 165 |
166 |
167 | 168 |
169 | 170 |
171 | 172 | 173 | 174 | 182 | 183 |

Diagram is drawn using https://yuml.me

184 |
185 | 186 |
187 |
Run project to get console output
188 |
189 | 190 | {% for item, models in project_apps.iteritems %} 191 | {% if 'django.contrib' in item %} 192 | 193 | {% else %} 194 |
195 | {% for model in models %} 196 |
197 | 205 |
206 |
207 | {% for field in model.fields %} 208 |
209 | {{field.name}} {{field.class}} 210 |
211 | {% endfor %} 212 |
213 |
214 |
215 | {% empty %} 216 |

217 | No models defined 218 |

219 | {% endfor %} 220 |
221 | Add model 222 |
223 |
224 | 225 |
226 |
227 | 228 |
229 | 238 | 239 |
240 | id 241 | AutoField 242 |
243 | 244 |
245 | × 246 | 247 | 248 | 249 | 260 |
261 | 262 |
263 | Add Field 264 |
265 | 266 |
267 | 268 |
269 |
270 |
271 |
272 |
273 | {% endif %} 274 | {% endfor %} 275 |
276 |
277 | 278 |
279 | 280 |
281 | 286 |
287 | {% if has_apps_error %} 288 | 289 | {% endif %} 290 |
291 |
292 | django.contrib.* 293 | 294 | 306 |
307 | 308 | {% for item, models in project_apps.iteritems %} 309 | {% if 'django.contrib' in item %} 310 | 311 | {% else %} 312 |
313 | {{item}} 314 | 315 | {% if models %} 316 | 326 | {% endif %} 327 |
328 | {% endif %} 329 | {% endfor %} 330 |
331 |
332 | 339 |
340 | 341 |
342 | 347 |
348 |
349 | {% for label, item in project_databases.items %} 350 |
351 | {{label}} 352 | 353 | 363 |
364 | {% endfor %} 365 |
366 |
367 | 372 |
373 | 374 |
375 | 380 |
381 |
382 | {% for item in project_urls %} 383 | 384 | {{item}} 385 | 386 | {% endfor %} 387 |
388 |
389 | 394 |
395 | 396 |
397 | 398 | 399 | 400 |
401 | 402 | 403 | 404 | 405 | 406 | 426 | 427 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 662 | {% endblock %} 663 | --------------------------------------------------------------------------------