summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSashi202019-09-20 10:12:33 +0530
committerSashi202019-09-20 10:12:33 +0530
commit9925fde5d278278312a2be4458dc4cc675a3b88b (patch)
treea786d6a2dcb6a96769eb5607efa884f29f06d325
parentf193ddc4fae94202e1e37709fe964ecfb2bfcbe3 (diff)
downloadSciPy2019-9925fde5d278278312a2be4458dc4cc675a3b88b.tar.gz
SciPy2019-9925fde5d278278312a2be4458dc4cc675a3b88b.tar.bz2
SciPy2019-9925fde5d278278312a2be4458dc4cc675a3b88b.zip
Add field to enable/disable registration details model
-rw-r--r--static/website/templates/home.html4
-rw-r--r--website/migrations/0003_auto_20190919_1231.py23
-rw-r--r--website/models.py3
3 files changed, 28 insertions, 2 deletions
diff --git a/static/website/templates/home.html b/static/website/templates/home.html
index 8e4270d..144f57f 100644
--- a/static/website/templates/home.html
+++ b/static/website/templates/home.html
@@ -125,10 +125,11 @@ It provides a unique opportunity to discuss about the latest trends on Scientifi
</td>
</tr>
{% for registration_detail in registration_details %}
+ {% if registration_detail.display_registration_type %}
<tr>
<td style="border-top:none;!important">
<div class="align-baseline">
- {{ registration_detail.registration_type }}<br>
+ {{ registration_detail.registration_type| safe }}<br>
{% if not registration_detail.start_date %}
(till {{ registration_detail.end_date| date:"d M Y"}})<br>
{% else %}
@@ -143,6 +144,7 @@ It provides a unique opportunity to discuss about the latest trends on Scientifi
</div>
</td>
</tr>
+ {% endif %}
{% endfor %}
<tr>
<td colspan="2">
diff --git a/website/migrations/0003_auto_20190919_1231.py b/website/migrations/0003_auto_20190919_1231.py
new file mode 100644
index 0000000..47eeeb2
--- /dev/null
+++ b/website/migrations/0003_auto_20190919_1231.py
@@ -0,0 +1,23 @@
+# Generated by Django 2.2.4 on 2019-09-19 12:31
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('website', '0002_auto_20190917_0525'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='registrationdetail',
+ name='display_registration_type',
+ field=models.BooleanField(default=True),
+ ),
+ migrations.AlterField(
+ model_name='registrationdetail',
+ name='registration_type',
+ field=models.TextField(blank=True, max_length=500, null=True),
+ ),
+ ]
diff --git a/website/models.py b/website/models.py
index dd6f08d..a0f9015 100644
--- a/website/models.py
+++ b/website/models.py
@@ -156,8 +156,9 @@ class CFP(models.Model):
class RegistrationDetail(models.Model):
- registration_type = models.CharField(max_length=50, blank= True, null= True)
+ registration_type = models.TextField(max_length=500, blank= True, null= True)
start_date = models.DateTimeField(blank=True, null = True)
end_date = models.DateTimeField(blank=True, null=True)
registration_ticket = models.CharField(max_length=100, blank=True, null=True)
registration_description = models.TextField(max_length=500, blank= True, null= True)
+ display_registration_type = models.BooleanField(default = True)