Commit b15716a6c144dcbeb2c2e4afdc8598ab1bbe6271

Authored by janek37
1 parent e314a634

dodane pole wymowa

dictionary/forms.py
... ... @@ -113,6 +113,7 @@ class LexemeEditForm(ModelForm):
113 113 'part_of_speech',
114 114 'entry',
115 115 'entry_suffix',
  116 + 'pronunciation',
116 117 'status',
117 118 'gloss',
118 119 'note',
... ... @@ -123,6 +124,7 @@ class LexemeEditForm(ModelForm):
123 124 'entry_suffix': TextInput(attrs={'size': 5}),
124 125 'gloss': TextInput(attrs={'size': 40}),
125 126 'note': TextInput(attrs={'size': 40}),
  127 + 'pronunciation': TextInput(attrs={'size': 40}),
126 128 }
127 129  
128 130 class LIPEditForm(ModelForm):
... ...
dictionary/management/commands/import_data.py
... ... @@ -189,6 +189,7 @@ def import_lexemes():
189 189 l.gloss = row['glosa'] or ''
190 190 l.entry_suffix = row['haslosuf'] or ''
191 191 l.note = row['nota'] or ''
  192 + l.pronunciation = row['wymowa'] or ''
192 193 cv = ClassificationValue.objects.get(label=row['pospolitosc'])
193 194 cv.lexemes.add(l) #add
194 195 l.fix_homonym_number()
... ... @@ -196,17 +197,17 @@ def import_lexemes():
196 197 l.owner_vocabulary = Vocabulary.objects.get(pk=slownik)
197 198 l.save()
198 199 LexemeAssociation.objects.create(
199   - vocabulary=Vocabulary.objects.get(pk=slownik),
200   - lexeme=l)
  200 + vocabulary=Vocabulary.objects.get(pk=slownik), lexeme=l)
201 201 # brak kwalifikatorów - nieauktualne
202 202 else:
203 203 cv_pk = cv_table[row['pospolitosc']]
204 204 cursor.execute(
205   - "INSERT INTO leksemy (id, haslo, haslosuf, glosa, nota, hom, pos, zrodlo, "
206   - "status, komentarz, data_modyfikacji, slownik, usuniety) VALUES (%s, %s, %s, %s, "
207   - "%s, %s, %s, %s, %s, %s, %s, %s, %s)", [row['nr'], row['haslo'],
208   - row['haslosuf'] or '', row['glosa'] or '', row['nota'] or '', 1, row['pos'], 'SGJP',
209   - status, row['komentarz'], date, row['slownik'], False])
  205 + "INSERT INTO leksemy (id, haslo, haslosuf, glosa, nota, wymowa, hom, "
  206 + "pos, zrodlo, status, komentarz, data_modyfikacji, slownik, usuniety) "
  207 + "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
  208 + [row['nr'], row['haslo'], row['haslosuf'] or '', row['glosa'] or '',
  209 + row['nota'] or '', row['wymowa'] or '', 1, row['pos'], 'SGJP',
  210 + status, row['komentarz'], date, row['slownik'], False])
210 211 cursor.execute(
211 212 "INSERT INTO leksemy_w_slownikach (l_id, slownik) "
212 213 "VALUES (%s, %s)", [row['nr'], slownik])
... ...
dictionary/migrations/0004_auto__add_field_lexeme_pronunciation.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 'Lexeme.pronunciation'
  12 + db.add_column('leksemy', 'pronunciation',
  13 + self.gf('django.db.models.fields.TextField')(default='', db_column='wymowa', blank=True),
  14 + keep_default=False)
  15 +
  16 +
  17 + def backwards(self, orm):
  18 + # Deleting field 'Lexeme.pronunciation'
  19 + db.delete_column('leksemy', 'wymowa')
  20 +
  21 +
  22 + models = {
  23 + 'auth.group': {
  24 + 'Meta': {'object_name': 'Group'},
  25 + '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
  28 + },
  29 + 'auth.permission': {
  30 + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
  31 + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  32 + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
  33 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  34 + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
  35 + },
  36 + '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
  42 + '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
  50 + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
  51 + },
  52 + '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 + '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 + 'dictionary.baseformlabel': {
  60 + 'Meta': {'object_name': 'BaseFormLabel', 'db_table': "'efobazy'"},
  61 + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'efobaz'", 'blank': 'True'}),
  62 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
  63 + },
  64 + 'dictionary.cell': {
  65 + 'Meta': {'ordering': "['index']", 'object_name': 'Cell', 'db_table': "'klatki'"},
  66 + 'base_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}),
  67 + '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': "orm['dictionary.TableTemplate']", 'db_column': "'st_id'"}),
  72 + 'tag': ('django.db.models.fields.TextField', [], {'db_column': "'tag'", 'blank': 'True'})
  73 + },
  74 + 'dictionary.classification': {
  75 + 'Meta': {'object_name': 'Classification', 'db_table': "'klasyfikacje'"},
  76 + '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 + },
  79 + 'dictionary.classificationvalue': {
  80 + 'Meta': {'object_name': 'ClassificationValue', 'db_table': "'wartosci_klasyfikacji'"},
  81 + 'classification': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'values'", 'db_column': "'klas_id'", 'to': "orm['dictionary.Classification']"}),
  82 + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usunieta'"}),
  83 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  84 + 'label': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}),
  85 + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dictionary.Lexeme']", 'symmetrical': 'False', 'blank': 'True'}),
  86 + 'parent_node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'child_nodes'", 'null': 'True', 'db_column': "'rodzic'", 'to': "orm['dictionary.ClassificationValue']"})
  87 + },
  88 + 'dictionary.crossreference': {
  89 + 'Meta': {'object_name': 'CrossReference', 'db_table': "'odsylacze'"},
  90 + 'from_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'refs_to'", 'db_column': "'l_id_od'", 'to': "orm['dictionary.Lexeme']"}),
  91 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  92 + 'to_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'refs_from'", 'db_column': "'l_id_do'", 'to': "orm['dictionary.Lexeme']"}),
  93 + 'type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.CrossReferenceType']", 'db_column': "'typods_id'"})
  94 + },
  95 + 'dictionary.crossreferencetype': {
  96 + 'Meta': {'object_name': 'CrossReferenceType', 'db_table': "'typyodsylaczy'"},
  97 + 'desc': ('django.db.models.fields.CharField', [], {'max_length': '40', 'db_column': "'naglowek'"}),
  98 + 'from_pos': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'crtype_to'", 'db_column': "'pos1'", 'to': "orm['dictionary.PartOfSpeech']"}),
  99 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  100 + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'kolejnosc'"}),
  101 + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '10', 'db_column': "'typods'"}),
  102 + 'to_pos': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'crtype_from'", 'db_column': "'pos2'", 'to': "orm['dictionary.PartOfSpeech']"})
  103 + },
  104 + 'dictionary.ending': {
  105 + 'Meta': {'ordering': "['index']", 'unique_together': "(('pattern', 'base_form_label', 'index'),)", 'object_name': 'Ending', 'db_table': "'zakonczenia'"},
  106 + 'base_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}),
  107 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  108 + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'zind'"}),
  109 + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'endings'", 'db_column': "'w_id'", 'to': "orm['dictionary.Pattern']"}),
  110 + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_zakonczen'", 'blank': 'True'}),
  111 + 'string': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'zak'", 'blank': 'True'})
  112 + },
  113 + 'dictionary.history': {
  114 + 'Meta': {'object_name': 'History', 'db_table': "'history'"},
  115 + 'column_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'column_name_'", 'blank': 'True'}),
  116 + 'column_ord': ('django.db.models.fields.IntegerField', [], {'db_column': "'ordinal_position_of_column_'"}),
  117 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  118 + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.Lexeme']", 'null': 'True', 'db_column': "'lexeme_id_'", 'blank': 'True'}),
  119 + 'new_value': ('django.db.models.fields.TextField', [], {'db_column': "'new_value_'", 'blank': 'True'}),
  120 + 'old_value': ('django.db.models.fields.TextField', [], {'db_column': "'old_value_'", 'blank': 'True'}),
  121 + 'operation': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'operation_'"}),
  122 + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.Pattern']", 'null': 'True', 'db_column': "'pattern_id_'", 'blank': 'True'}),
  123 + 'row_id': ('django.db.models.fields.IntegerField', [], {'db_column': "'id_'"}),
  124 + 'table_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_column': "'table_name_'"}),
  125 + 'table_oid': ('django.db.models.fields.IntegerField', [], {'db_column': "'table_oid_'"}),
  126 + 'timestamp': ('django.db.models.fields.DateTimeField', [], {'db_column': "'timestamp_'"}),
  127 + 'transaction_began': ('django.db.models.fields.DateTimeField', [], {'db_column': "'transaction_began_'"}),
  128 + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'db_column': "'user_id_'"})
  129 + },
  130 + 'dictionary.inflectioncharacteristic': {
  131 + 'Meta': {'unique_together': "(['entry', 'part_of_speech'],)", 'object_name': 'InflectionCharacteristic', 'db_table': "'charfle'"},
  132 + 'basic_form_label': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}),
  133 + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'charfl'", 'blank': 'True'}),
  134 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  135 + 'part_of_speech': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.PartOfSpeech']", 'db_column': "'pos'"})
  136 + },
  137 + 'dictionary.inputform': {
  138 + 'Meta': {'object_name': 'InputForm'},
  139 + 'form': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}),
  140 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  141 + 'input_lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.InputLexeme']"})
  142 + },
  143 + 'dictionary.inputlexeme': {
  144 + 'Meta': {'object_name': 'InputLexeme'},
  145 + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}),
  146 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
  147 + },
  148 + 'dictionary.lexeme': {
  149 + 'Meta': {'object_name': 'Lexeme', 'db_table': "'leksemy'"},
  150 + 'comment': ('django.db.models.fields.TextField', [], {'db_column': "'komentarz'", 'blank': 'True'}),
  151 + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usuniety'"}),
  152 + 'entry': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'db_column': "'haslo'", 'blank': 'True'}),
  153 + 'entry_suffix': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_column': "'haslosuf'", 'blank': 'True'}),
  154 + 'gloss': ('django.db.models.fields.TextField', [], {'db_column': "'glosa'", 'blank': 'True'}),
  155 + 'homonym_number': ('django.db.models.fields.IntegerField', [], {'db_column': "'hom'"}),
  156 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  157 + 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_column': "'data_modyfikacji'", 'blank': 'True'}),
  158 + 'note': ('django.db.models.fields.TextField', [], {'db_column': "'nota'", 'blank': 'True'}),
  159 + 'owner_vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_lexemes'", 'db_column': "'slownik'", 'to': "orm['dictionary.Vocabulary']"}),
  160 + 'part_of_speech': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.PartOfSpeech']", 'db_column': "'pos'"}),
  161 + 'patterns': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dictionary.Pattern']", 'through': "orm['dictionary.LexemeInflectionPattern']", 'symmetrical': 'False'}),
  162 + 'pronunciation': ('django.db.models.fields.TextField', [], {'db_column': "'wymowa'", 'blank': 'True'}),
  163 + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_leksemow'", 'blank': 'True'}),
  164 + 'responsible': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'db_column': "'odpowiedzialny'", 'blank': 'True'}),
  165 + 'source': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'zrodlo'", 'blank': 'True'}),
  166 + 'status': ('django.db.models.fields.CharField', [], {'max_length': '8', 'db_column': "'status'"})
  167 + },
  168 + 'dictionary.lexemeassociation': {
  169 + 'Meta': {'object_name': 'LexemeAssociation', 'db_table': "'leksemy_w_slownikach'"},
  170 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  171 + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.Lexeme']", 'db_column': "'l_id'"}),
  172 + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.Vocabulary']", 'db_column': "'slownik'"})
  173 + },
  174 + 'dictionary.lexemeform': {
  175 + 'Meta': {'object_name': 'LexemeForm'},
  176 + 'form': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
  177 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  178 + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.Lexeme']"})
  179 + },
  180 + 'dictionary.lexemeinflectionpattern': {
  181 + 'Meta': {'ordering': "['index']", 'unique_together': "(('lexeme', 'index'),)", 'object_name': 'LexemeInflectionPattern', 'db_table': "'odmieniasie'"},
  182 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  183 + 'index': ('django.db.models.fields.IntegerField', [], {'db_column': "'oind'"}),
  184 + 'inflection_characteristic': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}),
  185 + 'lexeme': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.Lexeme']", 'db_column': "'l_id'"}),
  186 + 'pattern': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.Pattern']", 'db_column': "'w_id'"}),
  187 + 'qualifiers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dictionary.Qualifier']", 'symmetrical': 'False', 'db_table': "'kwalifikatory_odmieniasiow'", 'blank': 'True'}),
  188 + 'root': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'rdzen'"})
  189 + },
  190 + 'dictionary.lexicalclass': {
  191 + 'Meta': {'object_name': 'LexicalClass', 'db_table': "'czescimowy'"},
  192 + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'primary_key': 'True', 'db_column': "'czm'"})
  193 + },
  194 + 'dictionary.paradygmatywsjp': {
  195 + 'Meta': {'object_name': 'ParadygmatyWSJP', 'db_table': "'paradygmatywsjp'"},
  196 + 'charfl': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}),
  197 + 'col': ('django.db.models.fields.IntegerField', [], {}),
  198 + 'colspan': ('django.db.models.fields.IntegerField', [], {}),
  199 + 'efobaz': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.BaseFormLabel']", 'db_column': "'efobaz'"}),
  200 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  201 + 'kskl': ('django.db.models.fields.IntegerField', [], {}),
  202 + 'morf': ('django.db.models.fields.TextField', [], {}),
  203 + 'podparad': ('django.db.models.fields.CharField', [], {'max_length': '4', 'blank': 'True'}),
  204 + 'pref': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
  205 + 'row': ('django.db.models.fields.IntegerField', [], {}),
  206 + 'rowspan': ('django.db.models.fields.IntegerField', [], {}),
  207 + 'suf': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
  208 + 'typr': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.PatternType']", 'db_column': "'typr'"}),
  209 + 'wariant': ('django.db.models.fields.CharField', [], {'max_length': '4'})
  210 + },
  211 + 'dictionary.partofspeech': {
  212 + 'Meta': {'ordering': "['symbol']", 'object_name': 'PartOfSpeech', 'db_table': "'klasygramatyczne'"},
  213 + 'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.LexicalClass']", 'db_column': "'czm'"}),
  214 + 'symbol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'primary_key': 'True', 'db_column': "'pos'"})
  215 + },
  216 + 'dictionary.pattern': {
  217 + 'Meta': {'ordering': "['name']", 'object_name': 'Pattern', 'db_table': "'wzory'"},
  218 + 'basic_form_ending': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'zakp'", 'blank': 'True'}),
  219 + 'comment': ('django.db.models.fields.TextField', [], {'db_column': "'komentarz'", 'blank': 'True'}),
  220 + 'example': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'przyklad'"}),
  221 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  222 + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32', 'db_column': "'w_id'"}),
  223 + 'status': ('django.db.models.fields.CharField', [], {'max_length': '8'}),
  224 + 'type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.PatternType']", 'db_column': "'typ'"})
  225 + },
  226 + 'dictionary.patterntype': {
  227 + 'Meta': {'object_name': 'PatternType', 'db_table': "'typywzorow'"},
  228 + 'entry': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_column': "'wtyp'", 'blank': 'True'}),
  229 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  230 + 'lexical_class': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.LexicalClass']", 'db_column': "'czm'"})
  231 + },
  232 + 'dictionary.qualifier': {
  233 + 'Meta': {'ordering': "['label']", 'unique_together': "(['label', 'vocabulary'],)", 'object_name': 'Qualifier', 'db_table': "'kwalifikatory'"},
  234 + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'usuniety'"}),
  235 + 'exclusion_class': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.QualifierExclusionClass']", 'null': 'True', 'db_column': "'klasa'", 'blank': 'True'}),
  236 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  237 + 'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'kwal'"}),
  238 + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'qualifiers'", 'db_column': "'slownik'", 'to': "orm['dictionary.Vocabulary']"})
  239 + },
  240 + 'dictionary.qualifierexclusionclass': {
  241 + 'Meta': {'object_name': 'QualifierExclusionClass', 'db_table': "'klasy_wykluczania'"},
  242 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  243 + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_column': "'nazwa'"}),
  244 + 'vocabulary': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.Vocabulary']", 'db_column': "'slownik'"})
  245 + },
  246 + 'dictionary.savedexportdata': {
  247 + 'Meta': {'object_name': 'SavedExportData'},
  248 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  249 + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}),
  250 + 'serialized_data': ('django.db.models.fields.TextField', [], {})
  251 + },
  252 + 'dictionary.savedfilter': {
  253 + 'Meta': {'unique_together': "(('name', 'user'),)", 'object_name': 'SavedFilter'},
  254 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  255 + 'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
  256 + 'serialized_filter': ('django.db.models.fields.TextField', [], {}),
  257 + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
  258 + },
  259 + 'dictionary.tablecell': {
  260 + 'Meta': {'object_name': 'TableCell', 'db_table': "'komorki_tabel'"},
  261 + 'cell': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['dictionary.Cell']", 'unique': 'True', 'db_column': "'k_id'"}),
  262 + 'col': ('django.db.models.fields.IntegerField', [], {}),
  263 + 'colspan': ('django.db.models.fields.IntegerField', [], {}),
  264 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  265 + 'row': ('django.db.models.fields.IntegerField', [], {}),
  266 + 'rowspan': ('django.db.models.fields.IntegerField', [], {})
  267 + },
  268 + 'dictionary.tableheader': {
  269 + 'Meta': {'object_name': 'TableHeader', 'db_table': "'naglowki_tabel'"},
  270 + 'col': ('django.db.models.fields.IntegerField', [], {}),
  271 + 'colspan': ('django.db.models.fields.IntegerField', [], {}),
  272 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  273 + 'label': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_column': "'nagl'", 'blank': 'True'}),
  274 + 'row': ('django.db.models.fields.IntegerField', [], {}),
  275 + 'row_header': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_column': "'wierszowy'"}),
  276 + 'rowspan': ('django.db.models.fields.IntegerField', [], {}),
  277 + 'table_template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.TableTemplate']", 'db_column': "'st_id'"})
  278 + },
  279 + 'dictionary.tabletemplate': {
  280 + 'Meta': {'object_name': 'TableTemplate', 'db_table': "'szablony_tabel'"},
  281 + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  282 + 'inflection_characteristic': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.InflectionCharacteristic']", 'db_column': "'charfl'"}),
  283 + 'pattern_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.PatternType']", 'db_column': "'wtyp'"}),
  284 + 'variant': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dictionary.Variant']", 'db_column': "'wariant'"})
  285 + },
  286 + 'dictionary.variant': {
  287 + 'Meta': {'object_name': 'Variant', 'db_table': "'warianty'"},
  288 + 'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True', 'db_column': "'wariant'"})
  289 + },
  290 + 'dictionary.vocabulary': {
  291 + 'Meta': {'object_name': 'Vocabulary', 'db_table': "'slowniki'"},
  292 + 'classifications': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'vocabularies'", 'blank': 'True', 'to': "orm['dictionary.Classification']"}),
  293 + 'editors': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'editable_vocabularies'", 'blank': 'True', 'to': "orm['auth.User']"}),
  294 + 'id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True', 'db_column': "'slownik'"}),
  295 + 'lexemes': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'vocabularies'", 'blank': 'True', 'through': "orm['dictionary.LexemeAssociation']", 'to': "orm['dictionary.Lexeme']"}),
  296 + 'managers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'managed_vocabularies'", 'blank': 'True', 'to': "orm['auth.User']"}),
  297 + 'viewers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'visible_vocabularies'", 'blank': 'True', 'to': "orm['auth.User']"})
  298 + }
  299 + }
  300 +
  301 + complete_apps = ['dictionary']
0 302 \ No newline at end of file
... ...
dictionary/models.py
... ... @@ -323,6 +323,7 @@ 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 327 homonym_number = IntegerField(db_column='hom')
327 328 part_of_speech = ForeignKey(PartOfSpeech, db_column='pos',
328 329 verbose_name=u'cz. mowy')
... ... @@ -700,7 +701,7 @@ class Vocabulary(Model):
700 701 return self.viewers.all().distinct() | users_with_perm(perm)
701 702  
702 703 def all_editors(self):
703   - return self.all_editors()
  704 + return self.editors.all()
704 705  
705 706 def all_managers(self):
706 707 perm = Permission.objects.get(codename='manage_all_vocabularies')
... ...