Using the Eclipse mysite>django>custom command(manage.py$(custom_command)) function

277 views
Skip to first unread message

Gary Roach

unread,
Jun 25, 2016, 4:07:54 PM6/25/16
to Django users
Hi all:

OS Debian Stretch
KDE Desktop

I am using Eclipse Neon with the PyDev plugin for developing a django
application. At present I am running through the djangoproject
tutorial.The tutorial has me run:
python manage.py createsuperuser
I want to run this within Eclipse and not the system command line. Right
clicking on the project title and following the sub menus I get to the:
mysite>django>custom command(manage.py$(custom_command)) function. I
can't seem to figure out how to use this. It is the only thing I could
find that looks like it is meant to replace the system command line.

In general, any time I have to use manage.py and there is not a specific
menu item for the process, I'm awash.

Any elucidation on this point will be sincerely appreciated.

Gary R.

Ilya Boka

unread,
Jun 25, 2016, 4:56:28 PM6/25/16
to django...@googlegroups.com
Click add. Enter your command( Ex: "runserver"). Click OK. Double
click to run this.
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d9eba089-965f-46cf-7c38-f97af2d17aa8%40verizon.net.
> For more options, visit https://groups.google.com/d/optout.

Gary Roach

unread,
Jun 25, 2016, 6:51:46 PM6/25/16
to django...@googlegroups.com
i did as you suggested and tried it with runserver. It worked. I tried
the same thing with createsuperuser and got the errror: Superuser
creation skipped due to not running in a TTY.

Since I am setting up the sqlite dbms, does it make any difference if I
run the thing inside Eclipse vs cd to mysite.manage.py and run things
from the system monitor command line?

Gary R.

Ilya Boka

unread,
Jun 26, 2016, 4:26:16 AM6/26/16
to django...@googlegroups.com
You can't createuser, becouse this command need user input. For this
case better run manage.py directly from console. Sorry, can't help you
with this.
> https://groups.google.com/d/msgid/django-users/88d4a6cf-19d7-6d54-b1da-320a55641ebc%40verizon.net.

Gergely Polonkai

unread,
Jun 26, 2016, 8:24:13 AM6/26/16
to Django users

Hello,

that message tells you everything. As there is no tty (ie. a terminal that can read user input and write some output), createsuperuser won’t run.

I don’t know eclipse, but if you can force it to run commands within a tty, you won. Otherwise you will have to use the command line.

Well, except you can start an interactive Python shell from within Eclipse. In this case, you can import your User model, and create users with that, as if it was your app’s code.

Best,
Gergely

Reply all
Reply to author
Forward
0 new messages