summaryrefslogtreecommitdiff
path: root/news/models.py
AgeCommit message (Collapse)Author
2011-04-07Utilize Django 1.3 'on_delete' feature on several foreign keysDan McGee
The most important one here is PROTECT to keep people from making bone-headed plays and deleting an Arch or Repo and every package along with it. We can use this in a few other places, as well as some carefully placed SET_NULL indicators. Note that nothing here pushes deletion responsibilities down to the database, although that will probably happen in a future commit. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-07Consolidate caching black magicDan McGee
Get the stuff used to retrieve and refresh the latest date values all in the same place, and make it a bit more beautiful by refactoring it all into a common set of methods. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-07Use UTC datetime objects everywhereDan McGee
Rather than the twisted mix of local times and UTC times we currently have. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-07Ensure feed GUIDs are unchanging and uniqueDan McGee
Implement 'tag:' style URIs for the GUID field on our RSS feeds. This ensures new package updates show up as new, and we aren't jumping back and forth between generated GUIDs having 'http://' and 'https://' prefixes. Much of the work here is to attempt to keep old news GUIDs constant so we don't once again make everything show up as new in newsreaders. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-08Remove automatic ID column definitionsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13Connect post_save signals where they will always be triggeredDan McGee
We need to do this in the models.py files, otherwise the post_save signal might not be connected right away on launch of the application. Move them over there, add a dispatch_uid so it only gets hooked up once, and do some other function moving around so we don't have circular imports. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21Update news views to use slug instead of IDDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21Add migrations to populate the news slug and make it non-nullDan McGee
These should get us all set to have more useful URLs for the news items. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21Add news slug fieldDan McGee
Initially, this needs to allow null so that we can add in slugs for all of our old news items. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-15Spruce up news admin viewDan McGee
Add last modified date as a column, and fix up some other small display, sorting, and ordering issues. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-14Add last modified date to newsDan McGee
This will come in handy when determining whether resources are out of date, such as our news RSS feed. Also bump the Date fields to DateTime fields for sake of sorting and if we have more than one news item on the same date. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Move news model to an appropriate placeDan McGee
Never would have guessed it should actually be in news/models.py. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Put news under south controlDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-08Moved models aroundeliott
2007-12-29Removed import no longer used.eliott
2007-12-29Massive retab fest.eliott
Also added vim command comment to the end of files.
2007-12-22renamed importseliott
2007-11-03Initial import for public release...eliott
Special Note Prior to git import, approx 90% of the code was done by Judd Vinet. Thanks Judd!