django-visual icon indicating copy to clipboard operation
django-visual copied to clipboard

I'm not seeing how to run this project.

Open enjoysmath opened this issue 4 years ago • 4 comments

Could you give any hint in the readme about how to run this project?

enjoysmath avatar Oct 01 '21 00:10 enjoysmath

Hello @enjoysmath

This is regular Django project,

you may run it locally with django_visual/manage.py runserver and first you likely will need to populate DB with django_visual/manage.py migrate

I deployed a test version on Heroku, to do this please take a look into Procfile

Regards, V.

vsergeyev avatar Oct 01 '21 13:10 vsergeyev

Hey, bro! It runs, but first I had to do:

pip install 2to3
cd django-visual 
2to3 django_visual -w
python django_visual/manage.py runserver

The purpose is to convert Python 2 to Python 3 syntax. It worked without any extra modifications.

It looks amazing! Good job!

enjoysmath avatar Oct 01 '21 16:10 enjoysmath

I did run python django_visual/manage.py migrate but it said no migrations to apply.

When I create a webproject named AbstractSpacecraft I'm getting:

image

Or in text form:

RuntimeError at /ide/open_project/AbstractSpacecraft/

populate() isn't reentrant
Request Method: GET
http://127.0.0.1:8000/ide/open_project/AbstractSpacecraft/
3.1.5
RuntimeError
populate() isn't reentrant
C:\Python39\lib\site-packages\django\apps\registry.py, line 83, in populate
C:\Python39\python.exe
3.9.7
['C:\Users\FruitfulApproach\Desktop\AbstractSpacecraft\django-visual\django_visual', 'C:\Python39\lib\site-packages\_pdbpp_path_hack', 'C:\Python39\python39.zip', 'C:\Python39\DLLs', 'C:\Python39\lib', 'C:\Python39', 'C:\Users\FruitfulApproach\AppData\Roaming\Python\Python39\site-packages', 'C:\Python39\lib\site-packages', 'C:\Python39\lib\site-packages\orange3_hdf5_add_on-0.0.0-py3.9.egg', 'C:\Python39\lib\site-packages\win32', 'C:\Python39\lib\site-packages\win32\lib', 'C:\Python39\lib\site-packages\Pythonwin', 'C:\Users\FruitfulApproach\Desktop\AbstractSpacecraft\django-visual\projects\AbstractSpacecraft']
Fri, 01 Oct 2021 16:02:27 +0000

Here is the (unexpanded) traceback with line info from the same page:

Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/ide/open_project/app_hello/

Django Version: 3.1.5
Python Version: 3.9.7
Installed Applications:
['django.contrib.staticfiles', 'ide']
Installed Middleware:
[]

Traceback (most recent call last):
  File "C:\Python39\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
    response = get_response(request)
  File "C:\Python39\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\Users\FruitfulApproach\Desktop\AbstractSpacecraft\django-visual\django_visual\ide\views.py", line 94, in open_project
    context = project_context(project_id, project_home)
  File "C:\Users\FruitfulApproach\Desktop\AbstractSpacecraft\django-visual\django_visual\ide\open_project.py", line 35, in project_context
    apps.populate(installed_apps=pr_settings.INSTALLED_APPS)
  File "C:\Python39\lib\site-packages\django\apps\registry.py", line 83, in populate
    raise RuntimeError("populate() isn't reentrant")

Exception Type: RuntimeError at /ide/open_project/app_hello/
Exception Value: populate() isn't reentrant

enjoysmath avatar Oct 01 '21 16:10 enjoysmath

Hi, can you fix this error with me?

enjoysmath avatar Oct 06 '21 21:10 enjoysmath