Commit ec9dc7f9a601ada09a0ed31663d513b145a78043
1 parent
46f076fa
Remove number and publisher from Document model
Showing
2 changed files
with
5 additions
and
4 deletions
collector/storage/forms.py
... | ... | @@ -282,12 +282,11 @@ class DocDetailsForm(ModelForm): |
282 | 282 | |
283 | 283 | class Meta: |
284 | 284 | model = Document |
285 | - fields = ['title', 'publication_date', 'publication_place', 'number', 'channel', 'original_lang'] | |
285 | + fields = ['title', 'publication_date', 'publication_place', 'channel', 'original_lang'] | |
286 | 286 | labels = { |
287 | 287 | 'title': 'Tytuł', |
288 | 288 | 'publication_date': 'Data publikacji', |
289 | 289 | 'publication_place': 'Miejsce publikacji', |
290 | - 'number': 'Numer', | |
291 | 290 | 'channel': 'Kanał', |
292 | 291 | 'original_lang': 'Język oryginału' |
293 | 292 | } |
... | ... |
collector/storage/models.py
... | ... | @@ -26,8 +26,6 @@ class Document(models.Model): |
26 | 26 | title = models.TextField() |
27 | 27 | publication_date = PartialDateField(null=True) |
28 | 28 | publication_place = models.CharField(max_length=100) |
29 | - number = models.CharField(max_length=50) | |
30 | - publisher = models.CharField(max_length=100) | |
31 | 29 | creation_time = models.DateTimeField(auto_now_add=True) |
32 | 30 | keywords = models.ManyToManyField('Keyword', related_name='documents', blank=True) |
33 | 31 | meta_url = models.URLField(blank=True) |
... | ... | @@ -142,6 +140,10 @@ class Document(models.Model): |
142 | 140 | return False |
143 | 141 | return True |
144 | 142 | |
143 | + @staticmethod | |
144 | + def get_doc_type_display(): | |
145 | + return 'dokument' | |
146 | + | |
145 | 147 | class Meta: |
146 | 148 | db_table = 'document' |
147 | 149 | ordering = ['id'] |
... | ... |