Skip to content

Problem with import rules #16

@matesaki

Description

@matesaki
$ django-admin import_rules fixture rules.json 
Traceback (most recent call last):
  File "/usr/local/bin/django-admin", line 11, in <module>
    load_entry_point('Django', 'console_scripts', 'django-admin')()
  File "/usr/local/lib/python3.6/site-packages/Django-2.2.28-py3.6.egg/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.6/site-packages/Django-2.2.28-py3.6.egg/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.6/site-packages/Django-2.2.28-py3.6.egg/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.6/site-packages/Django-2.2.28-py3.6.egg/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.6/site-packages/iprestrict/management/commands/import_rules.py", line 22, in handle
    call_command("loaddata", *args, **options)
  File "/usr/local/lib/python3.6/site-packages/Django-2.2.28-py3.6.egg/django/core/management/__init__.py", line 140, in call_command
    ', '.join(sorted(valid_options)),
TypeError: Unknown option(s) for loaddata command: fixture. Valid options are: app, app_label, args, database, exclude, force_color, format, help, ignore, ignorenonexistent, no_color, pythonpath, settings, skip_checks, stderr, stdout, traceback, verbosity, version.

Data in json file dump with command dumpdata (from docs) without modification.
And this new way of import is not mentioned in docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions