fix
This commit is contained in:
18
core/apps/shared/migrations/0011_tourplan_date.py
Normal file
18
core/apps/shared/migrations/0011_tourplan_date.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2 on 2025-11-27 13:45
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('shared', '0010_factory'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='tourplan',
|
||||
name='date',
|
||||
field=models.DateField(blank=True, null=True),
|
||||
),
|
||||
]
|
||||
@@ -13,6 +13,7 @@ class TourPlan(BaseModel):
|
||||
latitude = models.FloatField(null=True, blank=True)
|
||||
longitude = models.FloatField(null=True, blank=True)
|
||||
location_send = models.BooleanField(default=False)
|
||||
date = models.DateField(null=True, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.user.first_name}'s tour plan to {self.place_name}"
|
||||
|
||||
@@ -9,7 +9,7 @@ class TourPlanSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = TourPlan
|
||||
fields = [
|
||||
'id', 'place_name', 'longitude', 'latitude', 'location_send', 'created_at'
|
||||
'id', 'place_name', 'longitude', 'latitude', 'location_send', 'date', 'created_at'
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user