1
Good evening guys, I’m trying to rename the application in Django admin according to the documentation, but it ended up not happening, I think I’m doing something wrong, the code is as follows:
controledebolsists/ 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 presents an error 'Importarror: No module named 'controledebolsistas', I think I’m doing something wrong, I need some import in these files?? I am new with Jango and who can help me I thank you!! '
Put the app on INSTALLED_APPS in the file Settings.py. Already done?
– wen-dell
So the application already created is in INSTALLED_APPS as 'gestaobolsistas.controledebolsistas', and according to the documentation would have to add 'controledebolsistas.apps.'
– Walkyr Rosa
But it didn’t work
– Walkyr Rosa
it continuing showing that there is no module named 'controledebolsistas'
– Walkyr Rosa
Put here the documentation link you accessed.
– wen-dell
https://docs.djangoproject.com/en/1.7/ref/applications/#for-application-users
– Walkyr Rosa
The file is init.py with double underlined or you misspelled? There’s only one up there at the beginning.
– wen-dell
I wrote that way because when I typed in the question I was not accepting
– Walkyr Rosa
Try to see if it works by putting the project name before the app name in default_app_config.
– wen-dell
It didn’t work, I guess he didn’t recognize the init.py
– Walkyr Rosa
Make a test by putting only 'controledebolsistas' in INSTALLED_APPS
– Camilo Santos
@Walkyrrosa how is the directory structure of your project?
– mazulo
System/gestaobolsistas/controledebolsistas, it’s like this! gestaobolsistas is created project and control of scholarship is the application
– Walkyr Rosa
Ever tried to put
'gestaobolsitas.controledebolsistas.apps.ControledebolsistasConfig'
?– Leonardo Pessoa