I want to store some things in a database, and am using the current session as a foreign key: from models.py
class Visited(models.Model): session = model
if you want to destroy session i would suggest a better idea is first use django shell.
from django.contrib.sessions.models import Session Session.objects.all() #you see all sessions Session.objects.all().delete()
in last query you can filter according to your need. and hit a query