korektury | prejmenovani autor_org zpet na autor
Migrace autora z CharField na odkaz na Organizator Prejmenovani autor_org zpet na autor Oprava i Komentar maji zase jenom polozku autor, ktera ukazuje na Organizatora
This commit is contained in:
		
							parent
							
								
									eef276f04b
								
							
						
					
					
						commit
						7aa5f72e7d
					
				
					 2 changed files with 28 additions and 4 deletions
				
			
		
							
								
								
									
										24
									
								
								korektury/migrations/0013_rename_autor_org.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								korektury/migrations/0013_rename_autor_org.py
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | ||||||
|  | # -*- coding: utf-8 -*- | ||||||
|  | from __future__ import unicode_literals | ||||||
|  | 
 | ||||||
|  | from django.db import migrations, models | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class Migration(migrations.Migration): | ||||||
|  | 
 | ||||||
|  |     dependencies = [ | ||||||
|  |         ('korektury', '0012_delete_autor'), | ||||||
|  |     ] | ||||||
|  | 
 | ||||||
|  |     operations = [ | ||||||
|  |         migrations.RenameField( | ||||||
|  |             model_name='komentar', | ||||||
|  |             old_name='autor_org', | ||||||
|  |             new_name='autor', | ||||||
|  |         ), | ||||||
|  |         migrations.RenameField( | ||||||
|  |             model_name='oprava', | ||||||
|  |             old_name='autor_org', | ||||||
|  |             new_name='autor', | ||||||
|  |         ), | ||||||
|  |     ] | ||||||
|  | @ -122,9 +122,9 @@ class Oprava(models.Model): | ||||||
|     status = models.CharField(u'stav opravy',max_length=16, choices=STATUS_CHOICES, blank=False, |     status = models.CharField(u'stav opravy',max_length=16, choices=STATUS_CHOICES, blank=False, | ||||||
|             default = STATUS_K_OPRAVE) |             default = STATUS_K_OPRAVE) | ||||||
| 
 | 
 | ||||||
|     autor_org = models.ForeignKey(Organizator, blank = True, |     autor = models.ForeignKey(Organizator, blank = True, | ||||||
|             help_text='Autor opravy', |             help_text='Autor opravy', | ||||||
|             null = True) # TODO odstranit prizvisko User, TODO null = False |             null = True) | ||||||
|      |      | ||||||
|     text = models.TextField(u'text opravy',blank = True, help_text='Text opravy') |     text = models.TextField(u'text opravy',blank = True, help_text='Text opravy') | ||||||
| 
 | 
 | ||||||
|  | @ -152,9 +152,9 @@ class Komentar(models.Model): | ||||||
|     cas = models.DateTimeField(u'čas komentáře',default=timezone.now,help_text = 'Čas zadání komentáře') |     cas = models.DateTimeField(u'čas komentáře',default=timezone.now,help_text = 'Čas zadání komentáře') | ||||||
| 
 | 
 | ||||||
|     oprava = models.ForeignKey(Oprava) |     oprava = models.ForeignKey(Oprava) | ||||||
|     autor_org = models.ForeignKey(Organizator, blank = True, |     autor = models.ForeignKey(Organizator, blank = True, | ||||||
|             help_text = u'Autor komentáře', |             help_text = u'Autor komentáře', | ||||||
|             null = True) # TODO odstranit prizvisko User, TODO null = False |             null = True) | ||||||
|      |      | ||||||
|     text = models.TextField(u'text komentáře',blank = True, help_text='Text komentáře') |     text = models.TextField(u'text komentáře',blank = True, help_text='Text komentáře') | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Bc. Petr Pecha
						Bc. Petr Pecha