This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merging Bug 937673 - Modify groups model to allow user-created curate…
…d groups
- Loading branch information
Showing
23 changed files
with
1,497 additions
and
176 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
182 changes: 182 additions & 0 deletions
182
...migrations/0012_auto__add_field_group_curator__add_field_group_members_can_leave__add_.py
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,182 @@ | ||
# -*- coding: utf-8 -*- | ||
from south.db import db | ||
from south.v2 import SchemaMigration | ||
|
||
from django.db import models | ||
|
||
|
||
class Migration(SchemaMigration): | ||
|
||
def forwards(self, orm): | ||
# Adding field 'Group.curator' | ||
db.add_column('groups_group', 'curator', | ||
self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='groups_curated', null=True, on_delete=models.SET_NULL, to=orm['users.UserProfile']), | ||
keep_default=False) | ||
|
||
# Adding field 'Group.members_can_leave' | ||
db.add_column('groups_group', 'members_can_leave', | ||
self.gf('django.db.models.fields.BooleanField')(default=True), | ||
keep_default=False) | ||
|
||
# Adding field 'Group.accepting_new_members' | ||
db.add_column('groups_group', 'accepting_new_members', | ||
self.gf('django.db.models.fields.CharField')(default='by_request', max_length=10), | ||
keep_default=False) | ||
|
||
# Adding field 'Group.functional_area' | ||
db.add_column('groups_group', 'functional_area', | ||
self.gf('django.db.models.fields.BooleanField')(default=False), | ||
keep_default=False) | ||
|
||
def backwards(self, orm): | ||
# Deleting field 'Group.curator' | ||
db.delete_column('groups_group', 'curator_id') | ||
|
||
# Deleting field 'Group.members_can_leave' | ||
db.delete_column('groups_group', 'members_can_leave') | ||
|
||
# Deleting field 'Group.accepting_new_members' | ||
db.delete_column('groups_group', 'accepting_new_members') | ||
|
||
# Deleting field 'Group.functional_area' | ||
db.delete_column('groups_group', 'functional_area') | ||
|
||
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'}) | ||
}, | ||
'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'}) | ||
}, | ||
'groups.group': { | ||
'Meta': {'ordering': "['name']", 'object_name': 'Group'}, | ||
'accepting_new_members': ('django.db.models.fields.CharField', [], {'default': "'by_request'", 'max_length': '10'}), | ||
'always_auto_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'auto_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), | ||
'curator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'groups_curated'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['users.UserProfile']"}), | ||
'description': ('django.db.models.fields.TextField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), | ||
'functional_area': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'irc_channel': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}), | ||
'members_can_leave': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), | ||
'steward': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'groups_stewarded'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['users.UserProfile']"}), | ||
'system': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), | ||
'url': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'blank': 'True'}), | ||
'website': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200', 'blank': 'True'}), | ||
'wiki': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200', 'blank': 'True'}) | ||
}, | ||
'groups.groupalias': { | ||
'Meta': {'object_name': 'GroupAlias'}, | ||
'alias': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'aliases'", 'to': "orm['groups.Group']"}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}), | ||
'url': ('autoslug.fields.AutoSlugField', [], {'unique': 'True', 'max_length': '50', 'populate_from': "'name'", 'unique_with': '()', 'blank': 'True'}) | ||
}, | ||
'groups.language': { | ||
'Meta': {'ordering': "['name']", 'object_name': 'Language'}, | ||
'always_auto_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'auto_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), | ||
'url': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'blank': 'True'}) | ||
}, | ||
'groups.languagealias': { | ||
'Meta': {'object_name': 'LanguageAlias'}, | ||
'alias': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'aliases'", 'to': "orm['groups.Language']"}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}), | ||
'url': ('autoslug.fields.AutoSlugField', [], {'unique': 'True', 'max_length': '50', 'populate_from': "'name'", 'unique_with': '()', 'blank': 'True'}) | ||
}, | ||
'groups.skill': { | ||
'Meta': {'ordering': "['name']", 'object_name': 'Skill'}, | ||
'always_auto_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'auto_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}), | ||
'url': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'blank': 'True'}) | ||
}, | ||
'groups.skillalias': { | ||
'Meta': {'object_name': 'SkillAlias'}, | ||
'alias': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'aliases'", 'to': "orm['groups.Skill']"}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}), | ||
'url': ('autoslug.fields.AutoSlugField', [], {'unique': 'True', 'max_length': '50', 'populate_from': "'name'", 'unique_with': '()', 'blank': 'True'}) | ||
}, | ||
'users.userprofile': { | ||
'Meta': {'ordering': "['full_name']", 'object_name': 'UserProfile', 'db_table': "'profile'"}, | ||
'allows_community_sites': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), | ||
'allows_mozilla_sites': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), | ||
'basket_token': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '1024', 'blank': 'True'}), | ||
'bio': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), | ||
'city': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), | ||
'country': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}), | ||
'date_mozillian': ('django.db.models.fields.DateField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), | ||
'date_vouched': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), | ||
'full_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), | ||
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'members'", 'blank': 'True', 'to': "orm['groups.Group']"}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'ircname': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}), | ||
'is_vouched': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'languages': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'members'", 'blank': 'True', 'to': "orm['groups.Language']"}), | ||
'last_updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}), | ||
'photo': ('sorl.thumbnail.fields.ImageField', [], {'default': "''", 'max_length': '100', 'blank': 'True'}), | ||
'privacy_bio': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_city': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_country': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_date_mozillian': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_email': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_full_name': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_groups': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_ircname': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_languages': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_photo': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_region': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_skills': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_timezone': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_title': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_tshirt': ('mozillians.users.models.PrivacyField', [], {'default': '1'}), | ||
'privacy_vouched_by': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'privacy_website': ('mozillians.users.models.PrivacyField', [], {'default': '3'}), | ||
'region': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), | ||
'skills': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'members'", 'blank': 'True', 'to': "orm['groups.Skill']"}), | ||
'timezone': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100', 'blank': 'True'}), | ||
'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '70', 'blank': 'True'}), | ||
'tshirt': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}), | ||
'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}), | ||
'vouched_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vouchees'", 'on_delete': 'models.SET_NULL', 'default': 'None', 'to': "orm['users.UserProfile']", 'blank': 'True', 'null': 'True'}), | ||
'website': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200', 'blank': 'True'}) | ||
} | ||
} | ||
|
||
complete_apps = ['groups'] |
Oops, something went wrong.