Permalink
Browse files

Updated django. Added a featured bool to articles for frontpgae displ…

…ay. Added lightbox.
  • Loading branch information...
1 parent b0d4d40 commit e4b6d6d06987eb9313d8d02b2bfdb284be4013fb @mrbichel committed Feb 26, 2014
@@ -0,0 +1,106 @@
+# -*- 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 field 'ATag.title'
+ db.add_column(u'articles_atag', 'title',
+ self.gf('django.db.models.fields.CharField')(default='', max_length=100, blank=True),
+ keep_default=False)
+
+ # Adding unique constraint on 'ATag', fields ['name']
+ db.create_unique(u'articles_atag', ['name'])
+
+ # Adding field 'Article.featured'
+ db.add_column(u'articles_article', 'featured',
+ self.gf('django.db.models.fields.BooleanField')(default=True),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Removing unique constraint on 'ATag', fields ['name']
+ db.delete_unique(u'articles_atag', ['name'])
+
+ # Deleting field 'ATag.title'
+ db.delete_column(u'articles_atag', 'title')
+
+ # Deleting field 'Article.featured'
+ db.delete_column(u'articles_article', 'featured')
+
+
+ models = {
+ u'articles.article': {
+ 'Meta': {'ordering': "['-pub_date']", 'unique_together': "(('slug', 'pub_date'),)", 'object_name': 'Article'},
+ 'add_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'body': ('django.db.models.fields.TextField', [], {}),
+ 'featured': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'files': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['files.File']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'images': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['files.Image']", 'symmetrical': 'False', 'through': u"orm['articles.ArticleImage']", 'blank': 'True'}),
+ 'mod_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'project_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'pub_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '200'}),
+ 'status': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'subtitle': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'vimeo': ('django.db.models.fields.URLField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
+ },
+ u'articles.articleimage': {
+ 'Meta': {'object_name': 'ArticleImage'},
+ 'article': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['articles.Article']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['files.Image']"}),
+ 'priority': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'})
+ },
+ u'articles.atag': {
+ 'Meta': {'object_name': 'ATag'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_category': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
+ },
+ u'articles.taggedarticle': {
+ 'Meta': {'object_name': 'TaggedArticle'},
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'articles_taggedarticle_tagged_items'", 'to': u"orm['contenttypes.ContentType']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
+ 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'articles_taggedarticle_items'", 'to': u"orm['articles.ATag']"})
+ },
+ u'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ u'files.file': {
+ 'Meta': {'ordering': "['-upload_date']", 'object_name': 'File'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'mod_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'upload_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'})
+ },
+ u'files.image': {
+ 'Meta': {'ordering': "['-upload_date']", 'object_name': 'Image'},
+ 'creator': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'file': ('sorl.thumbnail.fields.ImageField', [], {'max_length': '100'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'mod_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'upload_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'})
+ }
+ }
+
+ complete_apps = ['articles']
@@ -0,0 +1,15 @@
+## Lightbox2
+by Lokesh Dhakar | [lokeshdhakar.com](http://www.lokeshdhakar.com) | [twitter.com/lokesh](http://twitter.com/lokesh)
+
+### Information and support
+For examples, downloads, and information on using Lightbox, visit the Lightbox2 homepage:
+[http://lokeshdhakar.com/projects/lightbox2/](http://lokeshdhakar.com/projects/lightbox2/)
+
+For personal support issues and feature requests, visit the Lightbox forums:
+[http://lokeshdhakar.com/forums/](http://lokeshdhakar.com/forums/)
+
+### License
+Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
+
+* Free for use in both personal and commercial projects.
+* Attribution requires leaving author name, author homepage link, and the license info intact.
@@ -0,0 +1,202 @@
+/* line 7, ../sass/lightbox.sass */
+body:after {
+ content: url(../img/close.png) url(../img/loading.gif) url(../img/prev.png) url(../img/next.png);
+ display: none;
+}
+
+/* line 11, ../sass/lightbox.sass */
+.lightboxOverlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 9999;
+ background-color: black;
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
+ opacity: 0.8;
+ display: none;
+}
+
+/* line 20, ../sass/lightbox.sass */
+.lightbox {
+ position: absolute;
+ left: 0;
+ width: 100%;
+ z-index: 10000;
+ text-align: center;
+ line-height: 0;
+ font-weight: normal;
+}
+/* line 28, ../sass/lightbox.sass */
+.lightbox .lb-image {
+ display: block;
+ height: auto;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ -ms-border-radius: 3px;
+ -o-border-radius: 3px;
+ border-radius: 3px;
+}
+/* line 32, ../sass/lightbox.sass */
+.lightbox a img {
+ border: none;
+}
+
+/* line 35, ../sass/lightbox.sass */
+.lb-outerContainer {
+ position: relative;
+ background-color: white;
+ *zoom: 1;
+ width: 250px;
+ height: 250px;
+ margin: 0 auto;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -o-border-radius: 4px;
+ border-radius: 4px;
+}
+/* line 38, ../../../../.rvm/gems/ruby-1.9.3-p392/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */
+.lb-outerContainer:after {
+ content: "";
+ display: table;
+ clear: both;
+}
+
+/* line 44, ../sass/lightbox.sass */
+.lb-container {
+ padding: 4px;
+}
+
+/* line 47, ../sass/lightbox.sass */
+.lb-loader {
+ position: absolute;
+ top: 43%;
+ left: 0%;
+ height: 25%;
+ width: 100%;
+ text-align: center;
+ line-height: 0;
+}
+
+/* line 56, ../sass/lightbox.sass */
+.lb-cancel {
+ display: block;
+ width: 32px;
+ height: 32px;
+ margin: 0 auto;
+ background: url(../img/loading.gif) no-repeat;
+}
+
+/* line 63, ../sass/lightbox.sass */
+.lb-nav {
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 100%;
+ width: 100%;
+ z-index: 10;
+}
+
+/* line 71, ../sass/lightbox.sass */
+.lb-container > .nav {
+ left: 0;
+}
+
+/* line 74, ../sass/lightbox.sass */
+.lb-nav a {
+ outline: none;
+}
+
+/* line 77, ../sass/lightbox.sass */
+.lb-prev, .lb-next {
+ width: 49%;
+ height: 100%;
+ cursor: pointer;
+ /* Trick IE into showing hover */
+ display: block;
+}
+
+/* line 84, ../sass/lightbox.sass */
+.lb-prev {
+ left: 0;
+ float: left;
+}
+/* line 87, ../sass/lightbox.sass */
+.lb-prev:hover {
+ background: url(../img/prev.png) left 48% no-repeat;
+}
+
+/* line 90, ../sass/lightbox.sass */
+.lb-next {
+ right: 0;
+ float: right;
+}
+/* line 93, ../sass/lightbox.sass */
+.lb-next:hover {
+ background: url(../img/next.png) right 48% no-repeat;
+}
+
+/* line 96, ../sass/lightbox.sass */
+.lb-dataContainer {
+ margin: 0 auto;
+ padding-top: 5px;
+ *zoom: 1;
+ width: 100%;
+ -moz-border-radius-bottomleft: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+}
+/* line 38, ../../../../.rvm/gems/ruby-1.9.3-p392/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */
+.lb-dataContainer:after {
+ content: "";
+ display: table;
+ clear: both;
+}
+
+/* line 103, ../sass/lightbox.sass */
+.lb-data {
+ padding: 0 4px;
+ color: #bbbbbb;
+}
+/* line 106, ../sass/lightbox.sass */
+.lb-data .lb-details {
+ width: 85%;
+ float: left;
+ text-align: left;
+ line-height: 1.1em;
+}
+/* line 111, ../sass/lightbox.sass */
+.lb-data .lb-caption {
+ font-size: 13px;
+ font-weight: bold;
+ line-height: 1em;
+}
+/* line 115, ../sass/lightbox.sass */
+.lb-data .lb-number {
+ display: block;
+ clear: left;
+ padding-bottom: 1em;
+ font-size: 12px;
+ color: #999999;
+}
+/* line 121, ../sass/lightbox.sass */
+.lb-data .lb-close {
+ display: block;
+ float: right;
+ width: 30px;
+ height: 30px;
+ background: url(../img/close.png) top right no-repeat;
+ text-align: right;
+ outline: none;
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
+ opacity: 0.7;
+}
+/* line 130, ../sass/lightbox.sass */
+.lb-data .lb-close:hover {
+ cursor: pointer;
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
+ opacity: 1;
+}
Oops, something went wrong.

0 comments on commit e4b6d6d

Please sign in to comment.