Hi,
I'm working with Python 3 and I have installed "MySQL-for-Python-3" in order to work with my SQL databases.
I have created the model in model.py:
from django.db import models
from django.contrib.auth.models import User
from django.db.models import signals
class Client(models.Model):
user = models.OneToOneField(User, null=True, blank=True)
birthday = models.DateField(null=True, blank=True)
name = models.CharField(max_length = 100)
def __unicode__(self):
return self.name
def create_reg_user_callback(sender, instance, **kwargs):
reg, new = Client.objects.get_or_create(user = instance)
signals.post_save.connect(create_reg_user_callback, User)
as well as the admin.py
from django.contrib import admin
from project_vitamine.reg.models import Client
admin.site.register(Client)
Now if I try to go to maypage.admin I get the rror
django.db.utils.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%s AND `django_session`.`expire_date` > %s )' at line 1")
What am I missing here?