D
D
Denis2020-01-25 13:05:55
Django
Denis, 2020-01-25 13:05:55

How to create root in django?

Failed to create additional root account in Django (1.11.5). Faced this error:

$ python3 manage.py createsuperuser
Traceback (most recent call last):                                
  File "manage.py", line 22, in <module>   
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()                                            
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 338, in execute                             
    django.setup()                                                                                                                   
  File "/usr/local/lib/python3.5/dist-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)                                    
  File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)                                          
  File "/usr/local/lib/python3.5/dist-packages/django/apps/config.py", line 94, in create                                            
    module = import_module(entry)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'admin_view_permission'

although the module itself seems to be,
INSTALLED_APPS = [                                                                                                                   
    'admin_view_permission',                                                                                                         
    'filebrowser',                                                                                                                   
    'django.contrib.admin',                                                                                                          
    'django.contrib.auth',                                                                                                           
    'django.contrib.contenttypes',                                                                                                   
    'django.contrib.sessions',                                                                                                       
    'django.contrib.messages',                                                                                                       
    'django.contrib.staticfiles',                                                                                                    
    'django.contrib.sites',                                                                                                          
    'django.contrib.redirects',

What could be the problem ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alternativshik, 2020-01-25
@cicada3301

what is this admin_view_permission anyway?

V
Vitaly, 2020-01-25
@MrCute

pip install django-admin-view-permission

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question