Top "Django" questions

Django is an open-source server-side web application framework written in Python.

Django auto_now and auto_now_add

For Django 1.1. I have this in my models.py: class User(models.Model): created = models.DateTimeField(auto_now_add=True) …

python django datetime django-models django-admin
Embed YouTube video - Refused to display in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'

I am trying to feed my Django page with some resource I am getting from somewhere else. Inside the feed, …

html django video youtube youtube-api
Django set default form values

I have a Model as follows: class TankJournal(models.Model): user = models.ForeignKey(User) tank = models.ForeignKey(TankProfile) ts = models.…

python django django-models django-forms
Django - iterate number in for loop of a template

I have the following for loop in my django template displaying days. I wonder, whether it's possible to iterate a …

django for-loop django-templates
django MultiValueDictKeyError error, how do I deal with it

I'm trying to save a object to my database, but it's throwing a MultiValueDictKeyError error. The problems lies within the …

python django exception
Django Server Error: port is already in use

Restarting the Django server displays the following error: this port is already running.... This problem occurs specifically on Ubuntu and …

python django
How to debug in Django, the good way?

So, I started learning to code in Python and later Django. The first times it was hard looking at tracebacks …

python django debugging
Best practices for adding .gitignore file for Python projects?

I'm trying to collect some of my default settings, and one thing I realized I don't have a standard for …

python django git pygtk gitignore
How to check if a user is logged in (how to properly use user.is_authenticated)?

I am looking over this website but just can't seem to figure out how to do this as it's not …

python django authentication
Numeric for loop in Django templates

How do I write a numeric for loop in a Django template? I mean something like for i = 1 to n

django django-templates