On Apr 26, 11:50 pm, "." <nkw...@gmail.com> wrote: > Hello, > > I have several questions connected with custom commands. > > 1. How to delete anything from this dict? Is there a specific method > for this? [1] > > >>> Poll.objects.all() > > [<Poll: Poll object>]
This is not a dict, it's a QuerySet containing one single Poll instance. Deleting model instances can be done either on the instance itself or at the Queryset level for a batch delete. It's _of course_ all documented in the FineManual here: https://docs.djangoproject.com/en/1.4/#the-model-layer > 2. How to get rid of default options (which are available from --help > (traceback, verbosity etc.))? Those are handled by > BaseCommand.option_list. But I haven't found a way to write a class > without them. Just redefine your Command class option_list: class MyBadCommand(BaseCommand): option_list = () # no options at all... -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.