|
Posted by IlieLipan |
|
|
I have a tree: branches are domains and leaves are apps;
Here I have:
INSTALLED_APPS = (
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.redirects",
"django.contrib.sessions",
"django.contrib.sites",
"django.contrib.sitemaps",
"django.contrib.staticfiles",
"mezzanine.boot",
"mezzanine.conf",
"mezzanine.core",
"mezzanine.generic",
"mezzanine.blog",
"mezzanine.forms",
"mezzanine.pages",
"mezzanine.galleries",
"mezzanine.twitter",
"mezzanine.accounts",
"mezzanine.mobile",
"./reinforced-concrete/beams/RC_BE_BS",
)
When I try to syncdb:
Traceback (most recent call last):
File "manage.py", line 40, in <module>
execute_manager(settings)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 459, in execute_manager
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 231, in execute
self.validate()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 266, in validate
num_errors = get_validation_errors(s, app)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/validation.py", line 30, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 158, in get_app_errors
self._populate()
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 64, in _populate
self.load_app(app_name, True)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 86, in load_app
app_module = import_module(app_name)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 28, in import_module
raise TypeError("relative imports require the 'package' argument")
TypeError: relative imports require the 'package' argument
The leaves contain always forms. Can somebody help? Thanks by advance. |
|
|
Posted by Kevin Veroneau |
|
This line is not a valid Python import. This is where the "relative" error your seeing is coming from. I am not really sure what you are attempting to do, so I cannot provide a good solution for you. Python packages also cannot have dashes in their names, so the python package of "reinforced-concrete" is invalid even if you remove the "./" from the line.
|


