ImportError: No module named skeleton.settings - django

I'm using django 1.8 and satchmo project. But after successful installation of satchmo project when I try to start the server it's showing me this error
`Traceback (most recent call last):
File "manage.py", line 25, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 308, in execute
settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/site-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/site-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/Cellar/python#2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named skeleton.settings`
INSTALLED_APPS = (
'django.contrib.sites',
'satchmo_store.shop',
'django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.auth',
'django.contrib.contenttypes',
#'django.contrib.comments',
'django.contrib.sessions',
'django.contrib.sitemaps',
'django.contrib.staticfiles',
'django.contrib.messages',
'django_comments',
'registration',
'sorl.thumbnail',
'keyedcache',
'livesettings',
'l10n',
'satchmo_utils.satchmo_thumbnail',
'satchmo_store.contact',
'tax',
'tax.modules.no',
'tax.modules.area',
'tax.modules.percent',
'shipping',
#'satchmo_store.contact.supplier',
#'shipping.modules.tiered',
#'satchmo_ext.newsletter',
#'satchmo_ext.recentlist',
'product',
'product.modules.configurable',
'product.modules.custom',
'product.modules.downloadable',
'product.modules.subscription',
#'satchmo_ext.product_feeds',
#'satchmo_ext.brand',
'payment',
'payment.modules.dummy',
#'payment.modules.purchaseorder',
#'payment.modules.giftcertificate',
#'satchmo_ext.wishlist',
#'satchmo_ext.upsell',
#'satchmo_ext.productratings',
'satchmo_ext.satchmo_toolbar',
'satchmo_utils',
#'shipping.modules.tieredquantity',
#'satchmo_ext.tieredpricing',
#'debug_toolbar',
'app_plugins',
'simple',
'store.localsite',
'skeleton',
)
Here I've added to installed apps. Still, it doesn't work. Can you tell me the use of the skeleton?
Also somehow skeleton doesn't compatible with django 1.8.

Related

Application labels aren't unique, duplicates: account. Django

I know there are Duplicates of this question, but they didn't solve the issue.
my django app is conflicting between django-user-acccounts; account and allauth.account
M Installed App
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'accounts.apps.AccountsConfig',
'django.contrib.sites',
# 'allauth',
'allauth.account', # django-allauth # conflict
'allauth.socialaccount',
'crispy_forms',
'account', # django-user-accounts #conflict
'pinax.referrals',
'kingEstateCore',
'widget_tweaks',
]
I've tried renaming the account package inside my site_packages but no success.
I've also tried adding AppConfig but there was no apps.py module insite my site_packages/account.
Any Ideas pls
Error TraceBack
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python36\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "c:\users\user\appdata\local\programs\python\python36\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\USER\Desktop\KingAfam\KingENV\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "C:\Users\USER\Desktop\KingAfam\KingENV\lib\site-packages\django\core\management\commands\runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "C:\Users\USER\Desktop\KingAfam\KingENV\lib\site-packages\django\utils\autoreload.py", line 76, in raise_last_exception
raise _exception[1]
File "C:\Users\USER\Desktop\KingAfam\KingENV\lib\site-packages\django\core\management\__init__.py", line 357, in execute
autoreload.check_errors(django.setup)()
File "C:\Users\USER\Desktop\KingAfam\KingENV\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "C:\Users\USER\Desktop\KingAfam\KingENV\lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\USER\Desktop\KingAfam\KingENV\lib\site-packages\django\apps\registry.py", line 95, in populate
"duplicates: %s" % app_config.label)
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: account

type object 'ContentType' has no attribute 'objects'

I am using djangae with some third party applications like all-auth, django-invitations and django rest framework. When I hit python manage.py migrate I get the following error.
AttributeError: type object 'ContentType' has no attribute 'objects'
The full trace is following
Traceback (most recent call last):
File "manage.py", line 26, in <module>
execute_from_command_line(sys.argv)
File "/home/salman/Workspace/chaipani/lib/djangae/core/management/__init__.py", line 43, in execute_from_command_line
return _execute_from_command_line(djangae_namespace.sandbox, argv, parser=djangae_parser, **overrides)
File "/home/salman/Workspace/chaipani/lib/djangae/core/management/__init__.py", line 68, in _execute_from_command_line
return django_management.execute_from_command_line(argv)
File "/home/salman/Workspace/chaipani/lib-vendor/django/core/management/__init__.py", line 363, in execute_from_command_line
utility.execute()
File "/home/salman/Workspace/chaipani/lib-vendor/django/core/management/__init__.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/salman/Workspace/chaipani/lib-vendor/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/salman/Workspace/chaipani/lib-vendor/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/home/salman/Workspace/chaipani/lib-vendor/django/core/management/commands/migrate.py", line 227, in handle
self.verbosity, self.interactive, connection.alias, apps=post_migrate_apps, plan=plan,
File "/home/salman/Workspace/chaipani/lib-vendor/django/core/management/sql.py", line 53, in emit_post_migrate_signal
**kwargs
File "/home/salman/Workspace/chaipani/lib-vendor/django/dispatch/dispatcher.py", line 193, in send
for receiver in self._live_receivers(sender)
File "/home/salman/Workspace/chaipani/lib-vendor/django/contrib/auth/management/__init__.py", line 63, in create_permissions
ctype = ContentType.objects.db_manager(using).get_for_model(klass)
AttributeError: type object 'ContentType' has no attribute 'objects'
My installed apps:
INSTALLED_APPS = [
'djangae',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'djangae.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'djangae.contrib.security',
'django.contrib.sites',
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.google',
'invitations',
]
Any help anyone?

Issue with importing rest_framework inside django app

I am facing an issue of importing rest_framework inside my django app whenever i try to make migrations or create superuser or simply run the runserver.
I have installed the framework using this command but django still doesn't recognize it
sudo pip install djangorestframework
here's the snippet of settings.py file:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'companies.apps.CompaniesConfig',
]
REST_FRAMEWORK = {
'DEFAULT_MODEL_SERIALIZER_CLASS':
'rest_framework.serializers.HyperlinkedModelSerializer',
# Use Django's standard `django.contrib.auth` permissions,
# or allow read-only access for unauthenticated users.
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
]
}
Output:
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/home/tam/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
/django/core/management/__init__.py", line 364
in execute_from_command_line utility.execute()
File "/home/tam/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
/django/core/management/__init__.py", line 338, in execute
django.setup()
File "/home/tam/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/tam/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/tam/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
/django/apps/config.py", line 94, in create
module = import_module(entry)
File "/home/tam/Canopy/appdata/canopy-1.7.4.3348.rh5-x86_64/lib/python2.7/
importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named rest_framework

django-registration as an APP errors out on __init__.py

I am trying to use django-registration package on my project as an APP. All I did was
Downloaded the package from ""
Copied the "registration" folder under SOWL
In my project's URLs.py added
(r'^accounts/', include('registration.backends.default.urls')),
in my project's settings.py added "registration"
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'CATALOG',
'SOWLAPP',
'registration',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
'django.contrib.admindocs',
)
it gives the following error -
C:\SHIYAM\Personal\SuccessOwl\SOWL0.1\SOWL>python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
443, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 196,
in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 217,
in execute
translation.activate('en-us')
File "C:\Python27\lib\site-packages\django\utils\translation\__init__.py", lin
e 105, in activate
return _trans.activate(language)
File "C:\Python27\lib\site-packages\django\utils\translation\trans_real.py", l
ine 194, in activate
_active.value = translation(language)
File "C:\Python27\lib\site-packages\django\utils\translation\trans_real.py", l
ine 183, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "C:\Python27\lib\site-packages\django\utils\translation\trans_real.py", l
ine 160, in _fetch
app = import_module(appname)
File "C:\Python27\lib\site-packages\django\utils\importlib.py", line 35, in im
port_module
__import__(name)
File "C:\SHIYAM\Personal\SuccessOwl\SOWL0.1\SOWL\registration\__init__.py", li
ne 3
<!DOCTYPE html>
^
SyntaxError: invalid syntax
C:\SHIYAM\Personal\SuccessOwl\SOWL0.1\SOWL>
I am looking at the urls.py, __init__.py from the registration package and they all look different from the usual urls.py, __init__.py from in the regular apps under my project. Why are they different and what should I do to make it different?
SHM
It looks like something has gone wrong when you were copying the registration app . The traceback suggests that __init__.py contains html like <!DOCTYPE html>, which it definitely shouldn't.

Environment Error when trying to use django-notification app

I am trying to install django-notification app[1] and I get an error when I give manage.py syncdb.
The error states: EnvironmentError: NOTIFICATIONS was not found.
I have installed django-notification using setup tools successfully. This is my stack trace.
File "C:\Tools\Python26\lib\site-packages\django\core\management\__init__.py",
line 438, in execute_manager
utility.execute()
File "C:\Tools\Python26\lib\site-packages\django\core\management\__init__.py",
line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Tools\Python26\lib\site-packages\django\core\management\base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Tools\Python26\lib\site-packages\django\core\management\base.py", line 219, in execute
self.validate()
File "C:\Tools\Python26\lib\site-packages\django\core\management\base.py", line 249, in validate
num_errors = get_validation_errors(s, app)
File "C:\Tools\Python26\lib\site-packages\django\core\management\validation.py", line 36, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "C:\Tools\Python26\lib\site-packages\django\db\models\loading.py", line 146, in get_app_errors
self._populate()
File "C:\Tools\Python26\lib\site-packages\django\db\models\loading.py", line 61, in _populate
self.load_app(app_name, True)
File "C:\Tools\Python26\lib\site-packages\django\db\models\loading.py", line 78, in load_app
models = import_module('.models', app_name)
File "C:\Tools\Python26\lib\site-packages\django\utils\importlib.py", line 35, in import_module
__import__(name)
File "build\bdist.win32\egg\django_notifications\models.py", line 20, in <module>
File "build\bdist.win32\egg\django_notifications\backends\__init__.py", line 23, in get_available_backends
File "build\bdist.win32\egg\django_notifications\backends\__init__.py", line 90, in get_class_instance_by_key
File "build\bdist.win32\egg\django_notifications\backends\xmpp.py", line 33, in __init__
File "build\bdist.win32\egg\django_notifications\backends\__init__.py", line 5
5, in get_settings
EnvironmentError: NOTIFICATIONS was not found.
Any ideas what went wrong?
*Added settings.INSTALLED_APPS part (corrected 'django-notifications' entry to 'notification' as suggested)*
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'grappelli',
'filebrowser',
'tinymce',
'south',
'avatar',
'django.contrib.admin',
'notification',
'myproject.main',
)
[1] https://github.com/jtauber/django-notification
For whatever reason, you've decided to add django_notifications to settings.INSTALLED_APPS instead of notification. Fix this.