Hello.
I have a project named venus. I'm creating an application named aboutus and want to rename it in my admin page.
As decribed here ,I created apps.py file in my application's directory as:
aboutus/apps.py
Then I added the code to __init__.py in my applcation directory as:
aboutus/__init__.py
As docs says,It is enough. But I get this exception:
I don't know what is going on. I just followed the docs. Also before running server, I make migrations to aboutus application and get this error:
Have I missed sth?? Please help me. Im new to django.
Thanks in advance...
-- I have a project named venus. I'm creating an application named aboutus and want to rename it in my admin page.
As decribed here ,I created apps.py file in my application's directory as:
aboutus/apps.py
from django.apps import AppConfig
class AboutUsConfig(AppConfig):
name = 'aboutus'
verbose_name = 'Who we are'
Then I added the code to __init__.py in my applcation directory as:
aboutus/__init__.py
default_app_config = 'aboutus.apps.AboutUsConfig'
As docs says,It is enough. But I get this exception:
pygeek@pygeek-VPCF115FM:~/DjangoProjects/venus$ python manage.py runserver 8002
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/core/management/__init__.py", line 351, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/core/management/__init__.py", line 343, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/core/management/__init__.py", line 177, in fetch_command
commands = get_commands()
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/utils/lru_cache.py", line 101, in wrapper
result = user_function(*args, **kwds)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/core/management/__init__.py", line 72, in get_commands
for app_config in reversed(list(apps.get_app_configs())):
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/apps/registry.py", line 137, in get_app_configs
self.check_apps_ready()
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/apps/registry.py", line 124, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/core/management/__init__.py", line 351, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/core/management/__init__.py", line 343, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/core/management/__init__.py", line 177, in fetch_command
commands = get_commands()
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/utils/lru_cache.py", line 101, in wrapper
result = user_function(*args, **kwds)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/core/management/__init__.py", line 72, in get_commands
for app_config in reversed(list(apps.get_app_configs())):
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/apps/registry.py", line 137, in get_app_configs
self.check_apps_ready()
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/apps/registry.py", line 124, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
I don't know what is going on. I just followed the docs. Also before running server, I make migrations to aboutus application and get this error:
pygeek@pygeek-VPCF115FM:~/DjangoProjects/venus$ python manage.py makemigrations aboutus
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/core/management/__init__.py", line 351, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/core/management/__init__.py", line 325, in execute
django.setup()
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/apps/config.py", line 112, in create
mod = import_module(mod_path)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named aboutus.apps
what??? No module named aboutus.apps???Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/core/management/__init__.py", line 351, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/core/management/__init__.py", line 325, in execute
django.setup()
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.5-py2.7.egg/django/apps/config.py", line 112, in create
mod = import_module(mod_path)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named aboutus.apps
Have I missed sth?? Please help me. Im new to django.
Thanks in advance...
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/89706ad4-900b-452f-85c8-bf0ced66aaac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment