Update help texts. Close #1

This commit is contained in:
Gabriel Augendre 2019-03-03 13:10:32 +01:00
parent bebb3a9c25
commit f524574fd4
3 changed files with 26 additions and 3 deletions

View file

@ -6,6 +6,6 @@ class CoordinateField(models.DecimalField):
kwargs['max_digits'] = 11 kwargs['max_digits'] = 11
kwargs['decimal_places'] = 8 kwargs['decimal_places'] = 8
kwargs['help_text'] = ('Format : xxx,xxxxxxxx<br>' kwargs['help_text'] = ('Format : xxx,xxxxxxxx<br>'
'(max 8 décimales, max 3 chiffres avant la virgule, séparateur : virgule)') '(max 8 decimal places, max 3 digits before comma, separator : comma)')
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)

View file

@ -0,0 +1,23 @@
# Generated by Django 2.1.7 on 2019-03-03 12:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('map', '0005_auto_20190302_1457'),
]
operations = [
migrations.AlterField(
model_name='friendlocation',
name='end_date',
field=models.DateField(blank=True, help_text='Format : YYYY-MM-DD, example : 2018-05-31', null=True, verbose_name='until'),
),
migrations.AlterField(
model_name='friendlocation',
name='start_date',
field=models.DateField(blank=True, help_text='Format : YYYY-MM-DD, example : 2018-05-31', null=True, verbose_name='from'),
),
]

View file

@ -24,8 +24,8 @@ class Friend(AbstractUser):
class FriendLocation(BaseModel): class FriendLocation(BaseModel):
latitude = CoordinateField() latitude = CoordinateField()
longitude = CoordinateField() longitude = CoordinateField()
start_date = models.DateField('from', blank=True, null=True) start_date = models.DateField('from', blank=True, null=True, help_text='Format : YYYY-MM-DD, example : 2018-05-31')
end_date = models.DateField('until', blank=True, null=True) end_date = models.DateField('until', blank=True, null=True, help_text='Format : YYYY-MM-DD, example : 2018-05-31')
friend = models.OneToOneField(Friend, on_delete=models.CASCADE, related_name='location') friend = models.OneToOneField(Friend, on_delete=models.CASCADE, related_name='location')
@property @property