django-tenant-schemas icon indicating copy to clipboard operation
django-tenant-schemas copied to clipboard

What is the use of collectstatic_schemas?

Open durkode opened this issue 8 years ago • 3 comments
trafficstars

I recently had to make a tenant aware admin command, which was extremely easy due to subclassing BaseTenantCommand, the example of which was collectstatic made into collectstatic_schemas. However I can't work out why you would ever need collectstatic_schemas. I tried running it and all it did (as expected) was run collectstatic once for each tenant, each time overwriting the same files. Is there a use case for collectstatic_schemas that I am unaware of?

Note: this is a question, not an issue or bug. Love your work

durkode avatar Aug 08 '17 23:08 durkode

+1 I had the same observation and question.

indytraub avatar Sep 15 '17 19:09 indytraub

In my case, I am getting the following issue when I am trying to run the collectstatic_schemas command. Any suggestion to get rid of this issue would be really appreciated.

(venv3.6.7.26apr) ➜  src git:(master) ✗ python manage.py collectstatic_schemas       
Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/Users/hygull/Desktop/try_django_tenant_schemas/venv3.6.7.26apr/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/Users/hygull/Desktop/try_django_tenant_schemas/venv3.6.7.26apr/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/hygull/Desktop/try_django_tenant_schemas/venv3.6.7.26apr/lib/python3.6/site-packages/django/core/management/__init__.py", line 224, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/Users/hygull/Desktop/try_django_tenant_schemas/venv3.6.7.26apr/lib/python3.6/site-packages/django/core/management/__init__.py", line 37, in load_command_class
    return module.Command()
  File "/Users/hygull/Desktop/try_django_tenant_schemas/venv3.6.7.26apr/lib/python3.6/site-packages/tenant_schemas/management/commands/__init__.py", line 27, in __new__
    app_name = get_commands()[obj.COMMAND_NAME]
KeyError: 'collectstatic'

rishikesh67 avatar May 02 '19 07:05 rishikesh67

Someone Solve this? same error here.

mauri-seabra avatar Apr 24 '20 11:04 mauri-seabra