New issue 58 by davidesc...@gmail.com: Development server problems with
Django on Jython
http://code.google.com/p/django-jython/issues/detail?id=58
I'm running into several problems with the Django development server
running on Jython:
1. The output shows formatting codes incorrectly at the beginning of each
line in the server output. I was able to work around this by setting the
DJANGO_COLORS environment variable to "nocolor", but I don't have to do
this when running on CPython.
2. The server can't be stopped with Ctrl-C (or even Ctrl-Z, Ctrl-D), etc.
Pressing Ctrl-Break prints out a very long stack trace, but still doesn't
stop the server. The only way to stop it is to close the terminal window
itself.
3. When entering the admin super user, I'm able to enter the user name and
email address, but the prompt just hangs on the password (pressing <ENTER>
does not work). This also happens when using the "createsuperuser" option.
So the super user cannot be set.
I've tried this on Windows 7 and Windows XP with Django 1.2.5 and Jython
2.5.2 (final). The django-jython is 1.2.0b1.
Can you please tell me what database backend you are using? I will try to
replicate the issues in my environment.
Thanks
I'm using MySQL 5.5 community edition (doj.backends.zxjdbc.mysql).
(Although the problems regarding not being able to stop the server are
present regardless of the db backend).
Thanks.
Comment #3 on issue 58 by juneau001: Development server problems with
Django on Jython
http://code.google.com/p/django-jython/issues/detail?id=58
I will try to replicate these issues in a Windows environment. Thanks for
the details.
Comment #4 on issue 58 by juneau001: Development server problems with
Django on Jython
http://code.google.com/p/django-jython/issues/detail?id=58
I have confirmed these issues on Windows Vista. I will begin to repair
them for the beta 2 release.
Thanks for your help, it is appreciated.
Thank you very much for looking into this!
Note: This is the same as issue 1715 on the Jython bug tracker.
There are certainly some issues while running in the development server
with Jython on Windows. For now, the obvious workaround is to use Task
Manager and kill the process each time...I will search the Jython bug
tracker for similar issues and try to investigate the history of these
errors.
Yes, I had originally filed the bug in the Jython bug tracker before
finding the django-jython project here.
As you say, I can work around stopping the development server through the
task manager or simply closing the terminal window, however, the more
serious problem where I can't enter the password for the super user
remains. This one is a show-stopper. I couldn't find a way to work around
that one.
I will work on this against Jython issue 1715.
This bug also appears with postgresql, therefore it seems unrelated to the
DB backend
BTW the link to the issue in Jython may help:
http://bugs.jython.org/issue1715
A colleague of mine just devised a workaround for creating the super user:
- Edit a file with 4 lines of text, containing username, email, password
and repeat password, e.g. "super.txt":
django
m...@mydomain.com
djangopass
djangopass
- Then run the manage command with redirected input:
$ manage createsuperuser < super.txt
You will still have all the CTRL-C problems, but at least there is no
showstopper now
That's good. At least it's a way forward for the time being. Hopefully, the
next version of django-jython will fix all these issues in the Windows
environment.
Thanks for the update and the workaround. Will start having more time to
look into items like this soon. I am going to be working with
Django-Jython on a daily basis again in the near future on a project.
Another workaround is to manually go into the database and assign the
superuser privilege to a user account. That is what I have done in the
past. Still does not take care of CTRL-C issues with Jython, but at least
provides a means for working with superuser account.