text: # -*- coding: utf-8 -*-
  # Copyright 2013 UNED
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #    http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  from south.db import db
  from south.v2 import SchemaMigration
  
  
  class Migration(SchemaMigration):
  
      def forwards(self, orm):
          # Adding field 'Category.banner'
          db.add_column('categories_category', 'banner',
                        self.gf('django.db.models.fields.files.ImageField')(max_length=100, null=True, blank=True),
                        keep_default=False)
  
          # Adding field 'Category.only_admins'
          db.add_column('categories_category', 'only_admins',
                        self.gf('django.db.models.fields.BooleanField')(default=False),
                        keep_default=False)
  
      def backwards(self, orm):
          # Deleting field 'Category.banner'
          db.delete_column('categories_category', 'banner')
  
          # Deleting field 'Category.only_admins'
          db.delete_column('categories_category', 'only_admins')
  
      models = {
          'auth.group': {
              'Meta': {'object_name': 'Group'},
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
              'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
          },
          'auth.permission': {
              'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
              'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
          },
          'auth.user': {
              'Meta': {'object_name': 'User'},
              'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
              'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
              'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
              'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
              'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
              'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
              'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
              'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
              'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
          },
          'badges.badge': {
              'Meta': {'ordering': "['-modified', '-created']", 'object_name': 'Badge'},
              'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
              'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
              'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
              'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
          },
          'categories.category': {
              'Meta': {'object_name': 'Category'},
              'banner': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
              'courses': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'categories'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['courses.Course']"}),
              'icon': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
              'only_admins': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
          },
          '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'}),
              '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'})
          },
          'courses.course': {
              'Meta': {'ordering': "['order']", 'object_name': 'Course'},
              'certification_available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'certification_banner': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
              'completion_badge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'course'", 'unique': 'True', 'null': 'True', 'to': "orm['badges.Badge']"}),
              'description': ('tinymce.models.HTMLField', [], {}),
              'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
              'enrollment_method': ('django.db.models.fields.CharField', [], {'default': "'free'", 'max_length': '200'}),
              'estimated_effort': ('tinymce.models.HTMLField', [], {'null': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'intended_audience': ('tinymce.models.HTMLField', [], {'null': 'True', 'blank': 'True'}),
              'learning_goals': ('tinymce.models.HTMLField', [], {'blank': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
              'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'}),
              'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'courses_as_owner'", 'to': "orm['auth.User']"}),
              'promotion_video': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
              'requirements': ('tinymce.models.HTMLField', [], {'blank': 'True'}),
              'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
              'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
              'students': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'courses_as_student'", 'blank': 'True', 'to': "orm['auth.User']"}),
              'teachers': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'courses_as_teacher'", 'symmetrical': 'False', 'through': "orm['courses.CourseTeacher']", 'to': "orm['auth.User']"}),
              'threshold': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '4', 'decimal_places': '2', 'blank': 'True'})
          },
          'courses.courseteacher': {
              'Meta': {'ordering': "['order']", 'object_name': 'CourseTeacher'},
              'course': ('adminsortable.fields.SortableForeignKey', [], {'to': "orm['courses.Course']"}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'}),
              'teacher': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
          }
      }
  
      complete_apps = ['categories']
  