Django 1.2 DateField admin site problem -


Therefore, I am creating a Django 1.2 app, and I am having problems with the admin site. Import the users from django.db import model from Django.contrib.auth.models.modules.py:

  import datetime class Dailysales (models.Model): salesdate = models.DateField (primary_key = True) ... def __unicode __ (self): Returns self.salesdate.strftime ("% B /% d /% Y")  

My problem is that in the admin site , The area of ​​sale is being shown as text input, as far as I can tell the exact same thing with Django 1.1, and it gave me the date picture widget. I do not know whether it relates to 1.2 or I have made a mistake for some other reasons, but I'm not sure what I can see, because I think all the documents say that it should only work. If the model says that this is a datefiled, then why is it necessary to cause the admin page to be a datepeak? There is no indication on where to check.


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -