Data binding in custom management command

2016-12-07 Thread Stan Zeez
I start work with django channels. I need bind data of my model Device. I do it. When I change Device object in admin interface I get message about changing on client (web browser) but I also run simple custom django management command. And when Device-object has been changed in custom command

How to adopt command line options in custom management command?

2012-05-12 Thread Peter Stahl
Hi everyone, I have already described my problem at stackoverflow, so it'd probably be a good idea if you read my thread there first. Here you go: http://stackoverflow.com/questions/10564389/django-custom-management-command-running-scrapy-how-to-include-scrapys-options To quickly summari

custom management command with multiple required parameters

2011-11-16 Thread dmitry b
Hi, I just want to make sure I'm not missing something obvious. I'm writing a command that takes multiple required parameters and a set of optional parameters and I there doesn't seem to be readily available support for this use case. LabelCommand can take multiple labels, but the semantics of t

Custom management command using sql_delete fails

2010-08-05 Thread Mathias De Maré
Hi, I've created a custom management command for django-admin.py, but the sql execution (using statements created by sql_delete) keeps failing on django.db.utils.DatabaseError: unrecognized token: " " I'm afraid I'm not sure what's wrong. I'm currently thinking

Re: OT: running custom management command from cron & Unicode output error

2009-06-09 Thread Richard Colley
import sys, codecs, locale sys.stdout = codecs.getwriter(locale.getpreferredencoding()) (sys.stdout) or you can hard-code locale.getpreferredencoding() as 'utf-8' On Jun 7, 2:19 am, "Carlos A. Carnero Delgado" wrote: > Hi there! > > I'm having a proble

OT: running custom management command from cron & Unicode output error

2009-06-06 Thread Carlos A. Carnero Delgado
Hi there! I'm having a problem with a custom management command. Running interactively on the console will work perfectly, merrily printing its output in Unicode (I need that; accented characters among other things). But, if I put that command in a cron job, it will fail

Re: Custom management command

2008-05-15 Thread J . Pablo Fernández
I would have thought Django did it by itself, or actually, manage.py. After all, when I do manage.py shell, the pythonpath seems to be correct for me to do import bonvortaro. On May 15, 8:20 am, Alex Morega <[EMAIL PROTECTED]> wrote: > On May 15, 2008, at 09:52 , J. Pablo Fernández wrote: > > > I

Re: Custom management command

2008-05-15 Thread Alex Morega
On May 15, 2008, at 09:52 , J. Pablo Fernández wrote: > ImportError: 'No module named bonvortaro' > > In the process of getting the commands, it tries to import the package > and it fails. I could try setting up the pythonpath or something like > that, but that would be only a workaround. There

Re: Custom management command

2008-05-15 Thread J . Pablo Fernández
anks. > > On May 14, 9:37 pm, J. Pablo Fernández <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I've made a custom management command like this: > > > $ find -name "*.py*" > > ./manage.py > > ./__init__.pyc > > ./settings.pyc >

Re: Custom management command

2008-05-14 Thread J . Pablo Fernández
r solution (and doesn't everybody have this same problem?) Thanks. On May 14, 9:37 pm, J. Pablo Fernández <[EMAIL PROTECTED]> wrote: > Hello, > > I've made a custom management command like this: > > $ find -name "*.py*" > ./manage.py > ./__init__.

Re: Custom management command

2008-05-14 Thread J . Pablo Fernández
On May 14, 10:48 pm, George Vilches <[EMAIL PROTECTED]> wrote: > On May 14, 2008, at 5:23 PM, Alex Morega wrote: > > > > > > > On May 14, 2008, at 23:37 , J. Pablo Fernández wrote: > >> I've made a custom management command like this: > >>

Re: Custom management command

2008-05-14 Thread J . Pablo Fernández
On May 14, 10:23 pm, Alex Morega <[EMAIL PROTECTED]> wrote: > On May 14, 2008, at 23:37 , J. Pablo Fernández wrote: > > > I've made a custom management command like this: > > [...] > > but it is not being picked up. ./manage.py help doesn't list it

Re: Custom management command

2008-05-14 Thread George Vilches
On May 14, 2008, at 5:23 PM, Alex Morega wrote: > > On May 14, 2008, at 23:37 , J. Pablo Fernández wrote: >> I've made a custom management command like this: >> [...] >> but it is not being picked up. ./manage.py help doesn't list it and: >> >> $

Re: Custom management command

2008-05-14 Thread Alex Morega
On May 14, 2008, at 23:37 , J. Pablo Fernández wrote: > I've made a custom management command like this: > [...] > but it is not being picked up. ./manage.py help doesn't list it and: > > $ ./manage.py import_vortaro > Unknown command: 'import_vortaro' >

Custom management command

2008-05-14 Thread J . Pablo Fernández
Hello, I've made a custom management command like this: $ find -name "*.py*" ./manage.py ./__init__.pyc ./settings.pyc ./urls.py ./urls.pyc ./vortaro/management/commands/import_vortaro.py ./vortaro/management/commands/import_vortaro.pyc ./vortaro/management/commands/__init_