diff --git a/src/accounts/forms.py b/src/accounts/forms.py index 5456ea9..f55d13a 100644 --- a/src/accounts/forms.py +++ b/src/accounts/forms.py @@ -62,7 +62,7 @@ class UserUpdateForm(UserForm): model = User fields = ('first_name', 'last_name', 'institution', 'role', 'twitter', 'facebook', - 'google_talk', 'identi_ca', 'webpage', 'bio') + 'google_talk', 'github', 'webpage', 'bio') twitter = SocialAccountField(url='https://twitter.com/', required=False) facebook = SocialAccountField(url='https://graph.facebook.com/', required=False) diff --git a/src/accounts/migrations/0010_auto__del_field_user_identi_ca__add_field_user_github.py b/src/accounts/migrations/0010_auto__del_field_user_identi_ca__add_field_user_github.py new file mode 100644 index 0000000..a7a696d --- /dev/null +++ b/src/accounts/migrations/0010_auto__del_field_user_identi_ca__add_field_user_github.py @@ -0,0 +1,79 @@ +# -*- 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): + # Deleting field 'User.identi_ca' + db.delete_column(u'accounts_user', 'identi_ca') + + # Adding field 'User.github' + db.add_column(u'accounts_user', 'github', + self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True), + keep_default=False) + + + def backwards(self, orm): + # Adding field 'User.identi_ca' + db.add_column(u'accounts_user', 'identi_ca', + self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True), + keep_default=False) + + # Deleting field 'User.github' + db.delete_column(u'accounts_user', 'github') + + + models = { + u'accounts.user': { + 'Meta': {'object_name': 'User'}, + 'bio': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75', 'blank': 'True'}), + 'facebook': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'github': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'google_talk': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'institution': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': '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'}), + 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'role': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), + 'verification_hash': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), + 'webpage': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}) + }, + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 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'}) + } + } + + complete_apps = ['accounts'] \ No newline at end of file diff --git a/src/accounts/models.py b/src/accounts/models.py index 00ca853..e530afa 100644 --- a/src/accounts/models.py +++ b/src/accounts/models.py @@ -20,8 +20,8 @@ class User(AbstractUser): twitter = models.CharField(max_length=128, null=True, blank=True) facebook = models.CharField(max_length=128, null=True, blank=True) google_talk = models.EmailField(null=True, blank=True) - identi_ca = models.CharField(max_length=128, null=True, blank=True, - verbose_name=u'identi.ca') + github = models.CharField(max_length=128, null=True, blank=True, + verbose_name=u'github') webpage = models.CharField(max_length=256, null=True, blank=True) verification_hash = models.CharField(max_length=32, null=True, blank=True) modified = models.DateTimeField(auto_now=True) diff --git a/src/accounts/templates/accounts/user_detail.html b/src/accounts/templates/accounts/user_detail.html index 018200a..4821af2 100644 --- a/src/accounts/templates/accounts/user_detail.html +++ b/src/accounts/templates/accounts/user_detail.html @@ -69,8 +69,8 @@
  • {{ user_.google_talk }}
  • {% endif %} - {% if user_.identi_ca %} -
  • {{ user_.identi_ca }}
  • + {% if user_.github %} +
  • {{ user_.github }}
  • {% endif %} {% if user_.webpage %} -- libgit2 0.21.2