Rename application in Django Admin

0

Good night guys, I'm trying to rename the application in django admin according to the documentation, but it did not work, I think I'm doing something wrong, the code is as follows:

players control / apps.py

from django.apps import AppConfig


class ControledebolsistasConfig(AppConfig):
    name = 'controledebolsistas'
    verbose_name = "Controle de Bolsistas"

_init __. py

default_app_config = 'controledebolsistas.apps.ControledebolsistasConfig'

It has an error 'ImportError: No module named' player control ', I think I'm doing something wrong, I need some import in these files ?? I'm new to django and anyone who can help me thanks! '

    
asked by anonymous 10.02.2017 / 22:28

2 answers

0

To include the application in the project, you need to add the reference to the application configuration class in the INSTALLED_APPS definition. The ControllersConfigControl class is in the file: file: 'controllers control / apps.py', right? Then your punctuated path is 'Controllers Control.apps.Controller ControlConfig'. Edit the settings.py file and add that path with dot notation. The INSTALLED_APPS definition. It will look like this:

INSTALLED_APPS = [
    'Controledebolsistas.apps.ControledebolsistasConfig',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]
    
23.02.2017 / 22:44
0

Place your application inside INSTALLED_APPS, the rest is correct !!

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
 'controledebolsistas',
]
    
12.09.2017 / 06:45