About 59,500 results
Open links in new tab
  1. python - How to change the Django default runserver port

    As of Django 1.9, the simplest solution I have found (based on Quentin Stafford-Fraser's solution) is to add a few lines to manage.py which dynamically modify the default port number before …

  2. python - How to check Django version - Stack Overflow

    Jun 24, 2011 · I have to use Python and Django for our application. So, I have two versions of Python, 2.6 and 2.7. Now I have installed Django. I could run the sample application for testing …

  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: …

  4. python - How to properly use the "choices" field option in Django ...

    10 I would suggest to use django-model-utils instead of Django built-in solution. The main advantage of this solution is the lack of string declaration duplication. All choice items are …

  5. python - How do I call a Django function on button click ... - Stack ...

    I am trying to write a Django application and I am stuck at how I can call a view function when a button is clicked. In my template, I have a link button as below, when clicked it takes you to a

  6. python - Format numbers in django templates - Stack Overflow

    Dec 7, 2008 · The string format (the python) way because you cannot use this directly in templates - you would have to put this in a template tag (which is a fine answer), but just …

  7. python - How to debug in Django, the good way? - Stack Overflow

    Jul 13, 2009 · But the Python Debugger (pdb) is highly recommended for all types of Python code. If you are already into pdb, you'd also want to have a look at IPDB that uses ipython for …

  8. How to execute a Python script from the Django shell?

    The django shell is the good way to execute a python module with the django environment, but it is not always easy and tiresome to import modules and execute functions manually especially …

  9. No module named django but it is installed - Stack Overflow

    This is the most Pythonic way Try to install Django using built-in pip module: python -m pip install django This command should install packages into site-packages directory. You may also add …

  10. python - How can one use enums as a choice field in a Django …

    Feb 21, 2019 · Django supports adding an extra string value to the end of this tuple to be used as the human-readable name, or label. The label can be a lazy translatable string.