Questions tagged [django-settings]

A Django settings file is a Python module with module-level variables that contains all the configuration of your Django installation such as, Databases, Installed apps and Media and Static location to name a few.

Django settings file is a Python module with module-level variables that contains all the configuration of your Django installation such as: Databases, Installed apps and Media and Static location to name a few.

Here are a couple of example settings, extracted from the documentation:

DEBUG = False
DEFAULT_FROM_EMAIL = 'webmaster@example.com'
TEMPLATE_DIRS = ('/home/templates/mike', '/home/templates/john')
923 questions
0
votes
3 answers

Unable to load CSS files in Django

I'm using Ubuntu and Django 1.3.7. Following are the various relevant settings: My directory structure: mysite/ manage.py settings.py __init__.py urls.py myapp/ __init__.py forms.py …
xan
  • 4,640
  • 13
  • 50
  • 83
0
votes
0 answers

django LOGIN_REDIRECT_URL strange behavior

I've got a django (1.4.5) site on sub path /foo. In my setting.py I have the following set. All access requires login. LOGIN_URL='/foo/login/' LOGIN_REDIRECT_URL='/foo/' I'm experiencing strange behavior. When I go to https://my.site.com/foo/ …
The Pulsing Eye
  • 161
  • 3
  • 11
0
votes
1 answer

Django App breaks Using Heroku Database Settings

When I run my Django app locally everything works just fine but when I deploy to Heroku using import dj_database_url DATABASES = {'default': dj_database_url.config(default='postgres://')} For my database settings I get the following…
harristrader
  • 1,181
  • 2
  • 13
  • 20
0
votes
1 answer

Django TypeError Using Heroku

So Ive managed to screw something up between my production database settings for heroku. Running the production settings locally I receive the error, ImproperlyConfigured at / settings.DATABASES is improperly configured. Please supply the ENGINE…
harristrader
  • 1,181
  • 2
  • 13
  • 20
0
votes
1 answer

URL matching in tutorial fails (admin)

I've followed the Django tutorial part 1, and am now on part 2 where I'm supposed to get the admin interface up and running. I've followed the step very carefully but when I try to load the site I get the following error: Using the URLconf defined…
holyredbeard
  • 19,619
  • 32
  • 105
  • 171
0
votes
1 answer

Django settings.DATABASE 'default' value is not set

I have a Django 1.4.3 project using Python 2.7.3 on Ubuntu 12.10. In my entire project, there is only one settings.py file, and in manage.py, I have this line os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hellodjango.settings") Of course, the…
0
votes
3 answers

Django Tutorial - Database setup - sqlite3 (Stuck..)

So, I'm here(Database setup) in the Django Tutorial 'Writing your first Django app, part 1'. Everything up to this point has gone fine, but now I'm stuck. I go into the outer mysite directory in DOS, and I type 'edit settings.py'. This creates a new…
Miles Bardan
  • 415
  • 3
  • 8
  • 17
0
votes
1 answer

Upload Django app and set database correctly

Hi I want to upload my django app to openshift rhc with git. After push and refresh the mainpage is displayed, however everything which needs user instance is not working. My error is: 'Ident authentication failed for user…
user1403568
  • 493
  • 1
  • 5
  • 14
0
votes
1 answer

What should django settings and urls look like for media and static deploying in production with heroku?

Currently, I have been having issues with getting my static and media to work with django on heroku. My static is finally working, but my media won't, and this is my first in any sort of production environment, so I'm not sure if it is done…
GetItDone
  • 566
  • 7
  • 22
0
votes
1 answer

eclipse django using wrong settings.py in pythonpath

I have pydev/django installed in eclipse, and it runs fine. However, after adding a second django project to eclipse and running the server ('http://127.0.0.1:8000') the pythonpath seems to be stuck on project2 even when I run project1. As a…
bcorso
  • 45,608
  • 10
  • 63
  • 75
0
votes
1 answer

Simple Activity Feed with Django and Redis

How can one build a simple activity feed using Django and Redis to store all the feed items for a particular user. I'm looking for a full in depth answer since there isn't much step by step instructions anywhere. For Example: Bob liked John's…
deadlock
  • 7,048
  • 14
  • 67
  • 115
0
votes
1 answer

Django Collectstatic command Changed something

So I've never deployed a Django app and I'm trying to get up to speed on the whole thing. I ran the collectstatic command and now non of my static files will render. When I run the findstatic command I receive an exception that…
harristrader
  • 1,181
  • 2
  • 13
  • 20
0
votes
1 answer

Changed Settings Config now Django Static files isnt working

So I updated my project settings with the following scheme PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) /settings base.py prod.py dev.py Is this the correct STATICFILES_DIRS settings for the above…
harristrader
  • 1,181
  • 2
  • 13
  • 20
0
votes
3 answers

from django.db import connection giving error in django1.4

I was trying to connect to the database by using the command from django.db import connection from the python shell but this produced the following Import error File "", line 1, in File…
nimeshkiranverma
  • 1,408
  • 6
  • 25
  • 48
0
votes
1 answer

django static_url vs media_url

In settings.py I got media_url = '/media/' and static_url = '/static/' In the urls.py I got: (r'^media/(?P.*)$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT,'show_indexes': True}), (r'^static/(?P.*)$',…
meso_2600
  • 1,940
  • 5
  • 25
  • 50