refactor: Rename radius to streamline although it would be a better description
This commit is contained in:
		@@ -0,0 +1,18 @@
 | 
				
			|||||||
 | 
					# Generated by Django 5.1.4 on 2024-12-31 12:23
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from django.db import migrations
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class Migration(migrations.Migration):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    dependencies = [
 | 
				
			||||||
 | 
					        ('fellchensammlung', '0029_rename_andoptionnoticenotification_adoptionnoticenotification_and_more'),
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    operations = [
 | 
				
			||||||
 | 
					        migrations.RenameField(
 | 
				
			||||||
 | 
					            model_name='searchsubscription',
 | 
				
			||||||
 | 
					            old_name='radius',
 | 
				
			||||||
 | 
					            new_name='max_distance',
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
@@ -561,10 +561,10 @@ class SearchSubscription(models.Model):
 | 
				
			|||||||
    owner = models.ForeignKey(User, on_delete=models.CASCADE)
 | 
					    owner = models.ForeignKey(User, on_delete=models.CASCADE)
 | 
				
			||||||
    location = models.ForeignKey(Location, on_delete=models.PROTECT)
 | 
					    location = models.ForeignKey(Location, on_delete=models.PROTECT)
 | 
				
			||||||
    sex = models.CharField(max_length=20, choices=SexChoicesWithAll.choices)
 | 
					    sex = models.CharField(max_length=20, choices=SexChoicesWithAll.choices)
 | 
				
			||||||
    radius = models.IntegerField(choices=DistanceChoices.choices)
 | 
					    max_distance = models.IntegerField(choices=DistanceChoices.choices)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __str__(self):
 | 
					    def __str__(self):
 | 
				
			||||||
        return f"{self.owner}: [{SexChoicesWithAll(self.sex).label}] {self.radius}km - {self.location}"
 | 
					        return f"{self.owner}: [{SexChoicesWithAll(self.sex).label}] {self.max_distance}km - {self.location}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Rule(models.Model):
 | 
					class Rule(models.Model):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user