Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with import rules #16

Open
matesaki opened this issue Jul 17, 2023 · 1 comment
Open

Problem with import rules #16

matesaki opened this issue Jul 17, 2023 · 1 comment

Comments

@matesaki
Copy link

matesaki commented Jul 17, 2023

$ 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

@sztamas
Copy link
Owner

sztamas commented Jul 20, 2023

Hi @matesaki ,

Can you please try switch to the latest version ( 1.9.1) and see if the problem persists?

Thanks,
@sztamas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants