mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Messed up model definition, caused errors in migrations
This commit is contained in:
@@ -11,9 +11,9 @@ class Migration(SchemaMigration):
|
|||||||
# Adding model 'SSOUserNote'
|
# Adding model 'SSOUserNote'
|
||||||
db.create_table('sso_ssousernote', (
|
db.create_table('sso_ssousernote', (
|
||||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||||
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='notes', to_field='User', to=orm['auth.User'])),
|
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='notes', to=orm['auth.User'])),
|
||||||
('note', self.gf('django.db.models.fields.TextField')()),
|
('note', self.gf('django.db.models.fields.TextField')()),
|
||||||
('created_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], to_field='Created By')),
|
('created_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
|
||||||
('date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
|
('date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
|
||||||
))
|
))
|
||||||
db.send_create_signal('sso', ['SSOUserNote'])
|
db.send_create_signal('sso', ['SSOUserNote'])
|
||||||
@@ -88,11 +88,11 @@ class Migration(SchemaMigration):
|
|||||||
},
|
},
|
||||||
'sso.ssousernote': {
|
'sso.ssousernote': {
|
||||||
'Meta': {'object_name': 'SSOUserNote'},
|
'Meta': {'object_name': 'SSOUserNote'},
|
||||||
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'to_field': "'Created By'"}),
|
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
|
||||||
'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
'note': ('django.db.models.fields.TextField', [], {}),
|
'note': ('django.db.models.fields.TextField', [], {}),
|
||||||
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to_field': "'User'", 'to': "orm['auth.User']"})
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notes'", 'to': "orm['auth.User']"})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -121,9 +121,9 @@ signals.post_save.connect(SSOUser.create_user_profile, sender=User)
|
|||||||
class SSOUserNote(models.Model):
|
class SSOUserNote(models.Model):
|
||||||
""" Notes bound to a user's account. Used to store information regarding the user """
|
""" Notes bound to a user's account. Used to store information regarding the user """
|
||||||
|
|
||||||
user = models.ForeignKey(User, "User", blank=False, null=False, related_name='notes')
|
user = models.ForeignKey(User, blank=False, null=False, related_name='notes')
|
||||||
note = models.TextField("Note", blank=False, null=False)
|
note = models.TextField("Note", blank=False, null=False)
|
||||||
created_by = models.ForeignKey(User, "Created By", blank=False, null=False)
|
created_by = models.ForeignKey(User, blank=False, null=False)
|
||||||
date_created = models.DateTimeField(auto_now_add=True, blank=False, null=False,
|
date_created = models.DateTimeField(auto_now_add=True, blank=False, null=False,
|
||||||
verbose_name="Date/Time the note was added",
|
verbose_name="Date/Time the note was added",
|
||||||
help_text="Shows the date and time the note was added to the account")
|
help_text="Shows the date and time the note was added to the account")
|
||||||
|
|||||||
Reference in New Issue
Block a user