About 6,180,000 results
Open links in new tab
  1. How to get all fields for a Django model? - Stack Overflow

    Given a Django model, I'm trying to list all of its fields. I've seen some examples of doing this using the _meta model attribute, but doesn't the underscore in front of meta indicate that the …

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

  3. python - What is the difference between Django and Django Rest ...

    Now, Django vs Django Rest Framework. You can use Django alone to make REST APIs, but you have to write more code and do more design like one of the comment above showing in the …

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

  5. Django MEDIA_URL and MEDIA_ROOT - Stack Overflow

    Mar 29, 2017 · Learn how to configure Django's MEDIA_URL and MEDIA_ROOT settings for managing media files effectively in your project.

  6. How to change the Django default runserver port? - Stack Overflow

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

  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 …

  8. ImportError: cannot import name 'url' from 'django.conf.urls' after ...

    Dec 11, 2021 · Running which django-admin or django-admin --version might help you figure out what is going on. Use python -m django to ensure you use the correct django for your virtual …

  9. How do I include image files in Django templates? - Stack Overflow

    May 23, 2009 · I'm new to Django and I'm trying to learn it through a simple project. I'm developing a system called 'dubliners' and an app called 'book'. The directory structure is like …

  10. python - What is the path that Django uses for locating and …

    Contrary to some answers posted in this thread, adding 'DIRS': ['templates'] has no effect - it's redundant - since templates is the default path where Django looks for templates in each app.