summaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authoreliott <eliott@cactuswax.net>2008-03-08 00:13:41 -0800
committereliott <eliott@cactuswax.net>2008-03-08 00:13:41 -0800
commit9b7b5122544283fc32d81d785e94c5f4aacc0109 (patch)
treeba117f7fadc24737920fa4f1b9a711157e629cc5 /news
parent7e2d0f2f0cd8f176cf82c02d704ad4fe25a07b3b (diff)
Moved models around
Diffstat (limited to 'news')
-rw-r--r--news/models.py21
-rw-r--r--news/views.py4
2 files changed, 2 insertions, 23 deletions
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.shortcuts import get_object_or_404
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):