coding utf-8 from south utils import datetime_utils as datetime from s

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'Opros'
db.delete_table('action_hierarchy_opros')
# Adding model 'Survey'
db.create_table('action_hierarchy_opros', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'gallup', unique=True, to=orm['action_user.User'])),
('stageur', self.gf('django.db.models.fields.IntegerField')()),
('period', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gallup.Period'])),
))
db.send_create_signal(u'gallup', ['Survey'])
# Changing field 'Answer.opros'
db.alter_column(u'gallup_answer', 'opros_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gallup.Survey']))
def backwards(self, orm):
# Adding model 'Opros'
db.create_table('action_hierarchy_opros', (
('stageur', self.gf('django.db.models.fields.IntegerField')()),
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'gallup', unique=True, to=orm['action_user.User'])),
))
db.send_create_signal(u'gallup', ['Opros'])
# Deleting model 'Survey'
db.delete_table('action_hierarchy_opros')
# Changing field 'Answer.opros'
db.alter_column(u'gallup_answer', 'opros_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['gallup.Opros']))
models = {
u'action_hierarchy.department': {
'Meta': {'object_name': 'Department'},
'boss': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'department_boss'", 'to': u"orm['action_hierarchy.Employee']"}),
'dep_type': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'people': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "u'departments'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['action_hierarchy.Employee']"}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True', 'blank': 'True'})
},
u'action_hierarchy.employee': {
'Meta': {'ordering': "('last_name', 'first_name')", 'object_name': 'Employee'},
'birthday': ('django.db.models.fields.DateField', [], {}),
'date_end_work': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'date_start_work': ('django.db.models.fields.DateField', [], {}),
'department': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['action_hierarchy.Subdivision']"}),
'director': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'employee_to_director'", 'null': 'True', 'to': u"orm['action_hierarchy.Employee']"}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
'grade': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'employee_to_grade'", 'null': 'True', 'to': u"orm['action_hierarchy.Grade']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
'level': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'manager': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'employee_to_manager'", 'null': 'True', 'to': u"orm['action_hierarchy.Employee']"}),
'post': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'employee_to_post'", 'to': u"orm['action_hierarchy.Post']"}),
'reason_dismissal': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
'sex': ('django.db.models.fields.CharField', [], {'max_length': '7'}),
'type_of_cooperation': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
'user': ('django.db.models.fields.related.OneToOneField', [], {'blank': 'True', 'related_name': "'employee'", 'unique': 'True', 'null': 'True', 'to': u"orm['action_user.User']"})
},
u'action_hierarchy.grade': {
'Meta': {'ordering': "['grade']", 'object_name': 'Grade'},
'grade': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
u'action_hierarchy.post': {
'Meta': {'ordering': "('title',)", 'object_name': 'Post'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '64'})
},
u'action_hierarchy.subdivision': {
'Meta': {'ordering': "('title',)", 'object_name': 'Subdivision'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '64'})
},
u'action_user.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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
u'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'}),
'last_name_plural': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'phone': ('snippets.models.fields.PhoneField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
'photo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'skype': ('django.db.models.fields.CharField', [], {'max_length': '150', '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'})
},
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'})
},
u'gallup.answer': {
'Meta': {'object_name': 'Answer'},
'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'opros': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': u"orm['gallup.Survey']"}),
'question': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['gallup.Question']"}),
'value': ('django.db.models.fields.PositiveSmallIntegerField', [], {})
},
u'gallup.period': {
'Meta': {'ordering': "['ts']", 'object_name': 'Period'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {})
},
u'gallup.question': {
'Meta': {'ordering': "('dep_type', 'position')", 'object_name': 'Question'},
'dep_type': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'blank': 'True'}),
'text': ('django.db.models.fields.CharField', [], {'max_length': '500'})
},
u'gallup.results': {
'Meta': {'object_name': 'Results'},
'avg': ('django.db.models.fields.FloatField', [], {'default': '0'}),
'avg_senior': ('django.db.models.fields.FloatField', [], {'default': '0'}),
'avg_stageur': ('django.db.models.fields.FloatField', [], {'default': '0'}),
'dept': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'results_dept'", 'to': u"orm['action_hierarchy.Department']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'period': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['gallup.Period']"}),
'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'question_text'", 'to': u"orm['gallup.Question']"})
},
u'gallup.survey': {
'Meta': {'object_name': 'Survey', 'db_table': "'action_hierarchy_opros'"},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'period': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['gallup.Period']"}),
'stageur': ('django.db.models.fields.IntegerField', [], {}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'gallup'", 'unique': 'True', 'to': u"orm['action_user.User']"})
}
}
complete_apps = ['gallup']