About 63,900 results
Open links in new tab
  1. Django: How to manage development and production settings?

    May 19, 2012 · Here's how: As noted in the Django documentation: The value of DJANGO_SETTINGS_MODULE should be in Python path syntax, e.g. mysite.settings. Note that the …

  2. Can I access constants in settings.py from templates in Django?

    Django provides access to certain, frequently-used settings constants to the template such as settings.MEDIA_URL and some of the language settings if you use django's built in generic views or …

  3. How to manage local vs production settings in Django?

    Oct 27, 2009 · If I set the DJANGO_SETTINGS_MODULE through an environmental variable, do I still need os.environ.setdefault ("DJANGO_SETTINGS_MODULE", "projectname.settings.production") in …

  4. python - How to set the timezone in Django - Stack Overflow

    Mar 28, 2015 · I found this question looking to change the timezone in my Django project's settings.py file to the United Kingdom. Using the tz database in jfs' solution I found the answer:

  5. python - Django Local Settings - Stack Overflow

    Jan 27, 2013 · local_settings.py (or more commonly prod_settings.py) is NOT in version control, and used in production by specifying --settings=prod_settings or similar. Touching the stock settings file …

  6. Using a settings file other than settings.py in Django

    Mar 29, 2011 · I want to use a different settings file in django -- specifically settings_prod -- yet whenever I try to do a syncdb with --settings=settings_prod, it complains: python2.6 manage.py …

  7. How to import a Django project settings.py Python file from a sub ...

    from django.core.management import setup_environ import settings setup_environ(settings) This works fine if the script is in the root directory of my project. I tried the following two hacks to import the …

  8. django settings per application - best practice? - Stack Overflow

    this is somewhat related to this question Why is django's settings object a LazyObject? In my django project i have several applications. Each application can have its own non-trivial settings...

  9. python - Setting Django up to use MySQL - Stack Overflow

    From here you can see your databases and access them using very friendly GUI. Create any database which you want to use on your Django Project. Edit your settings.py file like: bash Copy

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

    May 31, 2017 · Something relevant: if you have several instances of settings_something.py due to a project deployed in several environments, do not try to import from app.settings. Overwritten …