Updates for the event images
This commit is contained in:
@@ -10,8 +10,13 @@ class EventForm(forms.ModelForm):
|
||||
widgets = {
|
||||
'name': forms.TextInput(attrs={'class': 'form-control'}),
|
||||
'description': forms.Textarea(attrs={'class': 'form-control'}),
|
||||
'title': forms.TextInput(attrs={'class': 'form-control'}),
|
||||
'important_information': forms.Textarea(attrs={'class': 'form-control'}),
|
||||
'venue_name': forms.TextInput(attrs={'class': 'form-control'}),
|
||||
'start_date': forms.DateInput(attrs={'class': 'form-control', 'type': 'date'}),
|
||||
'end_date': forms.DateInput(attrs={'class': 'form-control', 'type': 'date'}),
|
||||
'start_time': forms.TimeInput(attrs={'class': 'form-control', 'type': 'time'}),
|
||||
'end_time': forms.TimeInput(attrs={'class': 'form-control', 'type': 'time'}),
|
||||
'latitude': forms.NumberInput(attrs={'class': 'form-control'}),
|
||||
'longitude': forms.NumberInput(attrs={'class': 'form-control'}),
|
||||
'pincode': forms.TextInput(attrs={'class': 'form-control'}),
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 4.2.21 on 2025-11-28 20:56
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('events', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='event',
|
||||
name='important_information',
|
||||
field=models.TextField(blank=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='event',
|
||||
name='title',
|
||||
field=models.CharField(blank=True, max_length=250),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='event',
|
||||
name='venue_name',
|
||||
field=models.CharField(blank=True, max_length=250),
|
||||
),
|
||||
]
|
||||
23
events/migrations/0003_event_end_time_event_start_time.py
Normal file
23
events/migrations/0003_event_end_time_event_start_time.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 4.2.21 on 2025-11-28 21:01
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('events', '0002_event_important_information_event_title_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='event',
|
||||
name='end_time',
|
||||
field=models.TimeField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='event',
|
||||
name='start_time',
|
||||
field=models.TimeField(blank=True, null=True),
|
||||
),
|
||||
]
|
||||
@@ -8,6 +8,8 @@ class Event(models.Model):
|
||||
description = models.TextField()
|
||||
start_date = models.DateField()
|
||||
end_date = models.DateField()
|
||||
start_time = models.TimeField(blank=True, null=True)
|
||||
end_time = models.TimeField(blank=True, null=True)
|
||||
|
||||
latitude = models.DecimalField(max_digits=9, decimal_places=6)
|
||||
longitude = models.DecimalField(max_digits=9, decimal_places=6)
|
||||
@@ -31,6 +33,10 @@ class Event(models.Model):
|
||||
], default='pending')
|
||||
cancelled_reason = models.TextField(default='NA')
|
||||
|
||||
title = models.CharField(max_length=250, blank=True)
|
||||
important_information = models.TextField(blank=True)
|
||||
venue_name = models.CharField(max_length=250, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.name} ({self.start_date})"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user