Commit d1d43f52c11a2f5b1aff2692d77b41e1d6c7a27a
1 parent
7be5956a
wstęp do dodatkowych atrybutów
Showing
3 changed files
with
700 additions
and
3 deletions
dictionary/migrations/0011_auto__add_lexemeattribute__add_lexemeattributevalue.py
0 → 100644
| 1 | +# -*- coding: utf-8 -*- | |
| 2 | +import datetime | |
| 3 | +from south.db import db | |
| 4 | +from south.v2 import SchemaMigration | |
| 5 | +from django.db import models | |
| 6 | + | |
| 7 | + | |
| 8 | +class Migration(SchemaMigration): | |
| 9 | + | |
| 10 | + def forwards(self, orm): | |
| 11 | + # Adding model 'LexemeAttribute' | |
| 12 | + db.create_table(u'dictionary_lexemeattribute', ( | |
| 13 | + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), | |
| 14 | + ('name', self.gf('django.db.models.fields.CharField')(max_length=32)), | |
| 15 | + ('closed', self.gf('django.db.models.fields.BooleanField')(default=False)), | |
| 16 | + ('lexical_class', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['dictionary.LexicalClass'], null=True, blank=True)), | |
| 17 | + ('part_of_speech', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['dictionary.PartOfSpeech'], null=True, blank=True)), | |
| 18 | + ('inflection_characteristic', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['dictionary.InflectionCharacteristic'], null=True, blank=True)), | |
| 19 | + )) | |
| 20 | + db.send_create_signal(u'dictionary', ['LexemeAttribute']) | |
| 21 | + | |
| 22 | + # Adding model 'LexemeAttributeValue' | |
| 23 | + db.create_table(u'dictionary_lexemeattributevalue', ( | |
| 24 | + (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), | |
| 25 | + ('value', self.gf('django.db.models.fields.CharField')(max_length=32)), | |
| 26 | + ('attribute', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['dictionary.LexemeAttribute'])), | |
| 27 | + )) | |
| 28 | + db.send_create_signal(u'dictionary', ['LexemeAttributeValue']) | |
| 29 | + | |
| 30 | + # Adding M2M table for field lexemes on 'LexemeAttributeValue' | |
| 31 | + db.create_table(u'dictionary_lexemeattributevalue_lexemes', ( | |
| 32 | + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), | |
| 33 | + ('lexemeattributevalue', models.ForeignKey(orm[u'dictionary.lexemeattributevalue'], null=False)), | |
| 34 | + ('lexeme', models.ForeignKey(orm[u'dictionary.lexeme'], null=False)) | |
| 35 | + )) | |
| 36 | + db.create_unique(u'dictionary_lexemeattributevalue_lexemes', ['lexemeattributevalue_id', 'lexeme_id']) | |
| 37 | + | |
| 38 | + | |
| 39 | + def backwards(self, orm): | |
| 40 | + # Deleting model 'LexemeAttribute' | |
| 41 | + db.delete_table(u'dictionary_lexemeattribute') | |
| 42 | + | |
| 43 | + # Deleting model 'LexemeAttributeValue' | |
| 44 | + db.delete_table(u'dictionary_lexemeattributevalue') | |
| 45 | + | |
| 46 | + # Removing M2M table for field lexemes on 'LexemeAttributeValue' | |
| 47 | + db.delete_table('dictionary_lexemeattributevalue_lexemes') | |
| 48 | + | |
| 49 | + | |
| 50 | + models = { | |
| 51 | + u'auth.group': { | |
| 52 | + 'Meta': {'object_name': 'Group'}, | |
| 53 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 54 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), | |
| 55 | + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) | |
| 56 | + }, | |
| 57 | + u'auth.permission': { | |
| 58 | + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, | |
| 59 | + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | |
| 60 | + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), | |
| 61 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 62 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) | |
| 63 | + }, | |
| 64 | + u'auth.user': { | |
| 65 | + 'Meta': {'object_name': 'User'}, | |
| 66 | + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | |
| 67 | + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), | |
| 68 | + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | |
| 69 | + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), | |
| 70 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 71 | + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), | |
| 72 | + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
| 73 | + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
| 74 | + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | |
| 75 | + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | |
| 76 | + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), | |
| 77 | + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), | |
| 78 | + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) | |
| 79 | + }, | |
| 80 | + u'contenttypes.contenttype': { | |
| 81 | + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, | |
| 82 | + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | |
| 83 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 84 | + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | |
| 85 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) | |
| 86 | + }, | |
| 87 | + u'dictionary.baseformlabel': { | |
| 88 | + 'Meta': {'object_name': 'BaseFormLabel', 'db_table': "'efobazy'"}, | |
| 89 | + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'efobaz'", 'blank': 'True'}), | |
| 90 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) | |
| 91 | + }, | |
| 92 | + u'dictionary.cell': { | |
| 93 | + 'Meta': {'ordering': "['index']", 'object_name': 'Cell', 'db_table': "'klatki'"}, | |
| 94 | + 'base_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
| 95 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 96 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'kind'"}), | |
| 97 | + 'prefix': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_column': "'prefiks'", 'blank': 'True'}), | |
| 98 | + 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_column': "'sufiks'", 'blank': 'True'}), | |
| 99 | + 'table_template': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.TableTemplate']", 'db_column': "'st_id'"}), | |
| 100 | + 'tag': ('django.db.models.fields.TextField', [], {'db_column': "'tag'", 'blank': 'True'}) | |
| 101 | + }, | |
| 102 | + u'dictionary.classification': { | |
| 103 | + 'Meta': {'object_name': 'Classification', 'db_table': "'klasyfikacje'"}, | |
| 104 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 105 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}) | |
| 106 | + }, | |
| 107 | + u'dictionary.classificationvalue': { | |
| 108 | + 'Meta': {'object_name': 'ClassificationValue', 'db_table': "'wartosci_klasyfikacji'"}, | |
| 109 | + 'classification': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'values'", 'db_column': "'klas_id'", 'to': u"orm['dictionary.Classification']"}), | |
| 110 | + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usunieta'"}), | |
| 111 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 112 | + 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}), | |
| 113 | + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Lexeme']", 'symmetrical': 'False', 'blank': 'True'}), | |
| 114 | + 'parent_node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'child_nodes'", 'null': 'True', 'db_column': "'rodzic'", 'to': u"orm['dictionary.ClassificationValue']"}) | |
| 115 | + }, | |
| 116 | + u'dictionary.crossreference': { | |
| 117 | + 'Meta': {'object_name': 'CrossReference', 'db_table': "'odsylacze'"}, | |
| 118 | + 'from_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'refs_to'", 'db_column': "'l_id_od'", 'to': u"orm['dictionary.Lexeme']"}), | |
| 119 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 120 | + 'to_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'refs_from'", 'db_column': "'l_id_do'", 'to': u"orm['dictionary.Lexeme']"}), | |
| 121 | + 'type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.CrossReferenceType']", 'db_column': "'typods_id'"}) | |
| 122 | + }, | |
| 123 | + u'dictionary.crossreferencetype': { | |
| 124 | + 'Meta': {'object_name': 'CrossReferenceType', 'db_table': "'typyodsylaczy'"}, | |
| 125 | + 'desc': ('django.db.models.fields.CharField', [], {'max_length': '40', 'db_column': "'naglowek'"}), | |
| 126 | + 'from_pos': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'crtype_to'", 'db_column': "'pos1'", 'to': u"orm['dictionary.PartOfSpeech']"}), | |
| 127 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 128 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'kolejnosc'"}), | |
| 129 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '10', 'db_column': "'typods'"}), | |
| 130 | + 'to_pos': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'crtype_from'", 'db_column': "'pos2'", 'to': u"orm['dictionary.PartOfSpeech']"}) | |
| 131 | + }, | |
| 132 | + u'dictionary.ending': { | |
| 133 | + 'Meta': {'ordering': "['index']", 'unique_together': "(('pattern', 'base_form_label', 'index'),)", 'object_name': 'Ending', 'db_table': "'zakonczenia'"}, | |
| 134 | + 'base_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
| 135 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 136 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'zind'"}), | |
| 137 | + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'endings'", 'db_column': "'w_id'", 'to': u"orm['dictionary.Pattern']"}), | |
| 138 | + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_zakonczen'", 'blank': 'True'}), | |
| 139 | + 'string': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'zak'", 'blank': 'True'}) | |
| 140 | + }, | |
| 141 | + u'dictionary.history': { | |
| 142 | + 'Meta': {'object_name': 'History', 'db_table': "'history'"}, | |
| 143 | + 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'column_name_'", 'blank': 'True'}), | |
| 144 | + 'column_ord': ('django.db.models.fields.IntegerField', [], {'db_column': "'ordinal_position_of_column_'"}), | |
| 145 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 146 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'null': 'True', 'db_column': "'lexeme_id_'", 'blank': 'True'}), | |
| 147 | + 'new_value': ('django.db.models.fields.TextField', [], {'db_column': "'new_value_'", 'blank': 'True'}), | |
| 148 | + 'old_value': ('django.db.models.fields.TextField', [], {'db_column': "'old_value_'", 'blank': 'True'}), | |
| 149 | + 'operation': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'operation_'"}), | |
| 150 | + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Pattern']", 'null': 'True', 'db_column': "'pattern_id_'", 'blank': 'True'}), | |
| 151 | + 'row_id': ('django.db.models.fields.IntegerField', [], {'db_column': "'id_'"}), | |
| 152 | + 'table_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'table_name_'"}), | |
| 153 | + 'table_oid': ('django.db.models.fields.IntegerField', [], {'db_column': "'table_oid_'"}), | |
| 154 | + 'timestamp': ('django.db.models.fields.DateTimeField', [], {'db_column': "'timestamp_'"}), | |
| 155 | + 'transaction_began': ('django.db.models.fields.DateTimeField', [], {'db_column': "'transaction_began_'"}), | |
| 156 | + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'db_column': "'user_id_'"}) | |
| 157 | + }, | |
| 158 | + u'dictionary.inflectioncharacteristic': { | |
| 159 | + 'Meta': {'unique_together': "(('entry', 'part_of_speech'),)", 'object_name': 'InflectionCharacteristic', 'db_table': "'charfle'"}, | |
| 160 | + 'basic_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
| 161 | + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'charfl'", 'blank': 'True'}), | |
| 162 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 163 | + 'part_of_speech': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PartOfSpeech']", 'db_column': "'pos'"}) | |
| 164 | + }, | |
| 165 | + u'dictionary.inputform': { | |
| 166 | + 'Meta': {'object_name': 'InputForm'}, | |
| 167 | + 'form': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), | |
| 168 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 169 | + 'input_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InputLexeme']"}) | |
| 170 | + }, | |
| 171 | + u'dictionary.inputlexeme': { | |
| 172 | + 'Meta': {'object_name': 'InputLexeme'}, | |
| 173 | + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), | |
| 174 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) | |
| 175 | + }, | |
| 176 | + u'dictionary.lexeme': { | |
| 177 | + 'Meta': {'object_name': 'Lexeme', 'db_table': "'leksemy'"}, | |
| 178 | + 'comment': ('django.db.models.fields.TextField', [], {'db_column': "'komentarz'", 'blank': 'True'}), | |
| 179 | + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usuniety'"}), | |
| 180 | + 'entry': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'db_column': "'haslo'", 'blank': 'True'}), | |
| 181 | + 'entry_suffix': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'haslosuf'", 'blank': 'True'}), | |
| 182 | + 'gloss': ('django.db.models.fields.TextField', [], {'db_column': "'glosa'", 'blank': 'True'}), | |
| 183 | + 'homonym_number': ('django.db.models.fields.IntegerField', [], {'default': '1', 'db_column': "'hom'"}), | |
| 184 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 185 | + 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_column': "'data_modyfikacji'", 'blank': 'True'}), | |
| 186 | + 'note': ('django.db.models.fields.TextField', [], {'db_column': "'nota'", 'blank': 'True'}), | |
| 187 | + 'owner_vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_lexemes'", 'db_column': "'slownik'", 'to': u"orm['dictionary.Vocabulary']"}), | |
| 188 | + 'part_of_speech': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PartOfSpeech']", 'db_column': "'pos'"}), | |
| 189 | + 'patterns': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Pattern']", 'through': u"orm['dictionary.LexemeInflectionPattern']", 'symmetrical': 'False'}), | |
| 190 | + 'pronunciation': ('django.db.models.fields.TextField', [], {'db_column': "'wymowa'", 'blank': 'True'}), | |
| 191 | + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_leksemow'", 'blank': 'True'}), | |
| 192 | + 'responsible': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'db_column': "'odpowiedzialny'", 'blank': 'True'}), | |
| 193 | + 'source': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'zrodlo'", 'blank': 'True'}), | |
| 194 | + 'status': ('django.db.models.fields.CharField', [], {'max_length': '8', 'db_column': "'status'"}) | |
| 195 | + }, | |
| 196 | + u'dictionary.lexemeassociation': { | |
| 197 | + 'Meta': {'object_name': 'LexemeAssociation', 'db_table': "'leksemy_w_slownikach'"}, | |
| 198 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 199 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'db_column': "'l_id'"}), | |
| 200 | + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Vocabulary']", 'db_column': "'slownik'"}) | |
| 201 | + }, | |
| 202 | + u'dictionary.lexemeattribute': { | |
| 203 | + 'Meta': {'object_name': 'LexemeAttribute'}, | |
| 204 | + 'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
| 205 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 206 | + 'inflection_characteristic': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'null': 'True', 'blank': 'True'}), | |
| 207 | + 'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexicalClass']", 'null': 'True', 'blank': 'True'}), | |
| 208 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), | |
| 209 | + 'part_of_speech': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PartOfSpeech']", 'null': 'True', 'blank': 'True'}) | |
| 210 | + }, | |
| 211 | + u'dictionary.lexemeattributevalue': { | |
| 212 | + 'Meta': {'object_name': 'LexemeAttributeValue'}, | |
| 213 | + 'attribute': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexemeAttribute']"}), | |
| 214 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 215 | + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'attributes'", 'symmetrical': 'False', 'to': u"orm['dictionary.Lexeme']"}), | |
| 216 | + 'value': ('django.db.models.fields.CharField', [], {'max_length': '32'}) | |
| 217 | + }, | |
| 218 | + u'dictionary.lexemeform': { | |
| 219 | + 'Meta': {'object_name': 'LexemeForm'}, | |
| 220 | + 'form': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), | |
| 221 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 222 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']"}) | |
| 223 | + }, | |
| 224 | + u'dictionary.lexemeinflectionpattern': { | |
| 225 | + 'Meta': {'ordering': "['index']", 'unique_together': "(('lexeme', 'index'),)", 'object_name': 'LexemeInflectionPattern', 'db_table': "'odmieniasie'"}, | |
| 226 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 227 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'oind'"}), | |
| 228 | + 'inflection_characteristic': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}), | |
| 229 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'db_column': "'l_id'"}), | |
| 230 | + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Pattern']", 'db_column': "'w_id'"}), | |
| 231 | + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_odmieniasiow'", 'blank': 'True'}), | |
| 232 | + 'root': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'rdzen'"}) | |
| 233 | + }, | |
| 234 | + u'dictionary.lexicalclass': { | |
| 235 | + 'Meta': {'object_name': 'LexicalClass', 'db_table': "'czescimowy'"}, | |
| 236 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'primary_key': 'True', 'db_column': "'czm'"}) | |
| 237 | + }, | |
| 238 | + u'dictionary.paradygmatywsjp': { | |
| 239 | + 'Meta': {'object_name': 'ParadygmatyWSJP', 'db_table': "'paradygmatywsjp'"}, | |
| 240 | + 'charfl': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}), | |
| 241 | + 'col': ('django.db.models.fields.IntegerField', [], {}), | |
| 242 | + 'colspan': ('django.db.models.fields.IntegerField', [], {}), | |
| 243 | + 'efobaz': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
| 244 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 245 | + 'kskl': ('django.db.models.fields.IntegerField', [], {}), | |
| 246 | + 'morf': ('django.db.models.fields.TextField', [], {}), | |
| 247 | + 'podparad': ('django.db.models.fields.CharField', [], {'max_length': '4', 'blank': 'True'}), | |
| 248 | + 'pref': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), | |
| 249 | + 'row': ('django.db.models.fields.IntegerField', [], {}), | |
| 250 | + 'rowspan': ('django.db.models.fields.IntegerField', [], {}), | |
| 251 | + 'suf': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), | |
| 252 | + 'typr': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PatternType']", 'db_column': "'typr'"}), | |
| 253 | + 'wariant': ('django.db.models.fields.CharField', [], {'max_length': '4'}) | |
| 254 | + }, | |
| 255 | + u'dictionary.partofspeech': { | |
| 256 | + 'Meta': {'ordering': "['symbol']", 'object_name': 'PartOfSpeech', 'db_table': "'klasygramatyczne'"}, | |
| 257 | + 'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexicalClass']", 'db_column': "'czm'"}), | |
| 258 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'primary_key': 'True', 'db_column': "'pos'"}) | |
| 259 | + }, | |
| 260 | + u'dictionary.pattern': { | |
| 261 | + 'Meta': {'ordering': "['name']", 'object_name': 'Pattern', 'db_table': "'wzory'"}, | |
| 262 | + 'basic_form_ending': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'zakp'", 'blank': 'True'}), | |
| 263 | + 'comment': ('django.db.models.fields.TextField', [], {'db_column': "'komentarz'", 'blank': 'True'}), | |
| 264 | + 'example': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'przyklad'"}), | |
| 265 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 266 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_column': "'w_id'"}), | |
| 267 | + 'status': ('django.db.models.fields.CharField', [], {'max_length': '8'}), | |
| 268 | + 'type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PatternType']", 'db_column': "'typ'"}) | |
| 269 | + }, | |
| 270 | + u'dictionary.patterntype': { | |
| 271 | + 'Meta': {'object_name': 'PatternType', 'db_table': "'typywzorow'"}, | |
| 272 | + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'wtyp'", 'blank': 'True'}), | |
| 273 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 274 | + 'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexicalClass']", 'db_column': "'czm'"}) | |
| 275 | + }, | |
| 276 | + u'dictionary.qualifier': { | |
| 277 | + 'Meta': {'ordering': "['label']", 'unique_together': "(('label', 'vocabulary'),)", 'object_name': 'Qualifier', 'db_table': "'kwalifikatory'"}, | |
| 278 | + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usuniety'"}), | |
| 279 | + 'exclusion_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.QualifierExclusionClass']", 'null': 'True', 'db_column': "'klasa'", 'blank': 'True'}), | |
| 280 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 281 | + 'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'kwal'"}), | |
| 282 | + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'qualifiers'", 'db_column': "'slownik'", 'to': u"orm['dictionary.Vocabulary']"}) | |
| 283 | + }, | |
| 284 | + u'dictionary.qualifierexclusionclass': { | |
| 285 | + 'Meta': {'object_name': 'QualifierExclusionClass', 'db_table': "'klasy_wykluczania'"}, | |
| 286 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 287 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}), | |
| 288 | + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Vocabulary']", 'db_column': "'slownik'"}) | |
| 289 | + }, | |
| 290 | + u'dictionary.savedexportdata': { | |
| 291 | + 'Meta': {'object_name': 'SavedExportData'}, | |
| 292 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 293 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}), | |
| 294 | + 'serialized_data': ('django.db.models.fields.TextField', [], {}) | |
| 295 | + }, | |
| 296 | + u'dictionary.savedfilter': { | |
| 297 | + 'Meta': {'unique_together': "(('name', 'user'),)", 'object_name': 'SavedFilter'}, | |
| 298 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 299 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), | |
| 300 | + 'serialized_filter': ('django.db.models.fields.TextField', [], {}), | |
| 301 | + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) | |
| 302 | + }, | |
| 303 | + u'dictionary.tablecell': { | |
| 304 | + 'Meta': {'object_name': 'TableCell', 'db_table': "'komorki_tabel'"}, | |
| 305 | + 'cell': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['dictionary.Cell']", 'unique': 'True', 'db_column': "'k_id'"}), | |
| 306 | + 'col': ('django.db.models.fields.IntegerField', [], {}), | |
| 307 | + 'colspan': ('django.db.models.fields.IntegerField', [], {}), | |
| 308 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 309 | + 'row': ('django.db.models.fields.IntegerField', [], {}), | |
| 310 | + 'rowspan': ('django.db.models.fields.IntegerField', [], {}) | |
| 311 | + }, | |
| 312 | + u'dictionary.tableheader': { | |
| 313 | + 'Meta': {'object_name': 'TableHeader', 'db_table': "'naglowki_tabel'"}, | |
| 314 | + 'col': ('django.db.models.fields.IntegerField', [], {}), | |
| 315 | + 'colspan': ('django.db.models.fields.IntegerField', [], {}), | |
| 316 | + 'css_class': ('django.db.models.fields.CharField', [], {'max_length': '8', 'db_column': "'styl'"}), | |
| 317 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 318 | + 'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'nagl'", 'blank': 'True'}), | |
| 319 | + 'row': ('django.db.models.fields.IntegerField', [], {}), | |
| 320 | + 'rowspan': ('django.db.models.fields.IntegerField', [], {}), | |
| 321 | + 'table_template': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.TableTemplate']", 'db_column': "'st_id'"}) | |
| 322 | + }, | |
| 323 | + u'dictionary.tabletemplate': { | |
| 324 | + 'Meta': {'object_name': 'TableTemplate', 'db_table': "'szablony_tabel'"}, | |
| 325 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 326 | + 'inflection_characteristic': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}), | |
| 327 | + 'pattern_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PatternType']", 'db_column': "'wtyp'"}), | |
| 328 | + 'variant': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Variant']", 'db_column': "'wariant'"}) | |
| 329 | + }, | |
| 330 | + u'dictionary.variant': { | |
| 331 | + 'Meta': {'object_name': 'Variant', 'db_table': "'warianty'"}, | |
| 332 | + 'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True', 'db_column': "'wariant'"}) | |
| 333 | + }, | |
| 334 | + u'dictionary.vocabulary': { | |
| 335 | + 'Meta': {'object_name': 'Vocabulary', 'db_table': "'slowniki'"}, | |
| 336 | + 'classifications': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'vocabularies'", 'blank': 'True', 'to': u"orm['dictionary.Classification']"}), | |
| 337 | + 'editors': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'editable_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}), | |
| 338 | + 'id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True', 'db_column': "'slownik'"}), | |
| 339 | + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'vocabularies'", 'blank': 'True', 'through': u"orm['dictionary.LexemeAssociation']", 'to': u"orm['dictionary.Lexeme']"}), | |
| 340 | + 'managers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'managed_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}), | |
| 341 | + 'viewers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'visible_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}) | |
| 342 | + } | |
| 343 | + } | |
| 344 | + | |
| 345 | + complete_apps = ['dictionary'] | |
| 0 | 346 | \ No newline at end of file |
| ... | ... |
dictionary/migrations/0012_translate_refl.py
0 → 100644
| 1 | +# -*- coding: utf-8 -*- | |
| 2 | +import datetime | |
| 3 | +from south.db import db | |
| 4 | +from south.v2 import DataMigration | |
| 5 | +from django.db import models | |
| 6 | +from common.util import no_history | |
| 7 | + | |
| 8 | +REFL = (u'się', u'(się)', u'sobie', u'(sobie)', u'się/sobie') | |
| 9 | + | |
| 10 | +class Migration(DataMigration): | |
| 11 | + | |
| 12 | + def forwards(self, orm): | |
| 13 | + no_history() | |
| 14 | + attr, created = orm.LexemeAttribute.objects.get_or_create( | |
| 15 | + name=u'zwrotność', | |
| 16 | + closed=True, | |
| 17 | + lexical_class=orm.LexicalClass.objects.get(symbol='v'), | |
| 18 | + ) | |
| 19 | + for v in REFL: | |
| 20 | + orm.LexemeAttributeValue.objects.get_or_create( | |
| 21 | + value=v, attribute=attr) | |
| 22 | + verbs = orm.Lexeme.objects.filter( | |
| 23 | + part_of_speech__lexical_class__symbol='v') | |
| 24 | + for l in verbs: | |
| 25 | + v = l.entry_suffix.strip(' ?') | |
| 26 | + av = orm.LexemeAttributeValue.objects.get(value=v, attribute=attr) | |
| 27 | + av.lexemes.add(l) #add | |
| 28 | + # Note: Remember to use orm['appname.ModelName'] rather than "from appname.models..." | |
| 29 | + | |
| 30 | + def backwards(self, orm): | |
| 31 | + no_history() | |
| 32 | + refl = orm.LexemeAttribute.objects.get(name=u'zwrotność') | |
| 33 | + refl_values = orm.LexemeAttributeValue.objects.filter(attribute=refl) | |
| 34 | + for av in refl_values: | |
| 35 | + for l in av.lexemes.all(): | |
| 36 | + l.entry_suffix = u' ' + av.value | |
| 37 | + l.save() | |
| 38 | + | |
| 39 | + | |
| 40 | + models = { | |
| 41 | + u'auth.group': { | |
| 42 | + 'Meta': {'object_name': 'Group'}, | |
| 43 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 44 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), | |
| 45 | + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) | |
| 46 | + }, | |
| 47 | + u'auth.permission': { | |
| 48 | + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, | |
| 49 | + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | |
| 50 | + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), | |
| 51 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 52 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) | |
| 53 | + }, | |
| 54 | + u'auth.user': { | |
| 55 | + 'Meta': {'object_name': 'User'}, | |
| 56 | + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | |
| 57 | + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), | |
| 58 | + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | |
| 59 | + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), | |
| 60 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 61 | + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), | |
| 62 | + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
| 63 | + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
| 64 | + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | |
| 65 | + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | |
| 66 | + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), | |
| 67 | + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), | |
| 68 | + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) | |
| 69 | + }, | |
| 70 | + u'contenttypes.contenttype': { | |
| 71 | + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, | |
| 72 | + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | |
| 73 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 74 | + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | |
| 75 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) | |
| 76 | + }, | |
| 77 | + u'dictionary.baseformlabel': { | |
| 78 | + 'Meta': {'object_name': 'BaseFormLabel', 'db_table': "'efobazy'"}, | |
| 79 | + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'efobaz'", 'blank': 'True'}), | |
| 80 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) | |
| 81 | + }, | |
| 82 | + u'dictionary.cell': { | |
| 83 | + 'Meta': {'ordering': "['index']", 'object_name': 'Cell', 'db_table': "'klatki'"}, | |
| 84 | + 'base_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
| 85 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 86 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'kind'"}), | |
| 87 | + 'prefix': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_column': "'prefiks'", 'blank': 'True'}), | |
| 88 | + 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_column': "'sufiks'", 'blank': 'True'}), | |
| 89 | + 'table_template': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.TableTemplate']", 'db_column': "'st_id'"}), | |
| 90 | + 'tag': ('django.db.models.fields.TextField', [], {'db_column': "'tag'", 'blank': 'True'}) | |
| 91 | + }, | |
| 92 | + u'dictionary.classification': { | |
| 93 | + 'Meta': {'object_name': 'Classification', 'db_table': "'klasyfikacje'"}, | |
| 94 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 95 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}) | |
| 96 | + }, | |
| 97 | + u'dictionary.classificationvalue': { | |
| 98 | + 'Meta': {'object_name': 'ClassificationValue', 'db_table': "'wartosci_klasyfikacji'"}, | |
| 99 | + 'classification': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'values'", 'db_column': "'klas_id'", 'to': u"orm['dictionary.Classification']"}), | |
| 100 | + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usunieta'"}), | |
| 101 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 102 | + 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}), | |
| 103 | + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Lexeme']", 'symmetrical': 'False', 'blank': 'True'}), | |
| 104 | + 'parent_node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'child_nodes'", 'null': 'True', 'db_column': "'rodzic'", 'to': u"orm['dictionary.ClassificationValue']"}) | |
| 105 | + }, | |
| 106 | + u'dictionary.crossreference': { | |
| 107 | + 'Meta': {'object_name': 'CrossReference', 'db_table': "'odsylacze'"}, | |
| 108 | + 'from_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'refs_to'", 'db_column': "'l_id_od'", 'to': u"orm['dictionary.Lexeme']"}), | |
| 109 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 110 | + 'to_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'refs_from'", 'db_column': "'l_id_do'", 'to': u"orm['dictionary.Lexeme']"}), | |
| 111 | + 'type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.CrossReferenceType']", 'db_column': "'typods_id'"}) | |
| 112 | + }, | |
| 113 | + u'dictionary.crossreferencetype': { | |
| 114 | + 'Meta': {'object_name': 'CrossReferenceType', 'db_table': "'typyodsylaczy'"}, | |
| 115 | + 'desc': ('django.db.models.fields.CharField', [], {'max_length': '40', 'db_column': "'naglowek'"}), | |
| 116 | + 'from_pos': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'crtype_to'", 'db_column': "'pos1'", 'to': u"orm['dictionary.PartOfSpeech']"}), | |
| 117 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 118 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'kolejnosc'"}), | |
| 119 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '10', 'db_column': "'typods'"}), | |
| 120 | + 'to_pos': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'crtype_from'", 'db_column': "'pos2'", 'to': u"orm['dictionary.PartOfSpeech']"}) | |
| 121 | + }, | |
| 122 | + u'dictionary.ending': { | |
| 123 | + 'Meta': {'ordering': "['index']", 'unique_together': "(('pattern', 'base_form_label', 'index'),)", 'object_name': 'Ending', 'db_table': "'zakonczenia'"}, | |
| 124 | + 'base_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
| 125 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 126 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'zind'"}), | |
| 127 | + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'endings'", 'db_column': "'w_id'", 'to': u"orm['dictionary.Pattern']"}), | |
| 128 | + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_zakonczen'", 'blank': 'True'}), | |
| 129 | + 'string': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'zak'", 'blank': 'True'}) | |
| 130 | + }, | |
| 131 | + u'dictionary.history': { | |
| 132 | + 'Meta': {'object_name': 'History', 'db_table': "'history'"}, | |
| 133 | + 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'column_name_'", 'blank': 'True'}), | |
| 134 | + 'column_ord': ('django.db.models.fields.IntegerField', [], {'db_column': "'ordinal_position_of_column_'"}), | |
| 135 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 136 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'null': 'True', 'db_column': "'lexeme_id_'", 'blank': 'True'}), | |
| 137 | + 'new_value': ('django.db.models.fields.TextField', [], {'db_column': "'new_value_'", 'blank': 'True'}), | |
| 138 | + 'old_value': ('django.db.models.fields.TextField', [], {'db_column': "'old_value_'", 'blank': 'True'}), | |
| 139 | + 'operation': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'operation_'"}), | |
| 140 | + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Pattern']", 'null': 'True', 'db_column': "'pattern_id_'", 'blank': 'True'}), | |
| 141 | + 'row_id': ('django.db.models.fields.IntegerField', [], {'db_column': "'id_'"}), | |
| 142 | + 'table_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'table_name_'"}), | |
| 143 | + 'table_oid': ('django.db.models.fields.IntegerField', [], {'db_column': "'table_oid_'"}), | |
| 144 | + 'timestamp': ('django.db.models.fields.DateTimeField', [], {'db_column': "'timestamp_'"}), | |
| 145 | + 'transaction_began': ('django.db.models.fields.DateTimeField', [], {'db_column': "'transaction_began_'"}), | |
| 146 | + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'db_column': "'user_id_'"}) | |
| 147 | + }, | |
| 148 | + u'dictionary.inflectioncharacteristic': { | |
| 149 | + 'Meta': {'unique_together': "(('entry', 'part_of_speech'),)", 'object_name': 'InflectionCharacteristic', 'db_table': "'charfle'"}, | |
| 150 | + 'basic_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
| 151 | + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'charfl'", 'blank': 'True'}), | |
| 152 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 153 | + 'part_of_speech': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PartOfSpeech']", 'db_column': "'pos'"}) | |
| 154 | + }, | |
| 155 | + u'dictionary.inputform': { | |
| 156 | + 'Meta': {'object_name': 'InputForm'}, | |
| 157 | + 'form': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), | |
| 158 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 159 | + 'input_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InputLexeme']"}) | |
| 160 | + }, | |
| 161 | + u'dictionary.inputlexeme': { | |
| 162 | + 'Meta': {'object_name': 'InputLexeme'}, | |
| 163 | + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), | |
| 164 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) | |
| 165 | + }, | |
| 166 | + u'dictionary.lexeme': { | |
| 167 | + 'Meta': {'object_name': 'Lexeme', 'db_table': "'leksemy'"}, | |
| 168 | + 'comment': ('django.db.models.fields.TextField', [], {'db_column': "'komentarz'", 'blank': 'True'}), | |
| 169 | + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usuniety'"}), | |
| 170 | + 'entry': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'db_column': "'haslo'", 'blank': 'True'}), | |
| 171 | + 'entry_suffix': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'haslosuf'", 'blank': 'True'}), | |
| 172 | + 'gloss': ('django.db.models.fields.TextField', [], {'db_column': "'glosa'", 'blank': 'True'}), | |
| 173 | + 'homonym_number': ('django.db.models.fields.IntegerField', [], {'default': '1', 'db_column': "'hom'"}), | |
| 174 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 175 | + 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_column': "'data_modyfikacji'", 'blank': 'True'}), | |
| 176 | + 'note': ('django.db.models.fields.TextField', [], {'db_column': "'nota'", 'blank': 'True'}), | |
| 177 | + 'owner_vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_lexemes'", 'db_column': "'slownik'", 'to': u"orm['dictionary.Vocabulary']"}), | |
| 178 | + 'part_of_speech': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PartOfSpeech']", 'db_column': "'pos'"}), | |
| 179 | + 'patterns': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Pattern']", 'through': u"orm['dictionary.LexemeInflectionPattern']", 'symmetrical': 'False'}), | |
| 180 | + 'pronunciation': ('django.db.models.fields.TextField', [], {'db_column': "'wymowa'", 'blank': 'True'}), | |
| 181 | + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_leksemow'", 'blank': 'True'}), | |
| 182 | + 'responsible': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'db_column': "'odpowiedzialny'", 'blank': 'True'}), | |
| 183 | + 'source': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'zrodlo'", 'blank': 'True'}), | |
| 184 | + 'status': ('django.db.models.fields.CharField', [], {'max_length': '8', 'db_column': "'status'"}) | |
| 185 | + }, | |
| 186 | + u'dictionary.lexemeassociation': { | |
| 187 | + 'Meta': {'object_name': 'LexemeAssociation', 'db_table': "'leksemy_w_slownikach'"}, | |
| 188 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 189 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'db_column': "'l_id'"}), | |
| 190 | + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Vocabulary']", 'db_column': "'slownik'"}) | |
| 191 | + }, | |
| 192 | + u'dictionary.lexemeattribute': { | |
| 193 | + 'Meta': {'object_name': 'LexemeAttribute'}, | |
| 194 | + 'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
| 195 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 196 | + 'inflection_characteristic': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'null': 'True', 'blank': 'True'}), | |
| 197 | + 'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexicalClass']", 'null': 'True', 'blank': 'True'}), | |
| 198 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), | |
| 199 | + 'part_of_speech': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PartOfSpeech']", 'null': 'True', 'blank': 'True'}) | |
| 200 | + }, | |
| 201 | + u'dictionary.lexemeattributevalue': { | |
| 202 | + 'Meta': {'object_name': 'LexemeAttributeValue'}, | |
| 203 | + 'attribute': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexemeAttribute']"}), | |
| 204 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 205 | + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Lexeme']", 'symmetrical': 'False'}), | |
| 206 | + 'value': ('django.db.models.fields.CharField', [], {'max_length': '32'}) | |
| 207 | + }, | |
| 208 | + u'dictionary.lexemeform': { | |
| 209 | + 'Meta': {'object_name': 'LexemeForm'}, | |
| 210 | + 'form': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), | |
| 211 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 212 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']"}) | |
| 213 | + }, | |
| 214 | + u'dictionary.lexemeinflectionpattern': { | |
| 215 | + 'Meta': {'ordering': "['index']", 'unique_together': "(('lexeme', 'index'),)", 'object_name': 'LexemeInflectionPattern', 'db_table': "'odmieniasie'"}, | |
| 216 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 217 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'oind'"}), | |
| 218 | + 'inflection_characteristic': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}), | |
| 219 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'db_column': "'l_id'"}), | |
| 220 | + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Pattern']", 'db_column': "'w_id'"}), | |
| 221 | + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_odmieniasiow'", 'blank': 'True'}), | |
| 222 | + 'root': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'rdzen'"}) | |
| 223 | + }, | |
| 224 | + u'dictionary.lexicalclass': { | |
| 225 | + 'Meta': {'object_name': 'LexicalClass', 'db_table': "'czescimowy'"}, | |
| 226 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'primary_key': 'True', 'db_column': "'czm'"}) | |
| 227 | + }, | |
| 228 | + u'dictionary.paradygmatywsjp': { | |
| 229 | + 'Meta': {'object_name': 'ParadygmatyWSJP', 'db_table': "'paradygmatywsjp'"}, | |
| 230 | + 'charfl': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}), | |
| 231 | + 'col': ('django.db.models.fields.IntegerField', [], {}), | |
| 232 | + 'colspan': ('django.db.models.fields.IntegerField', [], {}), | |
| 233 | + 'efobaz': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
| 234 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 235 | + 'kskl': ('django.db.models.fields.IntegerField', [], {}), | |
| 236 | + 'morf': ('django.db.models.fields.TextField', [], {}), | |
| 237 | + 'podparad': ('django.db.models.fields.CharField', [], {'max_length': '4', 'blank': 'True'}), | |
| 238 | + 'pref': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), | |
| 239 | + 'row': ('django.db.models.fields.IntegerField', [], {}), | |
| 240 | + 'rowspan': ('django.db.models.fields.IntegerField', [], {}), | |
| 241 | + 'suf': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), | |
| 242 | + 'typr': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PatternType']", 'db_column': "'typr'"}), | |
| 243 | + 'wariant': ('django.db.models.fields.CharField', [], {'max_length': '4'}) | |
| 244 | + }, | |
| 245 | + u'dictionary.partofspeech': { | |
| 246 | + 'Meta': {'ordering': "['symbol']", 'object_name': 'PartOfSpeech', 'db_table': "'klasygramatyczne'"}, | |
| 247 | + 'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexicalClass']", 'db_column': "'czm'"}), | |
| 248 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'primary_key': 'True', 'db_column': "'pos'"}) | |
| 249 | + }, | |
| 250 | + u'dictionary.pattern': { | |
| 251 | + 'Meta': {'ordering': "['name']", 'object_name': 'Pattern', 'db_table': "'wzory'"}, | |
| 252 | + 'basic_form_ending': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'zakp'", 'blank': 'True'}), | |
| 253 | + 'comment': ('django.db.models.fields.TextField', [], {'db_column': "'komentarz'", 'blank': 'True'}), | |
| 254 | + 'example': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'przyklad'"}), | |
| 255 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 256 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_column': "'w_id'"}), | |
| 257 | + 'status': ('django.db.models.fields.CharField', [], {'max_length': '8'}), | |
| 258 | + 'type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PatternType']", 'db_column': "'typ'"}) | |
| 259 | + }, | |
| 260 | + u'dictionary.patterntype': { | |
| 261 | + 'Meta': {'object_name': 'PatternType', 'db_table': "'typywzorow'"}, | |
| 262 | + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'wtyp'", 'blank': 'True'}), | |
| 263 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 264 | + 'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexicalClass']", 'db_column': "'czm'"}) | |
| 265 | + }, | |
| 266 | + u'dictionary.qualifier': { | |
| 267 | + 'Meta': {'ordering': "['label']", 'unique_together': "(('label', 'vocabulary'),)", 'object_name': 'Qualifier', 'db_table': "'kwalifikatory'"}, | |
| 268 | + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usuniety'"}), | |
| 269 | + 'exclusion_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.QualifierExclusionClass']", 'null': 'True', 'db_column': "'klasa'", 'blank': 'True'}), | |
| 270 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 271 | + 'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'kwal'"}), | |
| 272 | + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'qualifiers'", 'db_column': "'slownik'", 'to': u"orm['dictionary.Vocabulary']"}) | |
| 273 | + }, | |
| 274 | + u'dictionary.qualifierexclusionclass': { | |
| 275 | + 'Meta': {'object_name': 'QualifierExclusionClass', 'db_table': "'klasy_wykluczania'"}, | |
| 276 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 277 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}), | |
| 278 | + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Vocabulary']", 'db_column': "'slownik'"}) | |
| 279 | + }, | |
| 280 | + u'dictionary.savedexportdata': { | |
| 281 | + 'Meta': {'object_name': 'SavedExportData'}, | |
| 282 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 283 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}), | |
| 284 | + 'serialized_data': ('django.db.models.fields.TextField', [], {}) | |
| 285 | + }, | |
| 286 | + u'dictionary.savedfilter': { | |
| 287 | + 'Meta': {'unique_together': "(('name', 'user'),)", 'object_name': 'SavedFilter'}, | |
| 288 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 289 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), | |
| 290 | + 'serialized_filter': ('django.db.models.fields.TextField', [], {}), | |
| 291 | + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) | |
| 292 | + }, | |
| 293 | + u'dictionary.tablecell': { | |
| 294 | + 'Meta': {'object_name': 'TableCell', 'db_table': "'komorki_tabel'"}, | |
| 295 | + 'cell': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['dictionary.Cell']", 'unique': 'True', 'db_column': "'k_id'"}), | |
| 296 | + 'col': ('django.db.models.fields.IntegerField', [], {}), | |
| 297 | + 'colspan': ('django.db.models.fields.IntegerField', [], {}), | |
| 298 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 299 | + 'row': ('django.db.models.fields.IntegerField', [], {}), | |
| 300 | + 'rowspan': ('django.db.models.fields.IntegerField', [], {}) | |
| 301 | + }, | |
| 302 | + u'dictionary.tableheader': { | |
| 303 | + 'Meta': {'object_name': 'TableHeader', 'db_table': "'naglowki_tabel'"}, | |
| 304 | + 'col': ('django.db.models.fields.IntegerField', [], {}), | |
| 305 | + 'colspan': ('django.db.models.fields.IntegerField', [], {}), | |
| 306 | + 'css_class': ('django.db.models.fields.CharField', [], {'max_length': '8', 'db_column': "'styl'"}), | |
| 307 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 308 | + 'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'nagl'", 'blank': 'True'}), | |
| 309 | + 'row': ('django.db.models.fields.IntegerField', [], {}), | |
| 310 | + 'rowspan': ('django.db.models.fields.IntegerField', [], {}), | |
| 311 | + 'table_template': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.TableTemplate']", 'db_column': "'st_id'"}) | |
| 312 | + }, | |
| 313 | + u'dictionary.tabletemplate': { | |
| 314 | + 'Meta': {'object_name': 'TableTemplate', 'db_table': "'szablony_tabel'"}, | |
| 315 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
| 316 | + 'inflection_characteristic': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}), | |
| 317 | + 'pattern_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PatternType']", 'db_column': "'wtyp'"}), | |
| 318 | + 'variant': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Variant']", 'db_column': "'wariant'"}) | |
| 319 | + }, | |
| 320 | + u'dictionary.variant': { | |
| 321 | + 'Meta': {'object_name': 'Variant', 'db_table': "'warianty'"}, | |
| 322 | + 'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True', 'db_column': "'wariant'"}) | |
| 323 | + }, | |
| 324 | + u'dictionary.vocabulary': { | |
| 325 | + 'Meta': {'object_name': 'Vocabulary', 'db_table': "'slowniki'"}, | |
| 326 | + 'classifications': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'vocabularies'", 'blank': 'True', 'to': u"orm['dictionary.Classification']"}), | |
| 327 | + 'editors': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'editable_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}), | |
| 328 | + 'id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True', 'db_column': "'slownik'"}), | |
| 329 | + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'vocabularies'", 'blank': 'True', 'through': u"orm['dictionary.LexemeAssociation']", 'to': u"orm['dictionary.Lexeme']"}), | |
| 330 | + 'managers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'managed_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}), | |
| 331 | + 'viewers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'visible_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}) | |
| 332 | + } | |
| 333 | + } | |
| 334 | + | |
| 335 | + complete_apps = ['dictionary'] | |
| 336 | + symmetrical = True | |
| ... | ... |
dictionary/models.py
| ... | ... | @@ -323,10 +323,11 @@ class Lexeme(Model): |
| 323 | 323 | verbose_name=u'sufiks hasła') |
| 324 | 324 | gloss = TextField(blank=True, db_column='glosa', verbose_name=u'glosa') |
| 325 | 325 | note = TextField(blank=True, db_column='nota', verbose_name=u'nota') |
| 326 | - pronunciation = TextField(blank=True, db_column='wymowa', verbose_name=u'wymowa') | |
| 326 | + pronunciation = TextField( | |
| 327 | + blank=True, db_column='wymowa', verbose_name=u'wymowa') | |
| 327 | 328 | homonym_number = IntegerField(db_column='hom', default=1) |
| 328 | - part_of_speech = ForeignKey(PartOfSpeech, db_column='pos', | |
| 329 | - verbose_name=u'cz. mowy') | |
| 329 | + part_of_speech = ForeignKey( | |
| 330 | + PartOfSpeech, db_column='pos', verbose_name=u'cz. mowy') | |
| 330 | 331 | owner_vocabulary = ForeignKey( |
| 331 | 332 | 'Vocabulary', db_column='slownik', related_name='owned_lexemes') |
| 332 | 333 | source = CharField(max_length=32, blank=True, db_column='zrodlo') |
| ... | ... | @@ -492,6 +493,21 @@ def get_root(basic_form, pos, pattern, ic, use_pattern_ending=False): |
| 492 | 493 | return None |
| 493 | 494 | |
| 494 | 495 | |
| 496 | +class LexemeAttribute(Model): | |
| 497 | + name = CharField(max_length=32) | |
| 498 | + closed = BooleanField() # czy jest zamknięta lista wartości | |
| 499 | + lexical_class = ForeignKey(LexicalClass, blank=True, null=True) | |
| 500 | + part_of_speech = ForeignKey(PartOfSpeech, blank=True, null=True) | |
| 501 | + inflection_characteristic = ForeignKey( | |
| 502 | + InflectionCharacteristic, blank=True, null=True) | |
| 503 | + | |
| 504 | + | |
| 505 | +class LexemeAttributeValue(Model): | |
| 506 | + value = CharField(max_length=32) | |
| 507 | + attribute = ForeignKey(LexemeAttribute, related_name='values') | |
| 508 | + lexemes = ManyToManyField(Lexeme, blank=True) | |
| 509 | + | |
| 510 | + | |
| 495 | 511 | class LexemeInflectionPattern(Model): |
| 496 | 512 | lexeme = ForeignKey(Lexeme, db_column='l_id') |
| 497 | 513 | index = IntegerField(db_column='oind') |
| ... | ... |