Top "Django-settings" questions

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.

How to set up a PostgreSQL database in Django

I'm new to Python and Django. I'm configuring a Django project using a PostgreSQL database engine backend, But I'm getting …

python django postgresql psycopg2 django-settings
Can I access constants in settings.py from templates in Django?

I have some stuff in settings.py that I'd like to be able to access from a template, but I …

django django-templates django-settings
sqlite3.OperationalError: unable to open database file

I get this error when setting up a server in Django. It is sqlite3 which means it should create the .…

python database django sqlite django-settings
Django - after login, redirect user to his custom page --> mysite.com/username

By default after login django redirects the user to an accounts/profile page or if you edit the LOGIN_REDIRECT_…

django django-views django-urls django-settings
How can I correctly set DJANGO_SETTINGS_MODULE for my Django project (I am using virtualenv)?

I am having some trouble setting the DJANGO_SETTINGS_MODULE for my Django project. I have a directory at ~/dev/…

django django-settings
How do I reference a Django settings variable in my models.py?

This is a very beginner question. But I'm stumped. How do I reference a Django settings variable in my model.…

django django-models django-settings
What's the difference between `from django.conf import settings` and `import settings` in a Django project

I'm reading up that most people do from django.conf import settings but I don't undertstand the difference to simply …

python django django-settings
Simple Log to File example for django 1.3+

The release notes say: Django 1.3 adds framework-level support for Python’s logging module. That's nice. I'd like to take advantage …

django django-settings
Why is Django throwing error "DisallowedHost at /"?

I am setting up my own Django server using this Digital Ocean tutorial. I created the Django framework following each …

python django django-settings