Fixy problémů s abstraktností modelu a špatných identifikátorů
This commit is contained in:
		
							parent
							
								
									e33d602635
								
							
						
					
					
						commit
						72f3099366
					
				
					 1 changed files with 6 additions and 3 deletions
				
			
		|  | @ -561,7 +561,9 @@ class Soustredeni(SeminarModelBase): | |||
| class Problem(SeminarModelBase): | ||||
| 
 | ||||
| 	class Meta: | ||||
| 		abstract = True | ||||
| 		# Není abstraktní, protože se na něj jinak nedají dělat ForeignKeys. | ||||
| 		# TODO: Udělat to polymorfní (pomocí django-polymorphic), abychom dostali po těch vazbách přímo tu úlohu/témátko vč. fieldů, které nejsou součástí modelu Problem? | ||||
| 		#abstract = True | ||||
| 		verbose_name = 'Problém' | ||||
| 		verbose_name_plural = 'Problémy' | ||||
| 		ordering = ['nazev'] | ||||
|  | @ -738,7 +740,8 @@ class Reseni(SeminarModelBase): | |||
| 		db_table = 'seminar_reseni' | ||||
| 		verbose_name = 'Řešení' | ||||
| 		verbose_name_plural = 'Řešení' | ||||
| 		ordering = ['-problem_id', 'resitel'] | ||||
| 		#ordering = ['-problem', 'resitele']	# FIXME: Takhle to chceme, ale nefunguje to. | ||||
| 		ordering = ['-cas_doruceni'] | ||||
| 
 | ||||
| 	# Interní ID | ||||
| 	id = models.AutoField(primary_key = True) | ||||
|  | @ -850,7 +853,7 @@ class PrilohaReseni(SeminarModelBase): | |||
| 		db_table = 'seminar_priloha_reseni' | ||||
| 		verbose_name = 'Příloha řešení' | ||||
| 		verbose_name_plural = 'Přílohy řešení' | ||||
| 		ordering = ['reseni', 'timestamp'] | ||||
| 		ordering = ['reseni', 'vytvoreno'] | ||||
| 
 | ||||
| 	# Interní ID | ||||
| 	id = models.AutoField(primary_key = True) | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 LEdoian
						LEdoian