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

    May 19, 2012 · The DJANGO_SETTINGS_MODULE environment variable controls which settings file Django will load. You therefore create separate configuration files for your respective environments …

  2. python - Django TemplateDoesNotExist? - Stack Overflow

    Dec 18, 2009 · My local machine is running Python 2.5 and Nginx on Ubuntu 8.10, with Django builded from latest development trunk. For every URL I request, it throws: TemplateDoesNotExist at …

  3. Running Django server on localhost - Stack Overflow

    Dec 11, 2017 · I would like to run a Django server locally using a local IP. I have localhost mapped here: $ head -n 1 /etc/hosts 127.0.0.1 localhost I have this chunk of code in my settings.py: import os

  4. How to do an OR filter in a Django query? - Stack Overflow

    item.creator = owner or item.moderated = False How would I do this in Django? (preferably with a filter or queryset).

  5. How do I write a single-file Django application? - Stack Overflow

    I want to write a very small Django application in a single file, requiring all the appropriate modules and stuff, and then be able to run that as a normal Python script, like this: $ python myapp...

  6. Newest 'django' Questions - Stack Overflow

    Feb 1, 2015 · Django is an open-source server-side web application framework written in Python. It is designed to reduce the effort required to create complex data-driven websites and web applications.

  7. What does on_delete do on Django models? - Stack Overflow

    Jul 15, 2016 · I'm quite familiar with Django, but I recently noticed there exists an on_delete=models.CASCADE option with the models. I have searched for the documentation for the …

  8. How to properly use the "choices" field option in Django

    You should seriously consider namespacing variables you use for choices in Django model fields; it should be apparent that the variable is related to a specific field in order to avoid confusing future …

  9. How can one use enums as a choice field in a Django model?

    Feb 21, 2019 · Enum member values are a tuple of arguments to use when constructing the concrete data type. Django supports adding an extra string value to the end of this tuple to be used as the …

  10. Django: TemplateSyntaxError: Could not parse the remainder

    Oct 17, 2016 · django.template.exceptions.TemplateSyntaxError: Could not parse the remainder: ':test' from 'my_app1:test' Because I didn't use quotes for my_app1:test with url tag as shown below.