diff --git a/eventify/settings.py b/eventify/settings.py index f81e1cd..21c7c71 100644 --- a/eventify/settings.py +++ b/eventify/settings.py @@ -50,8 +50,8 @@ MIDDLEWARE = [ CORS_ALLOWED_ORIGINS = [ "http://localhost:5173", - "https://prototype.eventifyplus.com/", - "https://eventifyplus.com/" + "https://prototype.eventifyplus.com", + "https://eventifyplus.com" ] ROOT_URLCONF = 'eventify.urls' @@ -74,24 +74,24 @@ TEMPLATES = [ WSGI_APPLICATION = 'eventify.wsgi.application' -# DATABASES = { -# 'default': { -# 'ENGINE': 'django.db.backends.sqlite3', -# 'NAME': BASE_DIR / 'db.sqlite3', -# } -# } - DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.postgresql', - 'NAME': 'eventify_uat_db', # your DB name - 'USER': 'eventify_uat', # your DB user - 'PASSWORD': 'eventifyplus@!@#$', # your DB password - 'HOST': '0.0.0.0', # or IP/domain - 'PORT': '5440', # default PostgreSQL port + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', } } +# DATABASES = { +# 'default': { +# 'ENGINE': 'django.db.backends.postgresql', +# 'NAME': 'eventify_uat_db', # your DB name +# 'USER': 'eventify_uat', # your DB user +# 'PASSWORD': 'eventifyplus@!@#$', # your DB password +# 'HOST': '0.0.0.0', # or IP/domain +# 'PORT': '5440', # default PostgreSQL port +# } +# } + AUTH_PASSWORD_VALIDATORS = [ {'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'}, {'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator'}, diff --git a/master_data/forms.py b/master_data/forms.py index 2ddbfe4..ce470c3 100644 --- a/master_data/forms.py +++ b/master_data/forms.py @@ -5,7 +5,12 @@ from .models import EventType class EventTypeForm(forms.ModelForm): class Meta: model = EventType - fields = ['event_type'] + fields = ['event_type', 'event_type_icon'] widgets = { - 'event_type': forms.TextInput(attrs={'class': 'form-control'}), + 'event_type': forms.TextInput(attrs={'class': 'form-control'}), + 'event_type_icon': forms.FileInput(attrs={'class': 'form-control'}), + } + labels = { + 'event_type': 'Event Type', + 'event_type_icon': 'Event Type Icon', } diff --git a/templates/master_data/event_type_form.html b/templates/master_data/event_type_form.html index cc21fd9..cd718ce 100644 --- a/templates/master_data/event_type_form.html +++ b/templates/master_data/event_type_form.html @@ -3,7 +3,7 @@
| # | Event Type | Actions | |
|---|---|---|---|
| # | Event Type | Icon | Actions |
| {{ forloop.counter }} | {{ c.event_type }} | +
+ {% if c.event_type_icon %}
+ |
Edit Delete |
| No categories yet. | |||
| No categories yet. | |||