diff options
Diffstat (limited to 'news')
-rw-r--r-- | news/models.py | 21 | ||||
-rw-r--r-- | news/views.py | 4 |
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): |