Commit 0a881284fcd97da7a2995a6ca7590815baec1082
1 parent
1ff39cb6
zaawansowane stadium tabelek SGJP
Showing
10 changed files
with
862 additions
and
37 deletions
dictionary/ajax_lexeme_view.py
... | ... | @@ -24,7 +24,12 @@ def get_inflection_tables(request, variant, lexeme_id): |
24 | 24 | raise AjaxError('access denied') |
25 | 25 | qualifiers = visible_qualifiers(request.user) |
26 | 26 | tables = lexeme.inflection_tables(variant, qualifiers=qualifiers) |
27 | - return {'tables': tables, 'lexeme': lexeme} | |
27 | + return { | |
28 | + 'tables': tables, | |
29 | + 'lexeme': lexeme, | |
30 | + 'cross_references': lexeme.refs_to.order_by('type__index'), | |
31 | + 'info': lexeme.sgjp_info(), | |
32 | + } | |
28 | 33 | |
29 | 34 | @ajax(method='get', template='inflection_table.html') |
30 | 35 | def table_preview(request, lexeme_id, pattern, inflection_characteristic, |
... | ... |
dictionary/management/commands/import_data.py
... | ... | @@ -24,27 +24,53 @@ DEFAULT_VOCAB = 'SGJP' |
24 | 24 | ATTRS = { |
25 | 25 | u'zwrotność': ( |
26 | 26 | (('v', 'ger', 'pact'), None), |
27 | - (u'—', u'się', u'(się)', u'sobie', u'(sobie)', u'się/sobie'), | |
27 | + ( | |
28 | + (u'—', u''), | |
29 | + (u'się', u'się'), | |
30 | + (u'(się)', u'(się)'), | |
31 | + (u'sobie', u'sobie'), | |
32 | + (u'(sobie)', u'(sobie)'), | |
33 | + (u'się/sobie', u'się/sobie'), | |
34 | + ), | |
28 | 35 | ('haslosuf', lambda suf: suf.strip(' ?') or u'—'), |
29 | 36 | ), |
30 | 37 | u'przechodniość': ( |
31 | 38 | (('v', 'pred'), None), |
32 | - ('iT', 'qT', 'T'), | |
39 | + ( | |
40 | + ('iT', u''), | |
41 | + ('qT', u''), | |
42 | + ('T', u''), | |
43 | + ), | |
33 | 44 | ('przechodniosc', lambda x: x), |
34 | 45 | ), |
35 | 46 | u'aspekt': ( |
36 | 47 | (('v', 'pred', 'ger', 'pact', 'ppas'), None), |
37 | - ('dk', 'ndk', 'ndk/dk', 'dk/ndk', 'ndk/(dk)', 'dk/(ndk)'), | |
48 | + ( | |
49 | + ('dk', u''), | |
50 | + ('ndk', u''), | |
51 | + ('ndk/dk', u''), | |
52 | + ('dk/ndk', u''), | |
53 | + ('ndk/(dk)', u''), | |
54 | + ('dk/(ndk)', u''), | |
55 | + ), | |
38 | 56 | ('aspekt', lambda x: x), |
39 | 57 | ), |
40 | 58 | u'właściwy': ( |
41 | 59 | (('v', 'pred'), None), |
42 | - ('Q', '(Q)', ''), | |
60 | + ( | |
61 | + ('Q', u''), | |
62 | + ('(Q)', u''), | |
63 | + ('', u''), | |
64 | + ), | |
43 | 65 | ('właściwy', lambda x: x), |
44 | 66 | ), |
45 | 67 | u'depr': ( |
46 | 68 | (('subst', 'skrs'), 'm1'), |
47 | - ('n', 'd', 'nd'), | |
69 | + ( | |
70 | + ('n', u''), | |
71 | + ('d', u''), | |
72 | + ('nd', u''), | |
73 | + ), | |
48 | 74 | ('depr', lambda x: x), |
49 | 75 | ) |
50 | 76 | } |
... | ... | @@ -248,9 +274,9 @@ class ImportData(object): |
248 | 274 | for ic0 in pos_ics: |
249 | 275 | la.inflection_characteristics.add(ic0) #add |
250 | 276 | values_cache = {} |
251 | - for val in values: | |
277 | + for val, display_val in values: | |
252 | 278 | values_cache[val], created = LexemeAttributeValue.objects.get_or_create( |
253 | - value=val, attribute=la) | |
279 | + value=val, display_val=display_val, attribute=la) | |
254 | 280 | attr_values[attr_name] = values_cache |
255 | 281 | return attr_values |
256 | 282 | |
... | ... |
dictionary/migrations/0034_auto__add_field_lexemeattributevalue_display_value.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 field 'LexemeAttributeValue.display_value' | |
12 | + db.add_column(u'dictionary_lexemeattributevalue', 'display_value', | |
13 | + self.gf('django.db.models.fields.CharField')(default='', max_length=32, blank=True), | |
14 | + keep_default=False) | |
15 | + | |
16 | + | |
17 | + def backwards(self, orm): | |
18 | + # Deleting field 'LexemeAttributeValue.display_value' | |
19 | + db.delete_column(u'dictionary_lexemeattributevalue', 'display_value') | |
20 | + | |
21 | + | |
22 | + models = { | |
23 | + u'auth.group': { | |
24 | + 'Meta': {'object_name': 'Group'}, | |
25 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
26 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), | |
27 | + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) | |
28 | + }, | |
29 | + u'auth.permission': { | |
30 | + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, | |
31 | + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | |
32 | + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), | |
33 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
34 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) | |
35 | + }, | |
36 | + u'auth.user': { | |
37 | + 'Meta': {'object_name': 'User'}, | |
38 | + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | |
39 | + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), | |
40 | + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | |
41 | + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), | |
42 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
43 | + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), | |
44 | + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
45 | + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
46 | + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | |
47 | + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | |
48 | + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), | |
49 | + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), | |
50 | + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) | |
51 | + }, | |
52 | + u'contenttypes.contenttype': { | |
53 | + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, | |
54 | + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | |
55 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
56 | + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | |
57 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) | |
58 | + }, | |
59 | + u'dictionary.baseformlabel': { | |
60 | + 'Meta': {'object_name': 'BaseFormLabel', 'db_table': "'efobazy'"}, | |
61 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
62 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'efobaz'", 'blank': 'True'}) | |
63 | + }, | |
64 | + u'dictionary.cell': { | |
65 | + 'Meta': {'ordering': "['index']", 'object_name': 'Cell', 'db_table': "'klatki'"}, | |
66 | + 'base_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
67 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
68 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'kind'"}), | |
69 | + 'prefix': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_column': "'prefiks'", 'blank': 'True'}), | |
70 | + 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_column': "'sufiks'", 'blank': 'True'}), | |
71 | + 'table_template': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.TableTemplate']", 'db_column': "'st_id'"}), | |
72 | + 'tag': ('django.db.models.fields.TextField', [], {'db_column': "'tag'", 'blank': 'True'}) | |
73 | + }, | |
74 | + u'dictionary.classification': { | |
75 | + 'Meta': {'object_name': 'Classification', 'db_table': "'klasyfikacje'"}, | |
76 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
77 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}), | |
78 | + 'parts_of_speech': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.PartOfSpeech']", 'symmetrical': 'False'}) | |
79 | + }, | |
80 | + u'dictionary.classificationvalue': { | |
81 | + 'Meta': {'object_name': 'ClassificationValue', 'db_table': "'wartosci_klasyfikacji'"}, | |
82 | + 'classification': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'values'", 'db_column': "'klas_id'", 'to': u"orm['dictionary.Classification']"}), | |
83 | + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usunieta'"}), | |
84 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
85 | + 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}), | |
86 | + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Lexeme']", 'symmetrical': 'False', 'through': u"orm['dictionary.LexemeCV']", 'blank': 'True'}), | |
87 | + 'parent_node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'child_nodes'", 'null': 'True', 'db_column': "'rodzic'", 'to': u"orm['dictionary.ClassificationValue']"}) | |
88 | + }, | |
89 | + u'dictionary.crossreference': { | |
90 | + 'Meta': {'object_name': 'CrossReference', 'db_table': "'odsylacze'"}, | |
91 | + 'from_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'refs_to'", 'db_column': "'l_id_od'", 'to': u"orm['dictionary.Lexeme']"}), | |
92 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
93 | + 'to_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'refs_from'", 'db_column': "'l_id_do'", 'to': u"orm['dictionary.Lexeme']"}), | |
94 | + 'type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.CrossReferenceType']", 'db_column': "'typods_id'"}) | |
95 | + }, | |
96 | + u'dictionary.crossreferencetype': { | |
97 | + 'Meta': {'object_name': 'CrossReferenceType', 'db_table': "'typyodsylaczy'"}, | |
98 | + 'desc': ('django.db.models.fields.CharField', [], {'max_length': '40', 'db_column': "'naglowek'"}), | |
99 | + 'from_pos': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'crtype_to'", 'db_column': "'pos1'", 'to': u"orm['dictionary.PartOfSpeech']"}), | |
100 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
101 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'kolejnosc'"}), | |
102 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '10', 'db_column': "'typods'"}), | |
103 | + 'to_pos': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'crtype_from'", 'db_column': "'pos2'", 'to': u"orm['dictionary.PartOfSpeech']"}) | |
104 | + }, | |
105 | + u'dictionary.ending': { | |
106 | + 'Meta': {'ordering': "['index']", 'unique_together': "(('pattern', 'base_form_label', 'index'),)", 'object_name': 'Ending', 'db_table': "'zakonczenia'"}, | |
107 | + 'base_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
108 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
109 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'zind'"}), | |
110 | + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'endings'", 'db_column': "'w_id'", 'to': u"orm['dictionary.Pattern']"}), | |
111 | + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_zakonczen'", 'blank': 'True'}), | |
112 | + 'string': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'zak'", 'blank': 'True'}) | |
113 | + }, | |
114 | + u'dictionary.history': { | |
115 | + 'Meta': {'object_name': 'History', 'db_table': "'history'"}, | |
116 | + 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'column_name_'", 'blank': 'True'}), | |
117 | + 'column_ord': ('django.db.models.fields.IntegerField', [], {'db_column': "'ordinal_position_of_column_'"}), | |
118 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
119 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'null': 'True', 'db_column': "'lexeme_id_'", 'blank': 'True'}), | |
120 | + 'new_value': ('django.db.models.fields.TextField', [], {'db_column': "'new_value_'", 'blank': 'True'}), | |
121 | + 'old_value': ('django.db.models.fields.TextField', [], {'db_column': "'old_value_'", 'blank': 'True'}), | |
122 | + 'operation': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'operation_'"}), | |
123 | + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Pattern']", 'null': 'True', 'db_column': "'pattern_id_'", 'blank': 'True'}), | |
124 | + 'row_id': ('django.db.models.fields.IntegerField', [], {'db_column': "'id_'"}), | |
125 | + 'table_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'table_name_'"}), | |
126 | + 'table_oid': ('django.db.models.fields.IntegerField', [], {'db_column': "'table_oid_'"}), | |
127 | + 'timestamp': ('django.db.models.fields.DateTimeField', [], {'db_column': "'timestamp_'"}), | |
128 | + 'transaction_began': ('django.db.models.fields.DateTimeField', [], {'db_column': "'transaction_began_'"}), | |
129 | + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'db_column': "'user_id_'"}) | |
130 | + }, | |
131 | + u'dictionary.inflectioncharacteristic': { | |
132 | + 'Meta': {'unique_together': "(('symbol', 'part_of_speech'),)", 'object_name': 'InflectionCharacteristic', 'db_table': "'charfle'"}, | |
133 | + 'basic_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
134 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
135 | + 'part_of_speech': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PartOfSpeech']", 'db_column': "'pos'"}), | |
136 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'charfl'", 'blank': 'True'}) | |
137 | + }, | |
138 | + u'dictionary.inputform': { | |
139 | + 'Meta': {'object_name': 'InputForm'}, | |
140 | + 'form': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), | |
141 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
142 | + 'input_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InputLexeme']"}) | |
143 | + }, | |
144 | + u'dictionary.inputlexeme': { | |
145 | + 'Meta': {'object_name': 'InputLexeme'}, | |
146 | + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), | |
147 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) | |
148 | + }, | |
149 | + u'dictionary.lexeme': { | |
150 | + 'Meta': {'object_name': 'Lexeme', 'db_table': "'leksemy'"}, | |
151 | + 'comment': ('django.db.models.fields.TextField', [], {'db_column': "'komentarz'", 'blank': 'True'}), | |
152 | + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usuniety'"}), | |
153 | + 'entry': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'db_column': "'haslo'", 'blank': 'True'}), | |
154 | + 'entry_suffix': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'haslosuf'", 'blank': 'True'}), | |
155 | + 'gloss': ('django.db.models.fields.TextField', [], {'db_column': "'glosa'", 'blank': 'True'}), | |
156 | + 'homonym_number': ('django.db.models.fields.IntegerField', [], {'default': '1', 'db_column': "'hom'"}), | |
157 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
158 | + 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_column': "'data_modyfikacji'", 'blank': 'True'}), | |
159 | + 'note': ('django.db.models.fields.TextField', [], {'db_column': "'nota'", 'blank': 'True'}), | |
160 | + 'owner_vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_lexemes'", 'db_column': "'slownik'", 'to': u"orm['dictionary.Vocabulary']"}), | |
161 | + 'part_of_speech': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PartOfSpeech']", 'db_column': "'pos'"}), | |
162 | + 'patterns': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Pattern']", 'through': u"orm['dictionary.LexemeInflectionPattern']", 'symmetrical': 'False'}), | |
163 | + 'pronunciation': ('django.db.models.fields.TextField', [], {'db_column': "'wymowa'", 'blank': 'True'}), | |
164 | + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_leksemow'", 'blank': 'True'}), | |
165 | + 'responsible': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'db_column': "'odpowiedzialny'", 'blank': 'True'}), | |
166 | + 'source': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'zrodlo'", 'blank': 'True'}), | |
167 | + 'status': ('django.db.models.fields.CharField', [], {'max_length': '8', 'db_column': "'status'"}), | |
168 | + 'valence': ('django.db.models.fields.TextField', [], {'blank': 'True'}) | |
169 | + }, | |
170 | + u'dictionary.lexemeassociation': { | |
171 | + 'Meta': {'unique_together': "(['lexeme', 'vocabulary'],)", 'object_name': 'LexemeAssociation', 'db_table': "'leksemy_w_slownikach'"}, | |
172 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
173 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'db_column': "'l_id'"}), | |
174 | + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Vocabulary']", 'db_column': "'slownik'"}) | |
175 | + }, | |
176 | + u'dictionary.lexemeattribute': { | |
177 | + 'Meta': {'object_name': 'LexemeAttribute'}, | |
178 | + 'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
179 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
180 | + 'inflection_characteristics': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'symmetrical': 'False', 'blank': 'True'}), | |
181 | + 'multiple': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
182 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), | |
183 | + 'parts_of_speech': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.PartOfSpeech']", 'symmetrical': 'False'}), | |
184 | + 'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
185 | + 'takes_ic': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) | |
186 | + }, | |
187 | + u'dictionary.lexemeattributevalue': { | |
188 | + 'Meta': {'ordering': "['value']", 'object_name': 'LexemeAttributeValue'}, | |
189 | + 'attribute': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'values'", 'to': u"orm['dictionary.LexemeAttribute']"}), | |
190 | + 'display_value': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), | |
191 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
192 | + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Lexeme']", 'symmetrical': 'False', 'through': u"orm['dictionary.LexemeAV']", 'blank': 'True'}), | |
193 | + 'value': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}) | |
194 | + }, | |
195 | + u'dictionary.lexemeav': { | |
196 | + 'Meta': {'unique_together': "(['lexeme', 'attribute_value'],)", 'object_name': 'LexemeAV'}, | |
197 | + 'attribute_value': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexemeAttributeValue']"}), | |
198 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
199 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']"}) | |
200 | + }, | |
201 | + u'dictionary.lexemecv': { | |
202 | + 'Meta': {'unique_together': "(['lexeme', 'classification_value'],)", 'object_name': 'LexemeCV'}, | |
203 | + 'classification_value': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.ClassificationValue']"}), | |
204 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
205 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']"}) | |
206 | + }, | |
207 | + u'dictionary.lexemeform': { | |
208 | + 'Meta': {'object_name': 'LexemeForm'}, | |
209 | + 'form': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), | |
210 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
211 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']"}) | |
212 | + }, | |
213 | + u'dictionary.lexemeinflectionpattern': { | |
214 | + 'Meta': {'ordering': "['index']", 'unique_together': "(('lexeme', 'index'),)", 'object_name': 'LexemeInflectionPattern', 'db_table': "'odmieniasie'"}, | |
215 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
216 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'oind'"}), | |
217 | + 'inflection_characteristic': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}), | |
218 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'db_column': "'l_id'"}), | |
219 | + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Pattern']", 'db_column': "'w_id'"}), | |
220 | + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_odmieniasiow'", 'blank': 'True'}), | |
221 | + 'root': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'rdzen'"}) | |
222 | + }, | |
223 | + u'dictionary.lexicalclass': { | |
224 | + 'Meta': {'object_name': 'LexicalClass', 'db_table': "'czescimowy'"}, | |
225 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'primary_key': 'True', 'db_column': "'czm'"}) | |
226 | + }, | |
227 | + u'dictionary.paradygmatywsjp': { | |
228 | + 'Meta': {'object_name': 'ParadygmatyWSJP', 'db_table': "'paradygmatywsjp'"}, | |
229 | + 'charfl': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}), | |
230 | + 'col': ('django.db.models.fields.IntegerField', [], {}), | |
231 | + 'colspan': ('django.db.models.fields.IntegerField', [], {}), | |
232 | + 'efobaz': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
233 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
234 | + 'kskl': ('django.db.models.fields.IntegerField', [], {}), | |
235 | + 'morf': ('django.db.models.fields.TextField', [], {}), | |
236 | + 'podparad': ('django.db.models.fields.CharField', [], {'max_length': '4', 'blank': 'True'}), | |
237 | + 'pref': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), | |
238 | + 'row': ('django.db.models.fields.IntegerField', [], {}), | |
239 | + 'rowspan': ('django.db.models.fields.IntegerField', [], {}), | |
240 | + 'suf': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), | |
241 | + 'typr': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PatternType']", 'db_column': "'typr'"}), | |
242 | + 'wariant': ('django.db.models.fields.CharField', [], {'max_length': '4'}) | |
243 | + }, | |
244 | + u'dictionary.partofspeech': { | |
245 | + 'Meta': {'ordering': "['index']", 'object_name': 'PartOfSpeech', 'db_table': "'klasygramatyczne'"}, | |
246 | + 'color_scheme': ('django.db.models.fields.IntegerField', [], {}), | |
247 | + 'full_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_column': "'nazwa'"}), | |
248 | + 'index': ('django.db.models.fields.IntegerField', [], {}), | |
249 | + 'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexicalClass']", 'db_column': "'czm'"}), | |
250 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'primary_key': 'True', 'db_column': "'pos'"}) | |
251 | + }, | |
252 | + u'dictionary.pattern': { | |
253 | + 'Meta': {'ordering': "['name']", 'object_name': 'Pattern', 'db_table': "'wzory'"}, | |
254 | + 'basic_form_ending': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'zakp'", 'blank': 'True'}), | |
255 | + 'comment': ('django.db.models.fields.TextField', [], {'db_column': "'komentarz'", 'blank': 'True'}), | |
256 | + 'example': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'przyklad'"}), | |
257 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
258 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_column': "'w_id'"}), | |
259 | + 'status': ('django.db.models.fields.CharField', [], {'max_length': '8'}), | |
260 | + 'type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PatternType']", 'db_column': "'typ'"}) | |
261 | + }, | |
262 | + u'dictionary.patterntype': { | |
263 | + 'Meta': {'object_name': 'PatternType', 'db_table': "'typywzorow'"}, | |
264 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
265 | + 'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexicalClass']", 'db_column': "'czm'"}), | |
266 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'wtyp'", 'blank': 'True'}) | |
267 | + }, | |
268 | + u'dictionary.qualifier': { | |
269 | + 'Meta': {'ordering': "['label']", 'unique_together': "(('label', 'vocabulary'),)", 'object_name': 'Qualifier', 'db_table': "'kwalifikatory'"}, | |
270 | + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usuniety'"}), | |
271 | + 'exclusion_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.QualifierExclusionClass']", 'null': 'True', 'db_column': "'klasa'", 'blank': 'True'}), | |
272 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
273 | + 'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'kwal'"}), | |
274 | + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'qualifiers'", 'db_column': "'slownik'", 'to': u"orm['dictionary.Vocabulary']"}) | |
275 | + }, | |
276 | + u'dictionary.qualifierexclusionclass': { | |
277 | + 'Meta': {'object_name': 'QualifierExclusionClass', 'db_table': "'klasy_wykluczania'"}, | |
278 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
279 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}), | |
280 | + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Vocabulary']", 'db_column': "'slownik'"}) | |
281 | + }, | |
282 | + u'dictionary.savedexportdata': { | |
283 | + 'Meta': {'object_name': 'SavedExportData'}, | |
284 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
285 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}), | |
286 | + 'serialized_data': ('django.db.models.fields.TextField', [], {}) | |
287 | + }, | |
288 | + u'dictionary.savedfilter': { | |
289 | + 'Meta': {'unique_together': "(('name', 'user'),)", 'object_name': 'SavedFilter'}, | |
290 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
291 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), | |
292 | + 'serialized_filter': ('django.db.models.fields.TextField', [], {}), | |
293 | + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) | |
294 | + }, | |
295 | + u'dictionary.tablecell': { | |
296 | + 'Meta': {'object_name': 'TableCell', 'db_table': "'komorki_tabel'"}, | |
297 | + 'cell': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['dictionary.Cell']", 'unique': 'True', 'db_column': "'k_id'"}), | |
298 | + 'col': ('django.db.models.fields.IntegerField', [], {}), | |
299 | + 'colspan': ('django.db.models.fields.IntegerField', [], {}), | |
300 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
301 | + 'row': ('django.db.models.fields.IntegerField', [], {}), | |
302 | + 'rowspan': ('django.db.models.fields.IntegerField', [], {}) | |
303 | + }, | |
304 | + u'dictionary.tableheader': { | |
305 | + 'Meta': {'object_name': 'TableHeader', 'db_table': "'naglowki_tabel'"}, | |
306 | + 'col': ('django.db.models.fields.IntegerField', [], {}), | |
307 | + 'colspan': ('django.db.models.fields.IntegerField', [], {}), | |
308 | + 'css_class': ('django.db.models.fields.CharField', [], {'max_length': '8', 'db_column': "'styl'"}), | |
309 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
310 | + 'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'nagl'", 'blank': 'True'}), | |
311 | + 'row': ('django.db.models.fields.IntegerField', [], {}), | |
312 | + 'rowspan': ('django.db.models.fields.IntegerField', [], {}), | |
313 | + 'table_template': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.TableTemplate']", 'db_column': "'st_id'"}) | |
314 | + }, | |
315 | + u'dictionary.tabletemplate': { | |
316 | + 'Meta': {'object_name': 'TableTemplate', 'db_table': "'szablony_tabel'"}, | |
317 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
318 | + 'inflection_characteristic': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}), | |
319 | + 'pattern_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PatternType']", 'db_column': "'wtyp'"}), | |
320 | + 'variant': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Variant']", 'db_column': "'wariant'"}) | |
321 | + }, | |
322 | + u'dictionary.variant': { | |
323 | + 'Meta': {'object_name': 'Variant', 'db_table': "'warianty'"}, | |
324 | + 'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True', 'db_column': "'wariant'"}) | |
325 | + }, | |
326 | + u'dictionary.vocabulary': { | |
327 | + 'Meta': {'object_name': 'Vocabulary', 'db_table': "'slowniki'"}, | |
328 | + 'classifications': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'vocabularies'", 'blank': 'True', 'to': u"orm['dictionary.Classification']"}), | |
329 | + 'editors': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'editable_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}), | |
330 | + 'id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True', 'db_column': "'slownik'"}), | |
331 | + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'vocabularies'", 'blank': 'True', 'through': u"orm['dictionary.LexemeAssociation']", 'to': u"orm['dictionary.Lexeme']"}), | |
332 | + 'managers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'managed_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}), | |
333 | + 'viewers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'visible_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}) | |
334 | + } | |
335 | + } | |
336 | + | |
337 | + complete_apps = ['dictionary'] | |
0 | 338 | \ No newline at end of file |
... | ... |
dictionary/migrations/0035_display_values.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 | + | |
7 | +ATTRS = { | |
8 | + u'zwrotność': { | |
9 | + u'—': u'', | |
10 | + u'się': u'się', | |
11 | + u'(się)': u'(się)', | |
12 | + u'sobie': u'sobie', | |
13 | + u'(sobie)': u'(sobie)', | |
14 | + u'się/sobie': u'się/sobie', | |
15 | + }, | |
16 | + u'przechodniość': { | |
17 | + 'iT': u'nieprzechodni', | |
18 | + 'qT': u'quasi-przechodni', | |
19 | + 'T': u'przechodni', | |
20 | + }, | |
21 | + u'aspekt': { | |
22 | + 'dk': u'dk', | |
23 | + 'ndk': u'ndk', | |
24 | + 'ndk/dk': u'ndk/dk', | |
25 | + 'dk/ndk': u'dk/ndk', | |
26 | + 'ndk/(dk)': u'ndk/(dk)', | |
27 | + 'dk/(ndk)': u'dk/(ndk)', | |
28 | + }, | |
29 | + u'właściwy': { | |
30 | + 'Q': u'niewłaściwy', | |
31 | + '(Q)': u'właściwy/niewłaściwy', | |
32 | + '': u'właściwy', | |
33 | + }, | |
34 | + u'depr': { | |
35 | + 'n': u'', | |
36 | + 'd': u'', | |
37 | + 'nd': u'', | |
38 | + }, | |
39 | +} | |
40 | + | |
41 | +class Migration(DataMigration): | |
42 | + | |
43 | + def forwards(self, orm): | |
44 | + for av in orm.LexemeAttributeValue.objects.all(): | |
45 | + av.display_value = ATTRS[av.attribute.name][av.value] | |
46 | + av.save() | |
47 | + | |
48 | + def backwards(self, orm): | |
49 | + pass | |
50 | + | |
51 | + models = { | |
52 | + u'auth.group': { | |
53 | + 'Meta': {'object_name': 'Group'}, | |
54 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
55 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), | |
56 | + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) | |
57 | + }, | |
58 | + u'auth.permission': { | |
59 | + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, | |
60 | + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | |
61 | + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), | |
62 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
63 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) | |
64 | + }, | |
65 | + u'auth.user': { | |
66 | + 'Meta': {'object_name': 'User'}, | |
67 | + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | |
68 | + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), | |
69 | + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | |
70 | + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), | |
71 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
72 | + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), | |
73 | + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
74 | + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
75 | + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | |
76 | + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | |
77 | + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), | |
78 | + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), | |
79 | + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) | |
80 | + }, | |
81 | + u'contenttypes.contenttype': { | |
82 | + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, | |
83 | + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | |
84 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
85 | + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | |
86 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) | |
87 | + }, | |
88 | + u'dictionary.baseformlabel': { | |
89 | + 'Meta': {'object_name': 'BaseFormLabel', 'db_table': "'efobazy'"}, | |
90 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
91 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'efobaz'", 'blank': 'True'}) | |
92 | + }, | |
93 | + u'dictionary.cell': { | |
94 | + 'Meta': {'ordering': "['index']", 'object_name': 'Cell', 'db_table': "'klatki'"}, | |
95 | + 'base_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
96 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
97 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'kind'"}), | |
98 | + 'prefix': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_column': "'prefiks'", 'blank': 'True'}), | |
99 | + 'suffix': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_column': "'sufiks'", 'blank': 'True'}), | |
100 | + 'table_template': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.TableTemplate']", 'db_column': "'st_id'"}), | |
101 | + 'tag': ('django.db.models.fields.TextField', [], {'db_column': "'tag'", 'blank': 'True'}) | |
102 | + }, | |
103 | + u'dictionary.classification': { | |
104 | + 'Meta': {'object_name': 'Classification', 'db_table': "'klasyfikacje'"}, | |
105 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
106 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}), | |
107 | + 'parts_of_speech': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.PartOfSpeech']", 'symmetrical': 'False'}) | |
108 | + }, | |
109 | + u'dictionary.classificationvalue': { | |
110 | + 'Meta': {'object_name': 'ClassificationValue', 'db_table': "'wartosci_klasyfikacji'"}, | |
111 | + 'classification': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'values'", 'db_column': "'klas_id'", 'to': u"orm['dictionary.Classification']"}), | |
112 | + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usunieta'"}), | |
113 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
114 | + 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}), | |
115 | + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Lexeme']", 'symmetrical': 'False', 'through': u"orm['dictionary.LexemeCV']", 'blank': 'True'}), | |
116 | + 'parent_node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'child_nodes'", 'null': 'True', 'db_column': "'rodzic'", 'to': u"orm['dictionary.ClassificationValue']"}) | |
117 | + }, | |
118 | + u'dictionary.crossreference': { | |
119 | + 'Meta': {'object_name': 'CrossReference', 'db_table': "'odsylacze'"}, | |
120 | + 'from_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'refs_to'", 'db_column': "'l_id_od'", 'to': u"orm['dictionary.Lexeme']"}), | |
121 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
122 | + 'to_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'refs_from'", 'db_column': "'l_id_do'", 'to': u"orm['dictionary.Lexeme']"}), | |
123 | + 'type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.CrossReferenceType']", 'db_column': "'typods_id'"}) | |
124 | + }, | |
125 | + u'dictionary.crossreferencetype': { | |
126 | + 'Meta': {'object_name': 'CrossReferenceType', 'db_table': "'typyodsylaczy'"}, | |
127 | + 'desc': ('django.db.models.fields.CharField', [], {'max_length': '40', 'db_column': "'naglowek'"}), | |
128 | + 'from_pos': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'crtype_to'", 'db_column': "'pos1'", 'to': u"orm['dictionary.PartOfSpeech']"}), | |
129 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
130 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'kolejnosc'"}), | |
131 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '10', 'db_column': "'typods'"}), | |
132 | + 'to_pos': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'crtype_from'", 'db_column': "'pos2'", 'to': u"orm['dictionary.PartOfSpeech']"}) | |
133 | + }, | |
134 | + u'dictionary.ending': { | |
135 | + 'Meta': {'ordering': "['index']", 'unique_together': "(('pattern', 'base_form_label', 'index'),)", 'object_name': 'Ending', 'db_table': "'zakonczenia'"}, | |
136 | + 'base_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
137 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
138 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'zind'"}), | |
139 | + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'endings'", 'db_column': "'w_id'", 'to': u"orm['dictionary.Pattern']"}), | |
140 | + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_zakonczen'", 'blank': 'True'}), | |
141 | + 'string': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'zak'", 'blank': 'True'}) | |
142 | + }, | |
143 | + u'dictionary.history': { | |
144 | + 'Meta': {'object_name': 'History', 'db_table': "'history'"}, | |
145 | + 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'column_name_'", 'blank': 'True'}), | |
146 | + 'column_ord': ('django.db.models.fields.IntegerField', [], {'db_column': "'ordinal_position_of_column_'"}), | |
147 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
148 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'null': 'True', 'db_column': "'lexeme_id_'", 'blank': 'True'}), | |
149 | + 'new_value': ('django.db.models.fields.TextField', [], {'db_column': "'new_value_'", 'blank': 'True'}), | |
150 | + 'old_value': ('django.db.models.fields.TextField', [], {'db_column': "'old_value_'", 'blank': 'True'}), | |
151 | + 'operation': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'operation_'"}), | |
152 | + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Pattern']", 'null': 'True', 'db_column': "'pattern_id_'", 'blank': 'True'}), | |
153 | + 'row_id': ('django.db.models.fields.IntegerField', [], {'db_column': "'id_'"}), | |
154 | + 'table_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'table_name_'"}), | |
155 | + 'table_oid': ('django.db.models.fields.IntegerField', [], {'db_column': "'table_oid_'"}), | |
156 | + 'timestamp': ('django.db.models.fields.DateTimeField', [], {'db_column': "'timestamp_'"}), | |
157 | + 'transaction_began': ('django.db.models.fields.DateTimeField', [], {'db_column': "'transaction_began_'"}), | |
158 | + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'db_column': "'user_id_'"}) | |
159 | + }, | |
160 | + u'dictionary.inflectioncharacteristic': { | |
161 | + 'Meta': {'unique_together': "(('symbol', 'part_of_speech'),)", 'object_name': 'InflectionCharacteristic', 'db_table': "'charfle'"}, | |
162 | + 'basic_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
163 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
164 | + 'part_of_speech': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PartOfSpeech']", 'db_column': "'pos'"}), | |
165 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'charfl'", 'blank': 'True'}) | |
166 | + }, | |
167 | + u'dictionary.inputform': { | |
168 | + 'Meta': {'object_name': 'InputForm'}, | |
169 | + 'form': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), | |
170 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
171 | + 'input_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InputLexeme']"}) | |
172 | + }, | |
173 | + u'dictionary.inputlexeme': { | |
174 | + 'Meta': {'object_name': 'InputLexeme'}, | |
175 | + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}), | |
176 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) | |
177 | + }, | |
178 | + u'dictionary.lexeme': { | |
179 | + 'Meta': {'object_name': 'Lexeme', 'db_table': "'leksemy'"}, | |
180 | + 'comment': ('django.db.models.fields.TextField', [], {'db_column': "'komentarz'", 'blank': 'True'}), | |
181 | + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usuniety'"}), | |
182 | + 'entry': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'db_column': "'haslo'", 'blank': 'True'}), | |
183 | + 'entry_suffix': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'haslosuf'", 'blank': 'True'}), | |
184 | + 'gloss': ('django.db.models.fields.TextField', [], {'db_column': "'glosa'", 'blank': 'True'}), | |
185 | + 'homonym_number': ('django.db.models.fields.IntegerField', [], {'default': '1', 'db_column': "'hom'"}), | |
186 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
187 | + 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_column': "'data_modyfikacji'", 'blank': 'True'}), | |
188 | + 'note': ('django.db.models.fields.TextField', [], {'db_column': "'nota'", 'blank': 'True'}), | |
189 | + 'owner_vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_lexemes'", 'db_column': "'slownik'", 'to': u"orm['dictionary.Vocabulary']"}), | |
190 | + 'part_of_speech': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PartOfSpeech']", 'db_column': "'pos'"}), | |
191 | + 'patterns': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Pattern']", 'through': u"orm['dictionary.LexemeInflectionPattern']", 'symmetrical': 'False'}), | |
192 | + 'pronunciation': ('django.db.models.fields.TextField', [], {'db_column': "'wymowa'", 'blank': 'True'}), | |
193 | + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_leksemow'", 'blank': 'True'}), | |
194 | + 'responsible': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'db_column': "'odpowiedzialny'", 'blank': 'True'}), | |
195 | + 'source': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'zrodlo'", 'blank': 'True'}), | |
196 | + 'status': ('django.db.models.fields.CharField', [], {'max_length': '8', 'db_column': "'status'"}), | |
197 | + 'valence': ('django.db.models.fields.TextField', [], {'blank': 'True'}) | |
198 | + }, | |
199 | + u'dictionary.lexemeassociation': { | |
200 | + 'Meta': {'unique_together': "(['lexeme', 'vocabulary'],)", 'object_name': 'LexemeAssociation', 'db_table': "'leksemy_w_slownikach'"}, | |
201 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
202 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'db_column': "'l_id'"}), | |
203 | + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Vocabulary']", 'db_column': "'slownik'"}) | |
204 | + }, | |
205 | + u'dictionary.lexemeattribute': { | |
206 | + 'Meta': {'object_name': 'LexemeAttribute'}, | |
207 | + 'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
208 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
209 | + 'inflection_characteristics': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'symmetrical': 'False', 'blank': 'True'}), | |
210 | + 'multiple': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
211 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), | |
212 | + 'parts_of_speech': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.PartOfSpeech']", 'symmetrical': 'False'}), | |
213 | + 'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | |
214 | + 'takes_ic': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) | |
215 | + }, | |
216 | + u'dictionary.lexemeattributevalue': { | |
217 | + 'Meta': {'ordering': "['value']", 'object_name': 'LexemeAttributeValue'}, | |
218 | + 'attribute': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'values'", 'to': u"orm['dictionary.LexemeAttribute']"}), | |
219 | + 'display_value': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), | |
220 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
221 | + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Lexeme']", 'symmetrical': 'False', 'through': u"orm['dictionary.LexemeAV']", 'blank': 'True'}), | |
222 | + 'value': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}) | |
223 | + }, | |
224 | + u'dictionary.lexemeav': { | |
225 | + 'Meta': {'unique_together': "(['lexeme', 'attribute_value'],)", 'object_name': 'LexemeAV'}, | |
226 | + 'attribute_value': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexemeAttributeValue']"}), | |
227 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
228 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']"}) | |
229 | + }, | |
230 | + u'dictionary.lexemecv': { | |
231 | + 'Meta': {'unique_together': "(['lexeme', 'classification_value'],)", 'object_name': 'LexemeCV'}, | |
232 | + 'classification_value': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.ClassificationValue']"}), | |
233 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
234 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']"}) | |
235 | + }, | |
236 | + u'dictionary.lexemeform': { | |
237 | + 'Meta': {'object_name': 'LexemeForm'}, | |
238 | + 'form': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}), | |
239 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
240 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']"}) | |
241 | + }, | |
242 | + u'dictionary.lexemeinflectionpattern': { | |
243 | + 'Meta': {'ordering': "['index']", 'unique_together': "(('lexeme', 'index'),)", 'object_name': 'LexemeInflectionPattern', 'db_table': "'odmieniasie'"}, | |
244 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
245 | + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'oind'"}), | |
246 | + 'inflection_characteristic': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}), | |
247 | + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Lexeme']", 'db_column': "'l_id'"}), | |
248 | + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Pattern']", 'db_column': "'w_id'"}), | |
249 | + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_odmieniasiow'", 'blank': 'True'}), | |
250 | + 'root': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'rdzen'"}) | |
251 | + }, | |
252 | + u'dictionary.lexicalclass': { | |
253 | + 'Meta': {'object_name': 'LexicalClass', 'db_table': "'czescimowy'"}, | |
254 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'primary_key': 'True', 'db_column': "'czm'"}) | |
255 | + }, | |
256 | + u'dictionary.paradygmatywsjp': { | |
257 | + 'Meta': {'object_name': 'ParadygmatyWSJP', 'db_table': "'paradygmatywsjp'"}, | |
258 | + 'charfl': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}), | |
259 | + 'col': ('django.db.models.fields.IntegerField', [], {}), | |
260 | + 'colspan': ('django.db.models.fields.IntegerField', [], {}), | |
261 | + 'efobaz': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}), | |
262 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
263 | + 'kskl': ('django.db.models.fields.IntegerField', [], {}), | |
264 | + 'morf': ('django.db.models.fields.TextField', [], {}), | |
265 | + 'podparad': ('django.db.models.fields.CharField', [], {'max_length': '4', 'blank': 'True'}), | |
266 | + 'pref': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), | |
267 | + 'row': ('django.db.models.fields.IntegerField', [], {}), | |
268 | + 'rowspan': ('django.db.models.fields.IntegerField', [], {}), | |
269 | + 'suf': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), | |
270 | + 'typr': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PatternType']", 'db_column': "'typr'"}), | |
271 | + 'wariant': ('django.db.models.fields.CharField', [], {'max_length': '4'}) | |
272 | + }, | |
273 | + u'dictionary.partofspeech': { | |
274 | + 'Meta': {'ordering': "['index']", 'object_name': 'PartOfSpeech', 'db_table': "'klasygramatyczne'"}, | |
275 | + 'color_scheme': ('django.db.models.fields.IntegerField', [], {}), | |
276 | + 'full_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_column': "'nazwa'"}), | |
277 | + 'index': ('django.db.models.fields.IntegerField', [], {}), | |
278 | + 'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexicalClass']", 'db_column': "'czm'"}), | |
279 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'primary_key': 'True', 'db_column': "'pos'"}) | |
280 | + }, | |
281 | + u'dictionary.pattern': { | |
282 | + 'Meta': {'ordering': "['name']", 'object_name': 'Pattern', 'db_table': "'wzory'"}, | |
283 | + 'basic_form_ending': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'zakp'", 'blank': 'True'}), | |
284 | + 'comment': ('django.db.models.fields.TextField', [], {'db_column': "'komentarz'", 'blank': 'True'}), | |
285 | + 'example': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'przyklad'"}), | |
286 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
287 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_column': "'w_id'"}), | |
288 | + 'status': ('django.db.models.fields.CharField', [], {'max_length': '8'}), | |
289 | + 'type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PatternType']", 'db_column': "'typ'"}) | |
290 | + }, | |
291 | + u'dictionary.patterntype': { | |
292 | + 'Meta': {'object_name': 'PatternType', 'db_table': "'typywzorow'"}, | |
293 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
294 | + 'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.LexicalClass']", 'db_column': "'czm'"}), | |
295 | + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'wtyp'", 'blank': 'True'}) | |
296 | + }, | |
297 | + u'dictionary.qualifier': { | |
298 | + 'Meta': {'ordering': "['label']", 'unique_together': "(('label', 'vocabulary'),)", 'object_name': 'Qualifier', 'db_table': "'kwalifikatory'"}, | |
299 | + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usuniety'"}), | |
300 | + 'exclusion_class': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.QualifierExclusionClass']", 'null': 'True', 'db_column': "'klasa'", 'blank': 'True'}), | |
301 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
302 | + 'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'kwal'"}), | |
303 | + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'qualifiers'", 'db_column': "'slownik'", 'to': u"orm['dictionary.Vocabulary']"}) | |
304 | + }, | |
305 | + u'dictionary.qualifierexclusionclass': { | |
306 | + 'Meta': {'object_name': 'QualifierExclusionClass', 'db_table': "'klasy_wykluczania'"}, | |
307 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
308 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}), | |
309 | + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Vocabulary']", 'db_column': "'slownik'"}) | |
310 | + }, | |
311 | + u'dictionary.savedexportdata': { | |
312 | + 'Meta': {'object_name': 'SavedExportData'}, | |
313 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
314 | + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}), | |
315 | + 'serialized_data': ('django.db.models.fields.TextField', [], {}) | |
316 | + }, | |
317 | + u'dictionary.savedfilter': { | |
318 | + 'Meta': {'unique_together': "(('name', 'user'),)", 'object_name': 'SavedFilter'}, | |
319 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
320 | + 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}), | |
321 | + 'serialized_filter': ('django.db.models.fields.TextField', [], {}), | |
322 | + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) | |
323 | + }, | |
324 | + u'dictionary.tablecell': { | |
325 | + 'Meta': {'object_name': 'TableCell', 'db_table': "'komorki_tabel'"}, | |
326 | + 'cell': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['dictionary.Cell']", 'unique': 'True', 'db_column': "'k_id'"}), | |
327 | + 'col': ('django.db.models.fields.IntegerField', [], {}), | |
328 | + 'colspan': ('django.db.models.fields.IntegerField', [], {}), | |
329 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
330 | + 'row': ('django.db.models.fields.IntegerField', [], {}), | |
331 | + 'rowspan': ('django.db.models.fields.IntegerField', [], {}) | |
332 | + }, | |
333 | + u'dictionary.tableheader': { | |
334 | + 'Meta': {'object_name': 'TableHeader', 'db_table': "'naglowki_tabel'"}, | |
335 | + 'col': ('django.db.models.fields.IntegerField', [], {}), | |
336 | + 'colspan': ('django.db.models.fields.IntegerField', [], {}), | |
337 | + 'css_class': ('django.db.models.fields.CharField', [], {'max_length': '8', 'db_column': "'styl'"}), | |
338 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
339 | + 'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'nagl'", 'blank': 'True'}), | |
340 | + 'row': ('django.db.models.fields.IntegerField', [], {}), | |
341 | + 'rowspan': ('django.db.models.fields.IntegerField', [], {}), | |
342 | + 'table_template': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.TableTemplate']", 'db_column': "'st_id'"}) | |
343 | + }, | |
344 | + u'dictionary.tabletemplate': { | |
345 | + 'Meta': {'object_name': 'TableTemplate', 'db_table': "'szablony_tabel'"}, | |
346 | + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |
347 | + 'inflection_characteristic': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}), | |
348 | + 'pattern_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.PatternType']", 'db_column': "'wtyp'"}), | |
349 | + 'variant': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Variant']", 'db_column': "'wariant'"}) | |
350 | + }, | |
351 | + u'dictionary.variant': { | |
352 | + 'Meta': {'object_name': 'Variant', 'db_table': "'warianty'"}, | |
353 | + 'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True', 'db_column': "'wariant'"}) | |
354 | + }, | |
355 | + u'dictionary.vocabulary': { | |
356 | + 'Meta': {'object_name': 'Vocabulary', 'db_table': "'slowniki'"}, | |
357 | + 'classifications': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'vocabularies'", 'blank': 'True', 'to': u"orm['dictionary.Classification']"}), | |
358 | + 'editors': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'editable_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}), | |
359 | + 'id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True', 'db_column': "'slownik'"}), | |
360 | + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'vocabularies'", 'blank': 'True', 'through': u"orm['dictionary.LexemeAssociation']", 'to': u"orm['dictionary.Lexeme']"}), | |
361 | + 'managers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'managed_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}), | |
362 | + 'viewers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'visible_vocabularies'", 'blank': 'True', 'to': u"orm['auth.User']"}) | |
363 | + } | |
364 | + } | |
365 | + | |
366 | + complete_apps = ['dictionary'] | |
367 | + symmetrical = True | |
... | ... |
dictionary/models.py
... | ... | @@ -467,14 +467,16 @@ class Lexeme(Model): |
467 | 467 | |
468 | 468 | def attributes_values(self, part_of_speech=None, ics=None): |
469 | 469 | for attr in self.attributes(part_of_speech, ics): |
470 | - if attr.multiple: | |
471 | - v = attr.values.filter(lexemes=self) | |
472 | - else: | |
473 | - try: | |
474 | - v = attr.values.get(lexemes=self) | |
475 | - except LexemeAttributeValue.DoesNotExist: | |
476 | - v = None | |
477 | - yield (attr, v) | |
470 | + yield (attr, self.attribute_value(attr)) | |
471 | + | |
472 | + def attribute_value(self, attribute): | |
473 | + if attribute.multiple: | |
474 | + return attribute.values.filter(lexemes=self) | |
475 | + else: | |
476 | + try: | |
477 | + return attribute.values.get(lexemes=self) | |
478 | + except LexemeAttributeValue.DoesNotExist: | |
479 | + return None | |
478 | 480 | |
479 | 481 | def perm(self, user, action): |
480 | 482 | if action == 'view': |
... | ... | @@ -495,11 +497,15 @@ class Lexeme(Model): |
495 | 497 | |
496 | 498 | def sgjp_info(self): |
497 | 499 | commonness = Classification.objects.get(name=u'pospolitość') |
498 | - info = { | |
500 | + commonness_labels = list(self.classification_values( | |
501 | + commonness).values_list('label', flat=True)) | |
502 | + if commonness_labels == ['pospolita']: | |
503 | + commonness_labels = [] | |
504 | + return { | |
499 | 505 | 'SJPDor': bool(self.vocabularies.filter(id='SJPDor')), |
500 | - 'commonness': self.classification_values(commonness) | |
506 | + 'commonness': commonness_labels, | |
507 | + 'qualifiers': self.qualifiers.values_list('label', flat=True), | |
501 | 508 | } |
502 | - return info | |
503 | 509 | |
504 | 510 | def __unicode__(self): |
505 | 511 | return '%s (%s)' % (self.entry, self.part_of_speech.symbol) |
... | ... | @@ -558,7 +564,8 @@ class LexemeAttribute(Model): |
558 | 564 | |
559 | 565 | |
560 | 566 | class LexemeAttributeValue(Model): |
561 | - value = CharField(max_length=32) | |
567 | + value = CharField(max_length=32, blank=True) | |
568 | + display_value = CharField(max_length=32, blank=True) | |
562 | 569 | attribute = ForeignKey(LexemeAttribute, related_name='values') |
563 | 570 | lexemes = ManyToManyField(Lexeme, blank=True, through='LexemeAV') |
564 | 571 | |
... | ... | @@ -690,7 +697,7 @@ class LexemeInflectionPattern(Model): |
690 | 697 | if label_filter: |
691 | 698 | endings = endings.filter(base_form_label__symbol__regex=label_filter) |
692 | 699 | if not edit_view: |
693 | - l_qual = set(self.lexeme.qualifiers.all() & qualifiers) | |
700 | + #l_qual = set(self.lexeme.qualifiers.all() & qualifiers) | |
694 | 701 | # podgląd może być na niezapisanym lipie |
695 | 702 | lip_qual = set(self.qualifiers.all() & qualifiers if self.pk else ()) |
696 | 703 | forms = [ |
... | ... | @@ -699,8 +706,7 @@ class LexemeInflectionPattern(Model): |
699 | 706 | (cell.prefix + self.root + separator + ending.string + cell.suffix |
700 | 707 | if affixes else self.root + separator + ending.string), |
701 | 708 | #+ '#' + cell.base_form_label.symbol, |
702 | - combine_qualifiers(l_qual, lip_qual, | |
703 | - set(ending.qualifiers.all() & qualifiers)) | |
709 | + combine_qualifiers(lip_qual, set(ending.qualifiers.all() & qualifiers)) | |
704 | 710 | if not edit_view else set(ending.qualifiers.all() & qualifiers), |
705 | 711 | ) |
706 | 712 | for ending in endings |
... | ... | @@ -737,8 +743,9 @@ def all_forms(pattern, ic, pos, base, variant='1', affixes=True): |
737 | 743 | for ending in endings) |
738 | 744 | return forms |
739 | 745 | |
740 | -def combine_qualifiers(l_qualifiers, lip_qualifiers, e_qualifiers): | |
741 | - qualifiers = set(l_qualifiers) | |
746 | +def combine_qualifiers(lip_qualifiers, e_qualifiers): | |
747 | + #qualifiers = set(l_qualifiers) | |
748 | + qualifiers = set() | |
742 | 749 | for q in list(lip_qualifiers) + list(e_qualifiers): |
743 | 750 | if q.exclusion_class: |
744 | 751 | excluded = set(q.exclusion_class.qualifier_set.all()) |
... | ... |
dictionary/templates/inflection_tables.html
1 | -<span class="entry-article scheme{{ lexeme.part_of_speech.color_scheme }}"> | |
1 | +{% load dictionary_extras %} | |
2 | +<div class="entry-article scheme{{ lexeme.part_of_speech.color_scheme }}"> | |
2 | 3 | <h1> |
3 | 4 | {{ lexeme.entry }} |
5 | + {{ lexeme|attribute:"zwrotność" }} | |
4 | 6 | {% if lexeme.pronunciation %} |
5 | 7 | <span class="pronunciation">[{{ lexeme.pronunciation|safe }}]</span> |
6 | 8 | {% endif %} |
7 | 9 | {% if lexeme.gloss %} |
8 | - <span class="gloss">‘{{ lexeme.gloss|safe }}‘</span> | |
10 | + <span class="gloss">{{ lexeme.gloss|safe }}</span> | |
9 | 11 | {% endif %} |
10 | 12 | </h1> |
11 | 13 | <p> |
12 | 14 | {{ lexeme.part_of_speech.full_name }} |
13 | - {# kwalifikatory leksemu #} | |
14 | - {# nota #} | |
15 | - {# SJPDor #} | |
15 | + {% if lexeme.part_of_speech.symbol == 'v' %} | |
16 | + {{ lexeme|attribute:"właściwy" }} | |
17 | + {{ lexeme|attribute:"przechodniość" }} | |
18 | + {% endif %} | |
19 | + <span class="qualifiers"> | |
20 | + {{ info.qualifiers|join:" " }} | |
21 | + {% if info.commonness %} | |
22 | + n. wł. {{ info.commonness|join:", " }} | |
23 | + {% endif %} | |
24 | + </span> | |
25 | + {% if lexeme.note %} | |
26 | + ◊ {{ lexeme.note|safe }} | |
27 | + {% endif %} | |
28 | + <span class="sjpdor"> | |
29 | + {{ info.SJPDor|yesno:"[SJPDor.]," }} | |
30 | + </span> | |
16 | 31 | </p> |
17 | 32 | <p> |
18 | - {{ lexeme.lip_data.inflection_characteristics }} | |
33 | + {% if lexeme.part_of_speech.lexical_class.symbol == 'subst' %} | |
34 | + {{ lexeme.lip_data.inflection_characteristics }} | |
35 | + {% endif %} | |
36 | + {{ lexeme|attribute:"aspekt" }} | |
19 | 37 | {% if tables|length == 1 %} |
20 | 38 | {{ lexeme.lip_data.patterns }} |
21 | 39 | {% endif %} |
... | ... | @@ -28,4 +46,15 @@ |
28 | 46 | </div> |
29 | 47 | {% endfor %} |
30 | 48 | </div> |
31 | -</span> | |
32 | 49 | \ No newline at end of file |
50 | + {% if cross_references %} | |
51 | + <table class="cross-references"> | |
52 | + <tr><th class="head" colspan="2">Odsyłacze</th></tr> | |
53 | + {% for cr in cross_references %} | |
54 | + <tr> | |
55 | + <th>{{ cr.type.desc }}</th> | |
56 | + <td>{{ cr.to_lexeme.entry }}</td> | |
57 | + </tr> | |
58 | + {% endfor %} | |
59 | + </table> | |
60 | + {% endif %} | |
61 | +</div> | |
33 | 62 | \ No newline at end of file |
... | ... |
dictionary/templatetags/ajax_export.py deleted
dictionary/templatetags/dictionary_extras.py
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | from django import template |
4 | 4 | from dictionary.history import lexeme_table_from_row |
5 | +from dictionary.models import LexemeAttribute | |
5 | 6 | |
6 | 7 | register = template.Library() |
7 | 8 | |
... | ... | @@ -13,3 +14,13 @@ def value_tree(tree): |
13 | 14 | @register.filter |
14 | 15 | def lexeme_table(row): |
15 | 16 | return lexeme_table_from_row(row) |
17 | + | |
18 | +@register.filter | |
19 | +def attribute(lexeme, attr_name): | |
20 | + attribute = LexemeAttribute.objects.get(name=attr_name) | |
21 | + if attribute.multiple: | |
22 | + return lexeme.attribute_value(attribute).values_list( | |
23 | + 'display_value', flat=True) | |
24 | + else: | |
25 | + attr = lexeme.attribute_value(attribute) | |
26 | + return attr.display_value if attr else '' | |
... | ... |
media/css/inflection_table.css
1 | -span.entry-article h1 { | |
1 | +.entry-article h1 { | |
2 | 2 | padding: 5px; |
3 | 3 | font-size: large; |
4 | 4 | } |
... | ... | @@ -14,12 +14,20 @@ span.gloss { |
14 | 14 | font-style: italic; |
15 | 15 | } |
16 | 16 | |
17 | -span.entry-article caption { | |
17 | +span.qualifiers { | |
18 | + font-style: italic; | |
19 | +} | |
20 | + | |
21 | +span.sjpdor { | |
22 | + font-size: x-small; | |
23 | +} | |
24 | + | |
25 | +.entry-article caption { | |
18 | 26 | padding: 3px; |
19 | 27 | text-align: left; |
20 | 28 | } |
21 | 29 | |
22 | -span.entry-article .separator { | |
30 | +.entry-article .separator { | |
23 | 31 | height: 5px; |
24 | 32 | } |
25 | 33 | |
... | ... | @@ -52,55 +60,65 @@ table.inflection-table td span.qualifiers { |
52 | 60 | } |
53 | 61 | |
54 | 62 | .scheme0 .separator, |
63 | +.scheme0 table.cross-references tr th, | |
55 | 64 | .scheme0 table.inflection-table td { |
56 | 65 | background-color: #ebf3ff; |
57 | 66 | } |
58 | 67 | .scheme0 h1, |
59 | 68 | .scheme0 caption, |
69 | +.scheme0 table.cross-references tr th.head, | |
60 | 70 | .scheme0 table.inflection-table td.header-c, |
61 | 71 | .scheme0 table.inflection-table td.header { |
62 | 72 | background-color: #bfdbff; |
63 | 73 | } |
64 | 74 | |
65 | 75 | .scheme1 .separator, |
76 | +.scheme1 table.cross-references tr th, | |
66 | 77 | .scheme1 table.inflection-table td { |
67 | 78 | background-color: #e2ffde; |
68 | 79 | } |
69 | 80 | .scheme1 h1, |
70 | 81 | .scheme1 caption, |
82 | +.scheme1 table.cross-references tr th.head, | |
71 | 83 | .scheme1 table.inflection-table td.header-c, |
72 | 84 | .scheme1 table.inflection-table td.header { |
73 | 85 | background-color: #b7ffae; |
74 | 86 | } |
75 | 87 | |
76 | 88 | .scheme2 .separator, |
89 | +.scheme2 table.cross-references tr th, | |
77 | 90 | .scheme2 table.inflection-table td { |
78 | 91 | background-color: #ffebde; |
79 | 92 | } |
80 | 93 | .scheme2 h1, |
81 | 94 | .scheme2 caption, |
95 | +.scheme2 table.cross-references tr th.head, | |
82 | 96 | .scheme2 table.inflection-table td.header-c, |
83 | 97 | .scheme2 table.inflection-table td.header { |
84 | 98 | background-color: #ffdec7; |
85 | 99 | } |
86 | 100 | |
87 | 101 | .scheme3 .separator, |
102 | +.scheme3 table.cross-references tr th, | |
88 | 103 | .scheme3 table.inflection-table td { |
89 | 104 | background-color: #f4deff; |
90 | 105 | } |
91 | 106 | .scheme3 h1, |
92 | 107 | .scheme3 caption, |
108 | +.scheme3 table.cross-references tr th.head, | |
93 | 109 | .scheme3 table.inflection-table td.header-c, |
94 | 110 | .scheme3 table.inflection-table td.header { |
95 | 111 | background-color: #e8beff; |
96 | 112 | } |
97 | 113 | |
98 | 114 | .scheme4 .separator, |
115 | +.scheme4 table.cross-references tr th, | |
99 | 116 | .scheme4 table.inflection-table td { |
100 | 117 | background-color: #eeeeee; |
101 | 118 | } |
102 | 119 | .scheme4 h1, |
103 | 120 | .scheme4 caption, |
121 | +.scheme4 table.cross-references tr th.head, | |
104 | 122 | .scheme4 table.inflection-table td.header-c, |
105 | 123 | .scheme4 table.inflection-table td.header { |
106 | 124 | background-color: #aaaaaa; |
... | ... | @@ -119,3 +137,28 @@ ul.form-list { |
119 | 137 | padding: 0; |
120 | 138 | margin: 0; |
121 | 139 | } |
140 | + | |
141 | +table.cross-references { | |
142 | + width: 100%; | |
143 | + font-size: small; | |
144 | + margin-top: 20px; | |
145 | + border-spacing: 2px; | |
146 | +} | |
147 | + | |
148 | +table.cross-references th { | |
149 | + text-align: left; | |
150 | + padding: 5px; | |
151 | +} | |
152 | + | |
153 | +table.cross-references td { | |
154 | + width: 50%; | |
155 | + padding: 5px; | |
156 | +} | |
157 | + | |
158 | +table.cross-references tr th { | |
159 | + font-weight: normal; | |
160 | +} | |
161 | + | |
162 | +table.cross-references tr th.head { | |
163 | + font-weight: bold; | |
164 | +} | |
122 | 165 | \ No newline at end of file |
... | ... |