Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
greenskeleton
Apr 5, 2003

ashgromnies posted:

But how can I do that since the PublishDate is a DateTimeField and I only want to compare the day, month and year and not the time?

http://www.djangoproject.com/documentation/model-api/#unique-for-date

Would that be what you're looking for?

Adbot
ADBOT LOVES YOU

greenskeleton
Apr 5, 2003
It's not working because of the "auto_now_add=True" in the PublishDate. If you manually create the same date for the post, it will raise an error and prompt you to change the slug.

As for how to get Django to behave probably requires a fix in Django.

greenskeleton
Apr 5, 2003
http://www.youtube.com/view_play_list?p=D415FAF806EC47A1

A more comprehensive list.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply