Django 'settings' object has no attribute
NickName:Reid Mac Ask DateTime:2012-06-26T02:34:26

Django 'settings' object has no attribute

this is my first python project. I am having issues setting up a project someone else has written. I am getting the following 'Settings' object has no attribute 'FOXYCART_URL' here's the stack trace:

Environment:


Request Method: GET
Request URL: http://localhost:8000/

Django Version: 1.4
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'django.contrib.flatpages',
 'sorl.thumbnail',
 'chunks',
 'staging',
 'south')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware')

Exception Type: AttributeError at /
Exception Value: 'Settings' object has no attribute 'FOXYCART_URL'

I was wondering where do I need to set the FOXYCART_URL attribute?

Copyright Notice:Content Author:「Reid Mac」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/11195201/django-settings-object-has-no-attribute

Answers
jdi 2012-06-25T18:40:31

Apparently you are using an app called django-foxycart, but don't have it fully set up, yet something in your project is importing and wanting to use it.\n\nThere is a readme for the app here: https://github.com/electricjay/django-foxycart\n\nYou need to have it listed in your INSTALLED_APPS in your settings.py:\n\nINSTALLED_APPS = (\n ...\n 'foxycart',\n ...\n)\n\n\nAnd you need to define the URL to your foxycart with FOXYCART_URL:\n\nFOXYCART_URL = \"http://foo\"\n\n\nAlthough in the readme it looks like the value has changed to: FOXYCART_API_URL, but maybe you are using an older version.",


More about “Django 'settings' object has no attribute” related questions

Django and Django channels

I have one django project, which uses django channels as well. Now I want to separate django channels into a separate project. Means, one applicaton will have two django projects, Django for http

Show Detail

Trying to add Django Countries to Django

I am a newbie to django and I am trying to install django countries and am haveing issues. I Installed from http://pypi.python.org/pypi/django-countries/1.0.1. When I installed, I put it into this

Show Detail

Django or Django Rest Framework

I have made a certain app in Django, and I know that Django Rest Framework is used for building APIs. However, when I started to read about Django Rest Framework on their website, I noticed that ea...

Show Detail

Django module Issue/running django

Started having issues running Django. Install runs without error, however when I check the version packages that show "already satisified" are not found. I've removed my .local and re-installed f...

Show Detail

Django 3 vs Django 2

Is django 3 backward compatible with django 2? Are there any syntax changes in django 3 compared to django 2? Will i be able to follow django 2 tutorial on YouTube and be okay to apply it in django...

Show Detail

pylint django with django-configurations

UPDATE 2021 March 29 : There is a known issue here How to make pylint-django work together with django-configurations ? I've setup a Django project in VS code with pylint and django-pylint as linte...

Show Detail

Django login with django-axes

I created a site with django. Users should be able to login. The login-view looks like this: from django.contrib.auth import authenticate, login from django.contrib.auth.models import User .... if

Show Detail

Django: Error with django content type

I got error: django.db.utils.IntegrityError: insert or update on table "auth_permission" violates foreign key constraint "auth_content_type_id_508cf46651277a81_fk_django_content_type_id" DETAIL: ...

Show Detail

Django, Django-Angular and the Django Rest Framework

We are getting started using Angular in our existing Django app, and I have seen mention of the Django Rest Framework as well as Django-Angular library. The DRF has been very easy to use, and seem...

Show Detail

Django: MongoDB engine for Django 1.8

Anybody know of any currently worked on projects that wire up MongoDB to the most recent version of Django? mongoengine's Django module github hasn't been updated in 2 years (and I don't know if I ...

Show Detail