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

274 visualizações
Pular para a primeira mensagem não lida

Gary Roach

não lida,
25 de jun. de 2016, 16:07:5425/06/2016
para 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

não lida,
25 de jun. de 2016, 16:56:2825/06/2016
para 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

não lida,
25 de jun. de 2016, 18:51:4625/06/2016
para 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

não lida,
26 de jun. de 2016, 04:26:1626/06/2016
para 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

não lida,
26 de jun. de 2016, 08:24:1326/06/2016
para 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

Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem