From 9b7b5122544283fc32d81d785e94c5f4aacc0109 Mon Sep 17 00:00:00 2001 From: eliott Date: Sat, 8 Mar 2008 00:13:41 -0800 Subject: Moved models around --- news/models.py | 21 --------------------- news/views.py | 4 ++-- 2 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 news/models.py (limited to 'news') diff --git a/news/models.py b/news/models.py deleted file mode 100644 index b8709b48..00000000 --- a/news/models.py +++ /dev/null @@ -1,21 +0,0 @@ -from django.db import models -from django.contrib.auth.models import User -import re - -class News(models.Model): - id = models.AutoField(primary_key=True) - author = models.ForeignKey(User) - postdate = models.DateField(auto_now_add=True) - title = models.CharField(maxlength=255) - content = models.TextField() - class Meta: - db_table = 'news' - verbose_name_plural = 'news' - get_latest_by = 'postdate' - ordering = ['-postdate', '-id'] - - def get_absolute_url(self): - return '/news/%i/' % self.id - -# vim: set ts=4 sw=4 et: - diff --git a/news/views.py b/news/views.py index b618e2f9..cfa2bcd7 100644 --- a/news/views.py +++ b/news/views.py @@ -3,8 +3,8 @@ from django.contrib.auth.decorators import user_passes_test from django.contrib.auth.models import User from django import forms -from archweb_dev.lib.utils import render_response -from archweb_dev.news.models import News +from archweb_dev.main.utils import render_response +from archweb_dev.main.models import News from datetime import date def view(request, newsid): -- cgit v1.2.3-54-g00ecf