Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the base URL's for the news entrys, changed the model so that t…
…he title of each news entry has to be unique, and changed the news fixture to not load the django_generic_flatblocks data since it isn't needed
- Loading branch information
Showing
5 changed files
with
45 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- coding: utf-8 -*- | ||
import datetime | ||
from south.db import db | ||
from south.v2 import SchemaMigration | ||
from django.db import models | ||
|
||
|
||
class Migration(SchemaMigration): | ||
|
||
def forwards(self, orm): | ||
|
||
# Adding unique constraint on 'Entry', fields ['title'] | ||
db.create_unique('news_entry', ['title']) | ||
|
||
def backwards(self, orm): | ||
|
||
# Removing unique constraint on 'Entry', fields ['title'] | ||
db.delete_unique('news_entry', ['title']) | ||
|
||
models = { | ||
'news.entry': { | ||
'Meta': {'object_name': 'Entry'}, | ||
'content': ('django.db.models.fields.TextField', [], {'blank': 'True'}), | ||
'frontpage': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'}), | ||
'pub_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'blank': 'True'}), | ||
'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) | ||
} | ||
} | ||
|
||
complete_apps = ['news'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from django.conf.urls.defaults import * | ||
|
||
urlpatterns = patterns('', | ||
# url(r'^list/$', 'news.views.list', name="news_list"), | ||
#url(r'^entry/(?P<title>[\w-]+)/$', 'news.views.entry', name="news_entry"), | ||
|
||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters