About 50 results
Open links in new tab
  1. How to do an OR filter in a Django query? - Stack Overflow

    How would I do this in Django? (preferably with a filter or queryset).

  2. 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 …

  3. 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 …

  4. 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 …

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

    Create any database which you want to use on your Django Project. Edit your settings.py file like: Copy ... Install the following packages in the virtualenv (if you're using django on virtualenv, which is more …

  6. python - Django auto_now and auto_now_add - Stack Overflow

    239 But I wanted to point out that the opinion expressed in the accepted answer is somewhat outdated. According to more recent discussions (django bugs #7634 and #12785), auto_now and …

  7. ImportError: No module named 'django.core.urlresolvers'

    Apr 26, 2021 · Note that Django 2.0 removes some features that previously were in django.core.urlresolvers, so you might have to make some more changes before your code works. …

  8. python - Uninstall Django completely - Stack Overflow

    Jan 3, 2014 · I uninstalled django on my machine using pip uninstall Django. It says successfully uninstalled whereas when I see django version in python shell, it still gives the older version I …

  9. 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

  10. Unable to import path from django.urls - Stack Overflow

    Tried to run command: from django.urls import path Getting error: Traceback (most recent call last): File "< stdin >", line 1, in ImportError: cannot import name 'path' I am using django