Compare commits
No commits in common. "e42e078dcccd343e644a4bda89eda4c20d6d7154" and "a7ce9c09abc01a3039a74495f6e740dbe3f0c452" have entirely different histories.
e42e078dcc
...
a7ce9c09ab
|
@ -69,7 +69,7 @@ class Content(models.Model):
|
||||||
header = MarkdownxField(blank=True, null=True, default='')
|
header = MarkdownxField(blank=True, null=True, default='')
|
||||||
body = MarkdownxField(blank=True, null=True, default='')
|
body = MarkdownxField(blank=True, null=True, default='')
|
||||||
teaser = models.TextField(blank=True, null=True, validators=[MaxLengthValidator(200)])
|
teaser = models.TextField(blank=True, null=True, validators=[MaxLengthValidator(200)])
|
||||||
schedule = MarkdownxField(blank=True, null=True, default='')
|
schedule = models.TextField(blank=True, null=True)
|
||||||
schedulebutton = models.CharField(db_column='scheduleButton', max_length=255, blank=True, null=True) # Field name made lowercase.
|
schedulebutton = models.CharField(db_column='scheduleButton', max_length=255, blank=True, null=True) # Field name made lowercase.
|
||||||
optbtn2 = models.CharField(db_column='optBtn2', max_length=127, blank=True, null=True) # Field name made lowercase.
|
optbtn2 = models.CharField(db_column='optBtn2', max_length=127, blank=True, null=True) # Field name made lowercase.
|
||||||
opttext2 = models.TextField(db_column='optText2', blank=True, null=True) # Field name made lowercase.
|
opttext2 = models.TextField(db_column='optText2', blank=True, null=True) # Field name made lowercase.
|
||||||
|
@ -119,10 +119,6 @@ class Content(models.Model):
|
||||||
value = ''
|
value = ''
|
||||||
return mark_safe(value)
|
return mark_safe(value)
|
||||||
|
|
||||||
@property
|
|
||||||
def formatted_schedule(self):
|
|
||||||
return mark_safe(markdownify(self.schedule))
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def typefilter(self):
|
def typefilter(self):
|
||||||
return self.type
|
return self.type
|
||||||
|
|
|
@ -20,11 +20,9 @@
|
||||||
<script>
|
<script>
|
||||||
$('#captcha').on({
|
$('#captcha').on({
|
||||||
click: function() {
|
click: function() {
|
||||||
var token = $('input[name="csrfmiddlewaretoken"]')[1].value;
|
$('#csrf').val(getCookie('csrftoken'))
|
||||||
$('#csrf').val(token)
|
|
||||||
$('#contact').submit()
|
$('#contact').submit()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% csrf_token %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -17,6 +17,6 @@
|
||||||
{% if content.schedule %}
|
{% if content.schedule %}
|
||||||
<div class="schedule">
|
<div class="schedule">
|
||||||
<h4>{{content.schedulebutton|default:"Schedule"}}</h4>
|
<h4>{{content.schedulebutton|default:"Schedule"}}</h4>
|
||||||
<p>{{ content.formatted_schedule }}</p>
|
<p>{{ content.schedule|safe|linebreaks }}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -247,8 +247,7 @@ def redirect_event(request):
|
||||||
content = get_object_or_404(Content, shortname=shortname)
|
content = get_object_or_404(Content, shortname=shortname)
|
||||||
return redirect(content.get_absolute_url())
|
return redirect(content.get_absolute_url())
|
||||||
id = request.GET.get('id')
|
id = request.GET.get('id')
|
||||||
if id:
|
id = re.compile('\d+').findall(id)
|
||||||
id = re.compile('\d+').findall(id)
|
|
||||||
if id:
|
if id:
|
||||||
id = id[0]
|
id = id[0]
|
||||||
content = get_object_or_404(Content, id=id)
|
content = get_object_or_404(Content, id=id)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user